-2
$\begingroup$

Here is an attached scheme which i want to write my own custom wall reflection method to simulate the ball collision having right (or left, or top/back) spin. Scheme

As an example, i have created wall node and ball node having left spin, in sceneKit to get linear Velocity and Angular Velocity values from its simulation. As it is seen that after ball collides to wall, there is a loss on Angular Velocity, and this loss is transferred as increase the x value of the linear velocity. (based on spin effect)

In my custom simulation, after Ball hit to wall, how can i calculate the accurate angular velocity (especially the amount of loss) and based on this, i want to decide the proper linear velocity, to provide accurate angle to the ball after hitting to wall (caused by the spin).

Or, if any other approach, i would greatly appreciate. Finally, this approach should work fine in left/right spin, top/backspin of the ball.

Thanks for your support…

$\endgroup$
2
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because it is specific to the use of a software. $\endgroup$ Commented Sep 22, 2018 at 12:49
  • $\begingroup$ No this is completely physical issue, and after i have received LonelyProf answer, it has helped me to solve it. $\endgroup$
    – Sunrise17
    Commented Sep 22, 2018 at 12:52

1 Answer 1

0
$\begingroup$

Inevitably, for a physically accurate representation of this kind of collision, there will be some vector equations. I'm going to have to assume that you know a bit of mechanics.

Firstly, the spherical ball is characterized by three parameters: its radius $R$, its mass $m$, and its moment of inertia $I$. You have some choice here depending on how you imagine the mass is distributed in the sphere:

  • Concentrated in a thin spherical shell on the outer surface: $I=2mR^2/3$
  • Uniformly distributed throughout the sphere: $I=2mR^2/5$
  • Concentrated near the centre: $I=$ as small as you like, down to zero (although that limit would be somewhat unphysical).

This choice will affect the amount of change in angular momentum that is generated by the collision. It is convenient to define a loading factor $\kappa=I/mR^2$ which will appear in the following equations: from the above values of $I$, you could choose any positive value $\kappa\leq 2/3$ to represent a physically realistic scenario.

Next, the effect of the wall will be to exert an impulsive (i.e. instantaneous) force on the sphere at the point of contact. Let the impulse be $\mathbf{C}$. If the velocity of the centre of the sphere is $\mathbf{v}$ before the collision, and $\mathbf{v}'$ afterwards, and its angular velocity about its centre is $\boldsymbol{\omega}$ before, and $\boldsymbol{\omega}'$ afterwards, then $$ m\mathbf{v}' = m\mathbf{v} + \mathbf{C} \qquad I\boldsymbol{\omega}' = I\boldsymbol{\omega} - R\mathbf{n}\times\mathbf{C} $$ where $\mathbf{n}$ is a unit vector normal to the wall, pointing towards the centre of the sphere, and $\times$ means vector product (cross product). These equations express the fact that the impulse changes the linear momentum and the angular momentum of the sphere in a consistent way.

The impulse $\mathbf{C}$ may be worked out, if we know the velocity of the point on the surface of the sphere at the moment of contact. This is given by $$ \mathbf{g}=\mathbf{v}-R\boldsymbol{\omega}\times\mathbf{n}, $$ and we need to resolve this into a component parallel to $\mathbf{n}$ and a perpendicular component $$ \mathbf{g}_{\parallel} = (\mathbf{g}\cdot\mathbf{n})\mathbf{n}, \qquad \mathbf{g}_{\perp}= \mathbf{g} - \mathbf{g}_{\parallel} $$ Finally, we can write $\mathbf{C}=\mathbf{C}_{\parallel}+\mathbf{C}_{\perp}$ where $$ \mathbf{C}_{\parallel} = -2m \mathbf{g}_{\parallel}, \qquad \mathbf{C}_{\perp} = -2m \frac{\kappa}{\kappa+1} \mathbf{g}_{\perp} $$ I haven't given all the details of where these two equations come from. Basically, they conserve the kinetic energy of the sphere, and they reverse the velocity of the point of contact, which is the so-called rough collision condition. (An alternative is the smooth collision condition, which has the same $\mathbf{C}_{\parallel}$, but $\mathbf{C}_{\perp}=0$: this will have no effect on the angular velocity at all).

So the above scheme allows you to calculate the velocity and angular velocity after the collision, from a knowledge of the values before the collision, and a specification of the geometry and the parameters characterizing the sphere. The equations are not completely trivial, but they do cover all the cases you asked for in your question.

$\endgroup$
6
  • $\begingroup$ Dear Sir, First of all, thanks for your informative answer. It is fully guiding me. I will ask one more thing about calculating g (g=v−Rω×n). My angular velocity has 4 parameters link, How can i get angular velocity into equation ( g=v−Rω×n) to calculate g? Because, v has three parameters, and (Rω×n) will have 4 parameters. Here i am a bit confusing. I will be glad if you only let me know about the calculation of this point (for ex: with my before hit velocities).Thanks for your guidance, Kind Regards. $\endgroup$
    – Sunrise17
    Commented Sep 20, 2018 at 14:38
  • $\begingroup$ As far as the physics is concerned, the angular velocity (in 3D) is a three-component vector $\boldsymbol{\omega}=(\omega_x,\omega_y,\omega_z)$. You will have to check how this is represented in your particular software package. My only guess is that it might be stored as a unit vector giving the direction (axis) and a fourth component giving the magnitude. But it's just a guess. You will also have to work out how to implement the vector cross product in your software. These software issues are "off topic" on Physics StackExchange. $\endgroup$
    – user197851
    Commented Sep 20, 2018 at 14:59
  • $\begingroup$ Yes Sir, it is presented in unit vector type, i think that after i have multiply every parameter (x,y,z) with ω will solve the issue and I will go on calculation. Thanks again for your clarification. $\endgroup$
    – Sunrise17
    Commented Sep 20, 2018 at 15:03
  • $\begingroup$ I have considered that unit normal vector (n) produced by the normalization of the "Before Hit Velocity Vector". let beforeHitVelocityVector = SCNVector3(x: 0.015423682, y: 1165.5955, z: 0.005252838) and it is resulted as follows let unitNormalizedVector = simd_normalize(beforeHitVelocityVector) print(unitNormalizedVector) -> float3(1.3232448e-05, 1.0, 4.5065703e-06) I think i can use this vector as the unit normal vector (n), right? $\endgroup$
    – Sunrise17
    Commented Sep 20, 2018 at 17:06
  • $\begingroup$ The vector $\mathbf{n}$ is a unit vector normal to the wall with which the sphere is colliding. It is specified by the geometry of your system. It has nothing to do with the particle velocity. Also, anything to do with your code is "off topic" here, we just answer questions concerning the Physics: that's what I tried to do, in any case. $\endgroup$
    – user197851
    Commented Sep 20, 2018 at 17:10

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