projectile motion
Is there any 3d projectile motion pseduocode available that gives user to input velocity acceleration and elevation angle?
if you have a net velocity V, then just split it up into components:
vx = V * cos(phi) * cos(theta)
vy = V * sin(phi)
vz = V * cos(phi) * sin(theta)
Where theta is the direction that you're aiming about the plane and phi is the elevation from the plane.
vx = V * cos(phi) * cos(theta)
vy = V * sin(phi)
vz = V * cos(phi) * sin(theta)
Where theta is the direction that you're aiming about the plane and phi is the elevation from the plane.
vx = V * cos(phi) * cos(theta)
vy = V * sin(phi)
vz = V * cos(phi) * sin(theta)
shouldn't it be
vx = V * cos(phi) * cos(theta)
vy = V * cos(phi) * sin(theta)
vz = V * sin(phi)
?
In the timestep area, I just have to add acceleration to velocity and then velocity to position right? for the z axis, what would be the standardised form of gravity equation?
You may be interested in the video tutorial that I created here:
http://www.marek-knows.com/downloadSection.php?Topic=Physics&pg=1#Physics10
http://www.marek-knows.com/downloadSection.php?Topic=Physics&pg=1#Physics10
Those forumas depend on what axis you consider to be "up" so whats right just depends ony our implementation. Some use y, soem use z so both are right.
velocity += acceleration
velocity += gravity
position += velocity
should give you the typical balistic path.
velocity += acceleration
velocity += gravity
position += velocity
should give you the typical balistic path.
Quote:Original post by mmakrzem
You may be interested in the video tutorial that I created here:
http://www.marek-knows.com/downloadSection.php?Topic=Physics&pg=1#Physics10
Marek, every time you recommend people to download your tutorials, you also recommend to register up on your site and possibly pay money to you, for knowledge that is available in a much more comprehensive way in the internet or at public libraries. You probably know that yourself, and presumably based your videos on exactly such public and free information, right?
For example, this and those have a ton of valuable information and background knowledge about trajectories.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement