1

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?

F J
  • 47
  • $d=v_it+{1\over2}at^2$ –  Oct 23 '19 at 14:10
  • @RoddyMacPhee That is not what I am looking for. – F J Oct 23 '19 at 14:14
  • 1
    First of all, it makes no sense for a point mass to be affected by air resistance. I don't see why you would care anyway since classical forces essentially act on the center of mass of an object anyway. But, for an arbitrary figure, this motion while is resolvable by hand is complex enough to be left to be done by the computers. Approximating (or assuming) the object to be a sphere makes it way better, but someone with a larger attention span than me will have to write it out. – Certainly not a dog Oct 23 '19 at 14:38
  • @Certainlynotadog Do you mean a circle instead of a sphere? – F J Oct 23 '19 at 14:50
  • I mean the object being a sphere @FJ – Certainly not a dog Oct 23 '19 at 14:57
  • @Certainlynotadog I was asking about 2D modelling – F J Oct 23 '19 at 14:58
  • That would still be better than an arbitrary shape. – Certainly not a dog Oct 23 '19 at 14:59
  • @Certainlynotadog How is a circle arbitrary? – F J Oct 23 '19 at 15:00
  • Er, when did I say that? I meant to convey that a circle would be easier to build a function for than a general/arbitrary shape. (which is obvious) – Certainly not a dog Oct 23 '19 at 15:15
  • then what you look for isn't useful. –  Oct 23 '19 at 15:40
  • @Certainlynotadog I asked if you meant a circle, and you suggested a 3D shape....... – F J Oct 23 '19 at 15:43
  • @RoddyMacPhee I don't know why you commented a single formula and expected it to help. It may make up part of the solution but clearly isn't a full solution. – F J Oct 23 '19 at 15:43
  • it is if you know what it means, it's the distance under acceleration formula. –  Oct 23 '19 at 15:52
  • @RoddyMacPhee Again, I know what it is but that alone doesn't come close to solving the problem. – F J Oct 23 '19 at 16:06
  • apply it to each leg of the separation of forces ... you get a path... –  Oct 23 '19 at 16:23
  • @RoddyMacPhee “It should take into account air resistance.” The formula in your original comment doesn’t. – amd Oct 23 '19 at 19:52
  • a is acceleration, just add acceleration terms ... –  Oct 23 '19 at 20:13
  • @RoddyMacPhee “Just add acceleration terms” doesn’t work with that formula unless those accelerations are constant. Air resistance is typically modeled as being proportional to velocity (for low speeds) or proportional to the square of the velocity, neither of which is constant. – amd Oct 24 '19 at 06:27
  • add one for each acceleration ... also you can use average accelerati9n and get a rough answer on where it will hit ... ${1\over 2}at^2$ is average change in velocity multiplied by time... –  Oct 24 '19 at 07:37

0 Answers0