Sign up ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free.

I'm trying to build a ballistics simulation where I shoot a cannonball. I want to allow for drag and am trying to work out the math to do so.

I can work the drag out using $F = C_d\times S\times V^2\times A/2$.

What I need to know is how to find the $x$ and $y$ parts of that. I use $V\cos(A)$ and $V\sin(A)$ to work out the $x$ and $y$ velocities. Can I just use this to find the $x$ and $y$ drag too?

share|cite|improve this question
Yes, but remember that drag is in opposite direction of velocity. – Pygmalion Jun 5 '12 at 10:37
Right now I would suggest editing your question and defining your variables, and maybe specify what part of this you're having trouble with a little better. I'm looking at terms like $cos(A)$ and really wondering what's going on. Is that area? Is that an angle? We need to see what you're thinking better. – Alan Rominger Jun 5 '12 at 13:52
Quadratic drag was also considered in this Phys.SE post. – Qmechanic Sep 10 '14 at 13:02

2 Answers 2

With the drag force $$ {\bf{F}}_d = - \alpha \left|{\dot{\bf r}}\right|^2 \frac{{\dot{\bf r}}}{\left|{\dot{\bf r}}\right|} = - \alpha \left|{\dot{\bf r}}\right| {\dot{\bf r}}, $$ where $\alpha = \rho C_d A / 2$, the equation of motion for the cannonball is $$ m {\ddot{\bf r}} = - m g \ {\hat{\bf y}} + {\bf{F}}_d = - m g \ {\hat{\bf y}} - \alpha \left|{\dot{\bf r}}\right| {\dot{\bf r}}, $$ or $$ \begin{align} {\ddot{x}} &= f_x\left({\dot x}, {\dot y}\right) = - \beta {\dot{x}} \sqrt{{\dot x}^2+{\dot y}^2} \\ {\ddot{y}} &= f_y\left({\dot x}, {\dot y}\right) = - g - \beta {\dot{y}} \sqrt{{\dot x}^2+{\dot y}^2} \end{align} $$ where $\beta = \alpha / m = \rho C_d A / 2 m$.

Given initial conditions $x\left(0\right)$, $y\left(0\right)$, ${\dot x}\left(0\right)$, and ${\dot{y}}\left(0\right)$, you can then numerically integrate the system of equations ${\ddot{x}} = f_x\left({\dot x}, {\dot y}\right) $, ${\ddot{y}} = f_y\left({\dot x}, {\dot y}\right)$.

share|cite|improve this answer

I am assuming you are plotting the path by incrementation.

At any given moment, you have the force (in newtons) due to gravity (m * g)

Calculate the drag force (which is opposite to the direction of motion) and add or

subtract the vertical component of the drag force (depending wether the ball is rising

or falling) to the gravity force.

Now you have the horizontal and vertical forces acting on the cannonball, install an

incremental value for time for your impulse calcs, calculate the velocity change in both

x and y directions and distance covered in the x and y directions using newtons classic


so at the end of each time increment, you have a new x and y for velocity and position.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.