I've been searching day and have found several examples but have yet to actually get a working formula to achieve what I'm trying to do. On the surface I though it would be rather easy but I have been proven wrong.
I have a php script that prints numbers 1-XXX-1 to create a pyramid shape. For aesthetics I'm trying to smooth this into a bell curve. I can provide the data as: 1,2,3,4,5,6,5,4,3,2,1 or 1,11 or 1,2,3...,9,10,11
Every attempt I have made has ended in failure from increasing to a needle point and back to zero or a bell curve that ends negative etc..
I though I could write a simple function like: function makeCurve (P1,TotalPoints) and iterate through it where the next point would be makeCurve (P2,TotalPoints) and when Px was naer 1/2 the total number of points it would slow the increase then begin counting down.
example for 9 points: 1, 1.3, 2.5, 3.3, 4, 3.3, 2.5, 1.3, 1 If it matters I'm using Canvas Js