Parabolic Projectile Trajectory

In summary, In this conversation, a self-taught programmer is trying to calculate the correct rotation to hit two targets at different distances. The equation he is using is called "distance = velocity x time + 0.5 x acceleration x time²."
  • #1
rcrumb
6
0
Hi,

Im currently working on a video game, and have come to an aspect that I'm very unsure about (I'm self taught in most of my game physics knowledge, so there are quite a few gaps). Let's say there is an environment with no features that act on objects except for gravity (or simply no wind resistance). I am shooting a cannonball from a specific x,y,z coordinate, and am trying to hit another x,y,z coordinate. The cannon is going to be at a consistent angle (lets say 45 degrees). Is there an equation that i could use, where starting from one x,y,z location, i could calculate the rotation, velocity, and gravity to hit the exact other x,y,z location? Is this calculation possible, or will I always get "just very close" to the ending x,y,z location?

Thanks.
 
Physics news on Phys.org
  • #2
yes this calculation is possible. how do you want rotation and wind resistance to play a part? i suggest that since its a video game you neglect those.
 
  • #3
there will be no wind resistance. however, in terms of rotation if my canon was located at (300,200,0) and i had two targets, one at (350,250,0) and the other at (150,150,0) i was wondering if there is also a way to calculate the proper rotation to hit each target (one at a time).
 
  • #4
what do you mean proper rotation. the only part rotation has to play is friction with the air. and if you are saying there is already no air resistance what does your rotation matter?
 
  • #5
If for the purposes of your game you want to say that a spin of 1 revolution per second causes a force of 1 Newton in a direction perpendicular to the motion of the cannon ball that is fine, but not consistent with your physics
 
  • #6
oh sorry. i meant rotation of the canon itself (as if it were on a 360 degree swivel), so that it will point directly towards the next target. the ball will always follow a straight path to the target.
 
  • #7
oh. yes then the equation is very solvable. you don't even have to keep your vertical angle fixed.
 
  • #8
interesting, is there a specific name/equation for doing these types of calculations?
 
  • #9
yeah they are all kinemetics equations.

distance = velocity x time + 0.5 x acceleration x time² is one i might start with.
how much physics background do you have?
 
  • #10
not much, I've studied and programmed velocity, acceleration, and gravitational force before, but that's about it.

in the distance equation, what does the 0.5 represent?
 
  • #11
thats a good question. i believe it is there because it is the time integral of at
 
  • #12
but with that equation that i gave you, you have to be sure to split up all of your calculations into x direction y direction and z direction. so if you shoot a cannonball at 45 degrees in the air and you want to figure out the distance it will travel in the x direction, you will need to use the initial speed in the x direction. so it would be vsin45.
 
  • #13
Also if you make all of those variables, you will have an infinite amount of solutions.
 
  • #14
very cool! thanks for all the help dacruick.
 

What is a parabolic projectile trajectory?

A parabolic projectile trajectory is a curved path that an object follows when it is thrown or launched into the air at an angle. This type of motion is called projectile motion and is governed by the laws of physics.

What factors affect the trajectory of a parabolic projectile?

The trajectory of a parabolic projectile is affected by several factors including the initial velocity, launch angle, and air resistance. Other factors such as gravity, wind, and the shape of the object can also play a role in determining the trajectory.

What is the equation for calculating the trajectory of a parabolic projectile?

The equation for calculating the trajectory of a parabolic projectile is y = xtanθ - (gx^2)/(2v2cos2θ), where y is the vertical position, x is the horizontal position, θ is the launch angle, g is the acceleration due to gravity, and v is the initial velocity.

Can a parabolic projectile have a horizontal trajectory?

Yes, a parabolic projectile can have a horizontal trajectory if it is launched at a 0 degree angle. In this case, the object will travel horizontally without any vertical displacement.

How does air resistance affect the trajectory of a parabolic projectile?

Air resistance, also known as drag, can affect the trajectory of a parabolic projectile by slowing down the object and altering its path. This is because air resistance acts in the opposite direction of the movement of the object, causing it to deviate from its original trajectory and fall to the ground faster.

Similar threads

Replies
2
Views
759
Replies
4
Views
864
Replies
1
Views
791
Replies
4
Views
1K
Replies
36
Views
20K
Replies
9
Views
2K
Replies
6
Views
725
Replies
3
Views
4K
Replies
3
Views
404
Replies
4
Views
7K
Back
Top