View Full Version : math/physics question
Ok, if an object is thrown from a certain point, in a certain direction and with a certain speed and a constant set of forces accelerating it (ie. gravity, thrust, etc), how can I calculate the time that it will take for said object to intersect any given plane?
10-13-2001, 08:42 AM
s = ut + 1/2 at^2
If the acceleration is constant, and you know the initial velocity, you can calculate the displacement relative to time.
t = time
u = initial velocity
a = acceleration (gravity)
s = displacement.
OR in code way.
final_pos = pos + (velocity * time) + (0.5 * accel * (time * time));
If you know the final position, ie. intersection point, then you should be able to solve for T.
I probably should have said "calculate the time that it will take & intersection point" instead of just "calculate the time that it will take." The intersection point is unknown.
BTW, does anybody know if the position equation for a constant change in acceleration is
d = di + vi * t + 1/2 * a * t² + 1/6 * b * t³
b is change in acceleration
10-13-2001, 04:02 PM
If the plane is static, then you simply use the plane as a constraint in solving the projectile equation. (That is, by solving for the location of the intersection, you will also get the time of the intersection). Though beware you may get 0, 1, 2, or infinite intersections, especially if you are really only interested in intersecting the projectile path with a planar facet.
[This message has been edited by DFrey (edited 10-13-2001).]
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.