I am having trouble in writing the code.
I need the code:
1.Calculate the trajectory of a projectile, both without and with an air-friction function term that depends on v. Explore the dependence of the range on various variables.
2. Add a variable amount of v2 air friction to the force.
3. Change the problem to a three-dimensional baseball problem, adding the magnus force term for a ball with angular velocity pointing in the y (away from the earth) direction. Plot 2-d projections of the trajectories