- #1
xal
- 1
- 0
I'd like to calculate the angle to shoot a projectile from a cannon in order to hit a target. However, the position that the projectile will be exiting from will not be at 0, 0 -- it will vary according to the angle of the cannon itself. The projectile will be exiting from the tip of the cannon, but the cannon will be rotated about a different point (both points, as well as the target position, will be on the same plane though).
If the projectile was exiting from 0, 0, then I could use this:
[tex]\tan \left( \theta \right) ={\frac {{{\it v0}}^{2}+\mbox {{\tt `\&+-`}
} \left( \sqrt {{{\it v0}}^{4}-{g}^{2}{x}^{2}-2\,gy{{\it v0}}^{2}}
\right) }{gx}}
[/tex]
However, in this case, I was considering replacing [tex]x[/tex] and [tex]y[/tex] with [tex]x-l\cos \left( \theta \right)[/tex] and [tex]y-l\sin \left( \theta \right) [/tex] respectively, where [tex]l[/tex] would be the distance away the tip.
That results in this:
[tex]\tan \left( \theta \right) ={\frac {{{\it v0}}^{2}+\sqrt {{{\it v0}}^{
4}-g \left( g \left( x-l\cos \left( \theta \right) \right) ^{2}+2\,
\left( y-l\sin \left( \theta \right) \right) {{\it v0}}^{2} \right)
}}{g \left( x-l\cos \left( \theta \right) \right) }}
[/tex]
Different form:
[tex]-1/2\,{\frac {g \left( x-l\cos \left( \theta \right) \right) ^{2}
\left( \tan \left( \theta \right) \right) ^{2}}{{v}^{2}}}+x\tan
\left( \theta \right) -1/2\,{\frac {g \left( x-l\cos \left( \theta
\right) \right) ^{2}}{{v}^{2}}}-y+l\sin \left( \theta \right) =0
[/tex]
But I am not sure if this is a way to do it, and I am not sure to go about solving for the angle either.
If the projectile was exiting from 0, 0, then I could use this:
[tex]\tan \left( \theta \right) ={\frac {{{\it v0}}^{2}+\mbox {{\tt `\&+-`}
} \left( \sqrt {{{\it v0}}^{4}-{g}^{2}{x}^{2}-2\,gy{{\it v0}}^{2}}
\right) }{gx}}
[/tex]
However, in this case, I was considering replacing [tex]x[/tex] and [tex]y[/tex] with [tex]x-l\cos \left( \theta \right)[/tex] and [tex]y-l\sin \left( \theta \right) [/tex] respectively, where [tex]l[/tex] would be the distance away the tip.
That results in this:
[tex]\tan \left( \theta \right) ={\frac {{{\it v0}}^{2}+\sqrt {{{\it v0}}^{
4}-g \left( g \left( x-l\cos \left( \theta \right) \right) ^{2}+2\,
\left( y-l\sin \left( \theta \right) \right) {{\it v0}}^{2} \right)
}}{g \left( x-l\cos \left( \theta \right) \right) }}
[/tex]
Different form:
[tex]-1/2\,{\frac {g \left( x-l\cos \left( \theta \right) \right) ^{2}
\left( \tan \left( \theta \right) \right) ^{2}}{{v}^{2}}}+x\tan
\left( \theta \right) -1/2\,{\frac {g \left( x-l\cos \left( \theta
\right) \right) ^{2}}{{v}^{2}}}-y+l\sin \left( \theta \right) =0
[/tex]
But I am not sure if this is a way to do it, and I am not sure to go about solving for the angle either.