Quote from: deltree on Sun 16/11/2003 15:40:52
function parabol(x1,y1,x2,y2,top,object,time)
That function would do the following thing:
-move an object(object)
-from location (x1,y1)
-to location (x2,y2)
-with a top height(top),
the top height is reached in (time) seconds
There are two ways to satisfy all those conditions - scale gravity or scale time - I guess both of them boil down to the same thing, which is:
Change the gravity parameter fg so that ft1 = time:
ft1 = sqrt(2*s*s*fh1/fg);
(substitute ft1 = s*time)
=> int fg = 2*fh1/(time*time);
So, replace the int fg = s*9810/100 line with this line and off you go.
Steve