Normal sentences
Ruby: 273 254 Bytes
->n,s{j,o,g,r,l=-(n.size/2),[],0,{}
n.gsub(/./){(r[((2*Math::PI)**-0.5*10*Math.exp(-(j/1e1)**2/2/s/s)/s).round]||="")<<$&
j+=1}
r.sort.map{|y, c|o<<(l ?$/*(y-l-1):"")+(" "*g)+(c[0,(h=c.size)/2])+(" "*(n.size-g*2-h))+(c[h/2,h])
g+=h/2
l=y}
puts o.reverse}
A huge thanks to Kevin Lau for saving 18 bytes!
Python 3 with SciPy, 239 233 bytes
from scipy import stats,around,arange
def f(s,t):
l=len(t);p=[];y=around(stats.norm.pdf((arange(l)-l//2)*.1,scale=s),1)*10
for i in range(l):p+=[[' ']*(max(y)-y[i])];p[i]+=[t[i]]+[' ']*(y[i]-y[0])
for j in zip(*p):print(*j,sep='')
A function that takes input via argument of standard deviation s
and string t
, and prints the result to STDOUT.
How it works
from scipy import stats,around,arange Import the statistics, rounding and range functions
from SciPy
def f(s,t): Function with input standard deviation s and string
t
l=len(t);p=[] Define the much-used length of t as l and initialise
the print values list p
arange(l) Generate a list of integer x values in [0,l)...
...-l//2*.1 ...and scale such that 0 is at the middle character
and the x-step is 0.1
stats.norm.pdf(...,scale=s) Generate a list containing the y values for each x
value by calling the normal probability
density function scaled with s...
y=around(...,1) ...round all values to 1 decimal place...
...*10 ...and multiply by 10 to give the vertical index of
each character
for i in range(l):... For all characters in t...
p+=[[' ']*(max(y)-y[i])] ..add the number of lines below the character as
spaces...
p[i]+=[t[i]]+[' ']*(y[i]-y[0]) ...add the character and the number of lines above
the character as spaces
This leaves p containing a list for each desired output line, but transposed.
for j in zip(*p):... For every output line in the transpose of p...
print(*j,sep='') ...print the output line
Try it on Ideone