Re: Calculists out there?
- Posted by Noah Smith <nhs6080 at UNIX.TAMU.EDU> Sep 25, 1998
- 585 views
Ok, in order to calculate trajectory, it is only necessary to know v, the initial velocity, a, the initial acceleration (due to gravity), theta, the angle of the initial velocity, and t, the elapsed time. First, velocity at an angle can actually be expressed by two, independent velocities -- in your case, one vertically (or against the force of gravity), and one horizontal (a force against the source of energy). That is done by using trig. sin(theta) = opposite/hypotenuse and cos(theta) = adjacent/hypotenuse, such that sin(theta)*hypotenuse = opposite. Where the "hypotenuse" is the composite velocity(in your case, the initial velocity), and the result, "opposite" is the vertical velocty. Similar procedures are used with cos to determine the horizontal velocity. Gravity is always either -9.8 (negative, in meters) or -32 (negative, in feet). So. On a cartesion coordinate system (which is highly applicable to a monitor situation), you resolve y and x by: y = vt - 1/2gt^2 where v is the horizontal velocity as determined above, t is the elapsed time, and g is either 9.8 or 32. and: x = vt where v is the vertical velocity, and t is the elapsed time. Note that while "v" is used in both cases, each "v" represents a different velocity. If you want just the calculation, then use a loop with x as the independent variable to determine a path. was this what you needed? snortboy