Solved

Elliptic Arc Path

Posted on 2003-11-18
5
328 Views
Last Modified: 2008-03-10
Hi all,

I'm trying to code the "bouncing movement" of a ball for a program.

What I need is the formula from which I can get an exact point (position of the ball) in an elliptic arc. (I couldn't yet find it)

Could anybody please help?

Thanks in advanced,
Techfreelance
0
Comment
Question by:techfreelance
5 Comments
 
LVL 22

Accepted Solution

by:
grg99 earned 100 total points
ID: 9771211
If you're trying to simulate a ball falling and then bouncing off the floor, you can try this technique:

Give the ball a starting velocity in the X direction, say 1 m/sec

Give it a starting velocity in the Y direction, if we assume it's being thrown upward, say 0.5 m/sec

Now let's assume there's no air resistance, so the ball is not going to change speed in the X direction,
i.e. X Accelleration equals zero.

But there's gravity, which is a constant downward acceleration, so each second it's going to increase in Y velocity by G m/sec,
on Earth's surface G is IIRC 9.8 meters per second.

So that shoul dbe all you need to calculate the ball's trajectory.  Starting at X,Y position of say (0,0), calculate its position 0.1 second later, easily done since you know the X and Y velocities.  Also calculate a new X and Y velocity, given the X and Y accelerations.  Very simple math.


And Oh, when the ball hits the ground (Y = 0), it will bounce, assume a very elastic ball, so the Y velocity reflects.  Very easy, very simple, as the old Chef Tell used to say,

0
 
LVL 1

Assisted Solution

by:Big_B
Big_B earned 50 total points
ID: 9771284
Not a formula for an elliptical arc but perhaps you try something similar to this.
http://www.brainycreatures.co.uk/physics/friction.asp
0
 
LVL 31

Assisted Solution

by:GwynforWeb
GwynforWeb earned 100 total points
ID: 9771506
If a ball takes off at an angle theta and speed V then the path it takes is

                       x(t) = V*t*cos(theta)

                       y(t) = V*t*sin(theta) - g*t² /2

The time for the ball to come down is  (2V/g)sin(theta) so the above formula is for  0 < t < (2V/g)sin(theta).

I am not sure exactly how much detail you want but there is a start, let me know what else you need.
0
 
LVL 1

Expert Comment

by:Urhixidur
ID: 9838127
To the previous comments I'll simply add that what you're looking at is *not* an elliptical arc, but a parabolic arc.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
This article seeks to propel the full implementation of geothermal power plants in Mexico as a renewable energy source.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question