3d parabola (projectile motion) to hit a target on an arbitrary plane

Click For Summary

Discussion Overview

The discussion revolves around calculating the trajectory of a projectile in 3D space to hit a specific target on an arbitrary plane. Participants explore the mathematical modeling of projectile motion, including the effects of gravity and the necessary rotations to achieve the desired path.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their current method for calculating a parabolic trajectory that hits a target on a plane perpendicular to the XZ plane, using specific input values for launch point, target point, initial velocity, and gravity.
  • Another participant suggests using a rotation matrix to achieve the desired trajectory, explaining how to construct the rotation matrix based on the angle and axis of rotation.
  • A later reply indicates that the proposed rotation does not yield the desired result, as it causes the entire parabola to rotate rather than keeping the start and target points fixed.
  • Some participants argue that with fixed initial conditions (cannon position, target position, gravity, and initial velocity), there are only two possible trajectories that can hit the target, both lying in the same plane.
  • Another participant expresses a desire to achieve a specific trajectory shape, indicating that they are open to using rotation or projection methods but are struggling with the implementation.
  • One participant mentions that introducing additional forces may alter the nature of the trajectory, potentially making it no longer parabolic.
  • Another participant emphasizes the need to specify how the projectile would return to the target if additional forces are applied, as gravity alone does not allow for lateral movement back to the target.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility of achieving the desired trajectory shape while maintaining fixed start and target points. There is no consensus on the correct approach to implement the necessary rotations or additional forces.

Contextual Notes

Some participants note that the mathematical steps and assumptions involved in the calculations may not be fully resolved, particularly regarding the application of rotation matrices and the effects of additional forces on the projectile's trajectory.

  • #31
Ok, I'm just going through your explicit calculation but I noticed I misunderstood you at the start concering the coordinates.
My projectile goes from (0,0,0) to (xt,0,zt)
Yours goes from (x1,y1,z1) to (x2,y2,z2) and after your redefinition (0, 0,0) to (xp, yt,0).
 
Physics news on Phys.org
  • #32
betel said:
Ok, I'm just going through your explicit calculation but I noticed I misunderstood you at the start concering the coordinates.
My projectile goes from (0,0,0) to (xt,0,zt)
Yours goes from (x1,y1,z1) to (x2,y2,z2) and after your redefinition (0, 0,0) to (xp, yt,0).

well actually i think is more something like

(x1,y1) to (xp, yp) where yp = yt anyway, is xp that changes as a "proportion" of x2 and z2

to have everything in a way that works in 3D
 
  • #33
My idea was wrong. Easy to check in the even leveled case.

Yours seems to be correct though. Just solve the quadratic for v^2 and then do the square root again and you get.

v= \sqrt{g(y_p-y_0+\sqrt{(y_0-y_p)^2+x_p^2})}

You would have really made your life much more easy if you had chosen (0,0,0) as the start and zt=0. It is much faster to later transform the coordinate system.
 
Last edited:
  • #34
Arioch82 said:
Hi Petr and thank you for your reply.

unfortunately I've already tried that one and it doesn't give me the desired result.

If you see the new screenshot attached to this post you can notice that in that way (well I'm using quaternions instead of a matrix but it should be the same) the all parabola rotates around the axis while a need the start (point with the axis displayed) and the goal (green sphere at the end of the cyan line) to be fixed so that i can launch my projectile from my start point to hit a specific target as like an "effect/curl" is applied to the parabola.

in the screenshot I'm applying a rotation around the cyan axis, I've also tried around the magenta one (direction on the XZ plane) with similar result.
The first red segment from the start point to the start of the parabola is displayed only because I'm assuming that the start point is always the first point (t=0)

Ok, so you want to rotate the parabola taking initial and final points fixed. This should be the solution:

1) the direction of the rotation must be the one connecting the initial and final points:

\mathbf{n}=\frac{\mathbf{x}_f-\mathbf{x}_i}{|\mathbf{x}_f-\mathbf{x}_i|}

2) use this n and the angle you want, to construct the rotation R, like I said in my previous post, or with quaternions if you like.

3) Don't just do a linear rotation

\mathbf{x}'=R\mathbf{x}

but do instead an affine rotation

\mathbf{x}'=\mathbf{x}_i+R(\mathbf{x}-\mathbf{x}_i)

EDIT: oops I saw too late that the thread went on for 3 pages, and that the solution was already there...
 
  • #35
betel said:
My idea was wrong. Easy to check in the even leveled case.

Yours seems to be correct though. Just solve the quadratic for v^2 and then do the square root again and you get.

v= \sqrt{g(y_p-y_0+\sqrt{(y_0-y_p)^2+x_p^2})}

You would have really made your life much more easy if you had chosen (0,0,0) as the start and zt=0. It is much faster to later transform the coordinate system.

Thank you betel, that works perfectly, I know that with (0,0,0) my life would be much easier but know I've got a general system to target a point from everywhere.

Thanks to Petr too!

I've also found out that my quaternion wasn't working because I wasn't applying an affine rotation but a linear one.
Using the affine it works great with quaternions too (as it should obviously be) :)

Thank you guys for your help, really, everything works just fine now!
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
92
Views
5K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K