Parabolic Projectile Trajectory

  • Context: Undergrad 
  • Thread starter Thread starter rcrumb
  • Start date Start date
  • Tags Tags
    Projectile Trajectory
Click For Summary

Discussion Overview

The discussion revolves around calculating the trajectory of a cannonball in a video game environment, specifically focusing on how to determine the necessary rotation, velocity, and gravitational effects to hit a target at a specified coordinate. The context includes considerations of projectile motion without wind resistance and the implications of a fixed launch angle.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about the feasibility of calculating the trajectory to hit a target from a specific coordinate, questioning if exact hits are possible or if only approximate hits can be achieved.
  • Another participant asserts that the calculation is possible and suggests neglecting wind resistance for the game.
  • Further clarification is sought regarding the rotation of the cannon to aim at different targets, with one participant emphasizing that rotation should not affect the calculations if air resistance is ignored.
  • There is a discussion about the physics of rotation and its relevance to the cannon's aim, with one participant proposing a hypothetical scenario where rotation could exert a force on the cannonball.
  • Participants discuss kinematic equations, with one providing a specific equation for distance and emphasizing the need to separate calculations into x, y, and z components.
  • One participant notes that using the provided equation could lead to an infinite number of solutions depending on the variables chosen.

Areas of Agreement / Disagreement

Participants generally agree that the calculations for projectile motion are possible under the specified conditions, but there are differing views on the relevance of rotation and the implications of the equations discussed. The discussion remains unresolved regarding the exact application of these concepts in the context of the game.

Contextual Notes

Limitations include the assumption of no air resistance and the need to consider multiple dimensions in calculations. The discussion does not resolve how to handle the infinite solutions mentioned.

rcrumb
Messages
6
Reaction score
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
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.
 
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).
 
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?
 
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
 
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.
 
oh. yes then the equation is very solvable. you don't even have to keep your vertical angle fixed.
 
interesting, is there a specific name/equation for doing these types of calculations?
 
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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 36 ·
2
Replies
36
Views
23K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
8K