Author Topic: Calculating Trajectories  (Read 4971 times)

0 Members and 1 Guest are viewing this topic.

Offline 3rik

  • LV3 Member (Next: 100)
  • ***
  • Posts: 92
  • Rating: +8/-0
  • My TI-84+ SE
    • View Profile
Calculating Trajectories
« on: January 15, 2012, 09:51:23 pm »
I'm working on a problem that involves accurately predicting the trajectory of a ball.

To simplify things a bit let's say I have a cannon that is capable of putting backspin on the cannonball. This cannon is capable of moving anywhere on the ground. It can adjust the angle it is firing at and how fast it shoots the cannonball. How do I determine what position, angle, and speed I need to hit a target in 3D space?

While looking on the internet I found a bunch of things that involved differential equations, the Magnus Effect, and integrals.

I haven't taken high school physics yet and I am only learning beginning to learn about definite integrals in calc 1.

If there's anyone that can explain a method for finding this that doesn't involve too much advanced calculus, they would be really helpful. It may eventually be included in a program so the less symbolic stuff the better.

Thanks in advance.
« Last Edit: January 15, 2012, 09:56:30 pm by 3rik »
Userbars

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Calculating Trajectories
« Reply #1 on: January 16, 2012, 09:55:47 am »
I am going to assume that angle, speed, and vertical position are fixed, and horizontal position is variable.

zᵢ is initial height (meters),
(x, y, z) is the target position (meters),
Vᵢ is the initial velocity of the cannonball (meters per second),
ω is the angular velocity (radians per second),
θ is the angle relative to the positive x axis that the cannon is turned to, to face the target (radians),
and φ is the angle above the ground the cannon is raised to, arbitrarily (radians).

First do the z direction:
Vᵢ sin φ is the initial z velocity.
S ω Vᵢ - 9.8 m/s is the acceleration in the z direction.
Since Δd = Vᵢt + ½at²,
z - zᵢ = (Vᵢ sin φ) t + ½ (S ω Vᵢ - 9.8) t², or
½ (S ω Vᵢ - 9.8) t² + (Vᵢ sin φ) t - (z - zᵢ) = 0.
Using the quadratic formula to solve for t should give you two time values.
Which one you use depends on whether you want to hit the target on the way up or on the way down.

Once you know at what time the projectile will have the same z coordinate as the target, you can calculate how far in the x and y directions it will travel in that amount of time.
Vᵢ cos φ cos θ is the initial x velocity,
Vᵢ cos φ sin θ is the initial y velocity.
Since Δd = Vt,
Δx = (Vᵢ cos φ cos θ) t
Δy = (Vᵢ cos φ sin θ) t

So the cannon should be at (x - Δx, y - Δy, zᵢ).
« Last Edit: January 16, 2012, 09:57:36 am by jacobly »

Offline 3rik

  • LV3 Member (Next: 100)
  • ***
  • Posts: 92
  • Rating: +8/-0
  • My TI-84+ SE
    • View Profile
Re: Calculating Trajectories
« Reply #2 on: January 16, 2012, 10:20:05 am »
This kind of makes sense.

I have a few questions.

What does S stand for?

Do these factor in air resistance? (I forgot to be specific in my post)

And what if I want φ to be the variable instead of x and y?

EDIT 1: Since the Magnus force is perpendicular to the direction the ball is traveling, wouldn't it affect the x and y coordinates too?

EDIT 2: I was looking at this but I have no idea of how to put all this information together. http://rockstarscience.net/baseball/HowToHitHomeRuns.pdf (ignore the bat stuff)
« Last Edit: January 16, 2012, 11:01:18 am by 3rik »
Userbars

Offline 3rik

  • LV3 Member (Next: 100)
  • ***
  • Posts: 92
  • Rating: +8/-0
  • My TI-84+ SE
    • View Profile
Re: Calculating Trajectories
« Reply #3 on: January 17, 2012, 10:57:30 pm »
I found the 2D parametric equations for the trajectories of objects where k is the drag coefficent, V0 is the initial velocity, g is the acceleration due to gravity, θ is the angle above the ground and x0 and y0 are the starting coordinates.



To add the third dimension I know I just need to do a simple rotation but I still need to figure out the backspin part.
This is a legal double post.
Userbars

Offline 3rik

  • LV3 Member (Next: 100)
  • ***
  • Posts: 92
  • Rating: +8/-0
  • My TI-84+ SE
    • View Profile
Re: Calculating Trajectories
« Reply #4 on: January 19, 2012, 10:15:08 pm »
I found a seemingly helpful resource. It takes everything I want accounted for.  ;D
http://people.stfx.ca/smackenz/Courses/DirectedStudy/Volleyball%20Project/Kao%201994%20A%20mathematical%20model%20for%20the%20trajectory%20of%20a%20spiked%20volleyball%20and%20its%20coaching%20application.pdf

Unfortunately, I don't understand it.  :banghead:
It gives the equations for acceleration and suggests using the Runge-Kutta scheme to find the position of a ball given the starting position, the initial velocity, and some other stuff.

Otherwise, I found code for Mathmatica that is supposed to do something similar, but I don't have an extra $140 to buy Mathematica.  :(
Here's the link if someone wants to try this approach. http://www.fysik.org/WebSite/fragelada/resurser/GolfBallDynamics.pdf

This is a legal double post.
Yay! Triple Posting!
Userbars