• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Projecting on the parabolic line

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
530
parabola.png

How to find the x, y, and z when a projectile move by m basing on the parabolic line?
Basically, if the projectile move to the green dot, what is the distance (xy) and what is the length of z?

And also, how to find the length of the arc?
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
Why do you want to know this? Arc length is very, very rarely useful for anything on a parabola.

I think you are confused about something here. Z is the height of a point L distance along the parabola, where L is given by a line in the xy plane and is the distance in the 'direction of motion' of the parabola since the 'start' of it. L is usually something you choose or you set because you are periodically moving an object by some dx and dy (in the xy plane). In the XY plane the object moves as if it's a straight line, really the Z motion is entirely uncoupled from the XY motion, so you don't need to compute XY. You use the length of XY (the distance since the start: SQRT((xf-xi)^2 + (yf-yi)^2)) to compute Z based on the characteristics parameters of your parabola (d and h in your other thread).

It's possible what you mean something about the components of the right triangle corresponding to the launch angle. Is THAT what you're trying to figure out?
 
Level 13
Joined
Mar 29, 2012
Messages
530
I'm not really good in making explanation as I'm not really fluent enough in English.

I intend to make the projectile to project with an arc motion and (let's say) it should have the actual time needed to travel as if it is moving with an arc motion, because if the projectile has only constant xy speed, projectiles moving with arc motion and without arc motion will just arrive to the target at the same time. So I think the real distance the projectile should travel is the arc length.
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
I'm not really good in making explanation as I'm not really fluent enough in English.
Fair. I'm using some physics words here so this may or may not be intelligible to you:

The extremely non-intuitive thing about this is that in real life a projectile in an arc has constant XY speed as long as there is no air resistance (drag). Its horizontal velocity stays the same throughout the whole arc, but its vertical velocity changes. Here is a short video demonstrating this principle in action. Now, it is true that if you're shooting, say, an arrow at different angles then the angle you choose does have an effect on the horizontal velocity. The arrow's total velocity stays the same but different fractions of it are vertical (v_z in your case) or horizontal (v_xy in your case). By aiming up you reduce the horizontal velocity, thus increasing the time the arrow takes to reach its target. Skipping all of the physics and math, you eventually end up with the following:
  • v_z, the vertical component of the velocity at the launch of the projectile: v_z = Sqrt(2*g*H)
  • v_xy, the horizontal component of the velocity satisfies this equation (pythagorean theorem) v_total^2 = v_xy^2 + v_z^2
  • t_m, the time to get to the midpoint (highest point of the parabola): t_m = v_z/g

  • H is the height of the parabola you chose before (other thread)
  • g is really just a constant that will alter the 'shape' of your parabolas; this is actually the strength of gravity in your map, and you will have to choose a value of g
  • t_m might be useful in helping you decide what g should be, or you can ignore it
  • v_total is the 'base' velocity for the projectile you're shooting; how fast it would travel in a straight line, which will likely be different for different projectiles
Use 4-7 above to solve for 1-2 above. Once you have v_xy you'll use that to move along the parabola and compute the z height like before.
 
Status
Not open for further replies.
Top