| |
Testicle Account closed
Registered: Sep 2002 Posts: 131 |
Looking for Sinus-Formulas.
hi, can anyone help me? i'm looking for different formulas to calculate sinus-tables.
for example, which math-formulas produce the different sin-tables in wix-bouncer?
are there any "collections" of these formulas, or can i peek at some basic-code from sinus-creator-programms (if yes, which ones?)?
thanks in advance,
daniel.
|
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
those "bouncers" are usually all based around the same formulae....
f(x) = offset+(sin(x)*range)
where x is in the range from 0 to 2*pi
checkout some physics books from your time at school... section "basic mechanics". there you can see how the more advanced stuff, like real looking "bounce" or "jump" is done there... (this is not sinus stuff actually) also how more complex waves are generated by combining several of the above simple formulas. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
real bouncers are made from parabola. y = a*t^2 + b*t + c. c being the starting point at t=0, b is the initial speed and a is acceleration.
good luck (you have to turn the speed _b_ around when a ball hits the floor or sumthing)
Werner |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
wvl: yes ofcoz :=) thats why i suggested the physics book... calculating the curve a ball takes when thrown through the air must be one of the most common practices there :=)) |
| |
White Flame
Registered: Sep 2002 Posts: 136 |
Actually, most bouncers are done iteratively:
y = y + dy
dy = dy - gravity
with a check for y<0 |
| |
WVL
Registered: Mar 2002 Posts: 902 |
yes, ofcourse you iterate :) but that's just simplyfing the calculations and doesn't give you insight in how the movement 'looks' like. |