Skip to main content
typo
Source Link
falstro
  • 1.3k
  • 1
  • 9
  • 14

If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the Magnus Effect. The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.

Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this

F = k * (w x v)

Where F is force, w should actually be an omega and is the rotation vector, x is just a cross-product operator, and v is the current velocity of the ball. k is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.

The v vector is pretty straight forward, just the direction and speed of the ball. w (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.

In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero all but one of the components (like z) to reduce the formula.

Also remember Newton, F = m*a, but again, the k is arbitrary, so we can just bake the mass into it, making a = k * (w x v). Where a is the acceleration (vector).

Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.

w = s*ẑ, v = (vx, vy), a = (ax, ay)

here I've used s as the spin (rate of rotation, positive being counter clockwise, denotes the unit vector in the z-direction).

ax = -k*s*vy
ay = k*s*vx

Long rant for a simple formula, hope it helps. :)

Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D.

If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the Magnus Effect. The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.

Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this

F = k * (w x v)

Where F is force, w should actually be an omega and is the rotation vector, x is just a cross-product operator, and v is the current velocity of the ball. k is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.

The v vector is pretty straight forward, just the direction and speed of the ball. w (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.

In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero one of the components (like z) to reduce the formula.

Also remember Newton, F = m*a, but again, the k is arbitrary, so we can just bake the mass into it, making a = k * (w x v). Where a is the acceleration (vector).

Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.

w = s*ẑ, v = (vx, vy), a = (ax, ay)

here I've used s as the spin (rate of rotation, positive being counter clockwise, denotes the unit vector in the z-direction).

ax = -k*s*vy
ay = k*s*vx

Long rant for a simple formula, hope it helps. :)

Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D.

If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the Magnus Effect. The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.

Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this

F = k * (w x v)

Where F is force, w should actually be an omega and is the rotation vector, x is just a cross-product operator, and v is the current velocity of the ball. k is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.

The v vector is pretty straight forward, just the direction and speed of the ball. w (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.

In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero all but one of the components (like z) to reduce the formula.

Also remember Newton, F = m*a, but again, the k is arbitrary, so we can just bake the mass into it, making a = k * (w x v). Where a is the acceleration (vector).

Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.

w = s*ẑ, v = (vx, vy), a = (ax, ay)

here I've used s as the spin (rate of rotation, positive being counter clockwise, denotes the unit vector in the z-direction).

ax = -k*s*vy
ay = k*s*vx

Long rant for a simple formula, hope it helps. :)

Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D.

Source Link
falstro
  • 1.3k
  • 1
  • 9
  • 14

If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the Magnus Effect. The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.

Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this

F = k * (w x v)

Where F is force, w should actually be an omega and is the rotation vector, x is just a cross-product operator, and v is the current velocity of the ball. k is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.

The v vector is pretty straight forward, just the direction and speed of the ball. w (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.

In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero one of the components (like z) to reduce the formula.

Also remember Newton, F = m*a, but again, the k is arbitrary, so we can just bake the mass into it, making a = k * (w x v). Where a is the acceleration (vector).

Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.

w = s*ẑ, v = (vx, vy), a = (ax, ay)

here I've used s as the spin (rate of rotation, positive being counter clockwise, denotes the unit vector in the z-direction).

ax = -k*s*vy
ay = k*s*vx

Long rant for a simple formula, hope it helps. :)

Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D.