I would like to produce a program that can take in a 2D velocity vector, a projectile's mass (projectile should be modelled as a particle in that all of the mass is concentrated at a single point, although ideally I would like to take into account air resistance so I'm not exactly sure what you call it), it's starting point and will then output a function which is the route it takes in motion.
It should take into account air resistance.
My idea was that you could continuously compute the horizontal and vertical positions of the ball as a function of time, start point, starting velocities and the mass of the projectile. Assuming we are starting at point (0, 0), I want a function f(t, x, y, h, v, m) that will return xt and yt. Where t is the current time, x is the starting x point, y is the starting y point, h is initial the horizontal velocity, v is the initial vertical velocity (both in m/s 2) and m is the mass. xt is the x coordinate at time t, and yt is the y coordinate at time t. It will keep running until yt = 0.
Assuming you can calculate tf (time at which the sphere hits the ground), I would think you could generate a list of coordinates by doing what I described above every k seconds until n * k reaches a point where (n + 1) * k would be > tf, and so instead you calculate it for tf and end the program.
I'm just not sure exactly what function this would be, and also if this is the best method?
EDIT: It makes more sense to model it as a circle. But then you also need to take into account its radius?