Figuring out formula from graph

  • Thread starter Thread starter AluminX
  • Start date Start date
  • Tags Tags
    Formula Graph
AI Thread Summary
To derive a formula from a graph representing the motion of a bouncing ball, a piecewise function is suggested, utilizing kinematic equations for the initial "hump" and adjusting for energy loss upon collision with the ground. A simple simulation can be achieved by making each subsequent bounce a percentage smaller than the previous one, effectively modeling real energy loss. The graph illustrates height versus time, and for a basic bouncing effect, a formula like y=sin(x)^2 can be used, though it may not perfectly represent the parabolic shape of a bounce. Adjusting the amplitude can simulate energy loss over time, leading to diminishing heights until the ball comes to rest. Understanding these concepts will aid in creating realistic motion simulations in Flash using ActionScript.
AluminX
Messages
2
Reaction score
0
Hi, I'm not sure if this is the best forum to post this question but I'm going to give it a try.
I would like to be able to figure out a formula from a given graph( http://img46.imageshack.us/img46/8172/graphun4.jpg ). basically that would be the motion of a bouncing ball. Ultimately what i would like to do is figure out how to simulate those kind of motions into flash via action script to build bouncing windows, drop down menues etc.
I guess i can go and do some research on snippets and copy past but i'd rather try to understand it how it works :P.
thank you in advance.
 
Last edited by a moderator:
Physics news on Phys.org
MOST functions can't be easily defined in a formula.

I'd make it a piecewise function. The first "hump" will be a kinematic equation I'm sure, then after you analyze the collision with the ground you can keep using kinematics.
 
You can always fit a curve with N 'humps' with a polynomial with N terms
( if you're an astronomer you can fit 1 hump with N terms ;-)

For 'real world' objects you could look at Fourier series.

For a simple bouncing simulation I would just make each bounce x% smaller than the previous, adjust x to get the degree of damping you want. This prettry much models the real energy loss in a bouncing ball.
 
ohh the graph doesn't represent the trajectory of a bouncing ball, it represents height vs time. how high would the ball be at x seconds. sorry :P.
basically what i need is a simple formula, for example if i want to make a point a de-acceleration, i'll just do:
1.dist= final_x-current_x;
2.acel = .7;
3.next_x = current_x+(dist*acel)
4.repeat step 3 until dist<=0;

basically the object will move "dist" many units every tick(second).

I'm looking for a similar formula to simulate bouncing. The formula should (lets say y=100 and a tick of 5 seconds) make y=0 after 5 seconds, y=60 after 5 more seconds; than back to 0 after 5 more secs, y=40,y=0,y=20,y=0, y=7,y=0,y=1,y=0,y=0 and than y stays constant at 0.
Now i understand the concept is just that i don't have the knowledge to come up with a formula. I'm not sure if I'm making myself clear.
 
The simplest way to get something that looks like a bouncing ball would be to use y=sin(x)^2.
Not quite the correct shape ( a parabola ) but unless you are writing physics simulations it will look close enough. You can reduce Y on each round by a factor if you want to loose energy.
 
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top