Figuring out formula from graph

In summary, the conversation is about trying to figure out a formula for simulating the motion of a bouncing ball in order to create bouncing windows and drop down menus in Flash. The participants discuss using kinematic equations, fitting curves with polynomials or Fourier series, and using a simple formula to simulate the bouncing. Ultimately, the conclusion is that the simplest way to simulate a bouncing ball is to use the formula y=sin(x)^2, with the option to reduce the y value for energy loss.
  • #1
AluminX
2
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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.
 

1. How do I determine the formula from a graph?

To determine the formula from a graph, you must first identify the type of relationship shown on the graph. This can be done by analyzing the shape of the graph and the patterns it displays. Once you have identified the type of relationship, you can use mathematical concepts such as slope, intercepts, and transformations to create an equation that accurately represents the data on the graph.

2. What is the importance of figuring out the formula from a graph?

Figuring out the formula from a graph allows you to make predictions and analyze the data more accurately. It also helps you understand the underlying relationship between the variables and can be used to solve real-world problems.

3. What are some common types of relationships shown on a graph?

Some common types of relationships shown on a graph include linear, quadratic, exponential, and logarithmic. Other types include polynomial, trigonometric, and inverse functions.

4. How do I use the points on a graph to determine the formula?

To use the points on a graph to determine the formula, you can plug in the coordinates of the points into the equation and solve for any unknown variables. You can also use the slope formula to find the rate of change between two points, which can help determine the formula.

5. Are there any tools or techniques that can help me figure out the formula from a graph?

Yes, there are several tools and techniques that can help you figure out the formula from a graph. These include using a graphing calculator, creating a table of values, and using the trendline feature in spreadsheet programs. You can also use mathematical concepts such as slope, intercepts, and transformations to determine the formula. Additionally, there are online resources and tutorials available to guide you through the process.

Similar threads

  • Introductory Physics Homework Help
Replies
5
Views
272
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
2K
  • Introductory Physics Homework Help
Replies
15
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
15
Views
264
  • Introductory Physics Homework Help
Replies
10
Views
4K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
3K
Back
Top