I am trying to make a simple 2D physics engine with circles and capsules. So far, I have been able to resolve the velocities of circular bodies after a collision, but I wish to create events like a curve ball or a rolling wheel.
So far, I have a method for calculating the new value for the normal component of each body in a collision, but I am unsure how to calculate the resulting angular and tangential velocities.
Collision resolution (without rotation) $$ \begin{array}{l} v=\ velocity\ of\ Circle\ A\\ u\ =\ velocity\ of\ Circle\ B \end{array}$$
Conservation of Kinetic Energy: $$\frac{1}{2} m_{A} v_{normal\ ( before)}^{2} +\frac{1}{2} m_{B} u_{normal\ ( before)}^{2} =\frac{1}{2} m_{A} v_{normal\ ( after)}^{2} +\frac{1}{2} m_{B} u_{normal\ ( after)}^{2}$$
Conservation of Momentum $$m_{A} v_{normal\ ( before)} +m_{B} u_{normal\ ( before)} =m_{A} v_{normal\ ( after)} +m_{B} u_{normal\ ( after)}$$
Formula for resulting velocities in the RHS: $$ \begin{array}{l} v_{normal\ ( after) \ =\ \frac{v_{normal\ ( before)}( m_{A} -\ m_{B}) +2m_{B} u_{normal\ ( before)}}{m_{A} +\ m_{B}}}\\ u_{normal\ ( after) \ =\ \frac{u_{normal\ ( before)}( m_{B} -\ m_{A}) +2m_{A} v_{normal\ ( before)}}{m_{A} +\ m_{B}}} \end{array}$$
The normal parts are calculated according to the formula above while the tangential part of the velocity is unchanged. This means that the effect of a curve/spin ball cannot be achieved.
This is my take on resolving the tangential component of the bodies' velocities after collision, along with their normal component.
Collision resolution (with rotation)
By definition, $$ \begin{array}{l} v_{angular} =\frac{v_{tangent}}{r}\\ E_{rotational\ KE} =\frac{1}{2} Iv_{angular}^{2}\\ \ \ \ \ \ \ \ \ \ \ \ \ \ =\frac{1}{2}\left(\frac{1}{2} mr^{2}\right)\left(\frac{v_{tangent}}{r}\right)^{2} \tag{rotational inertia of disc}\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ \frac{1}{4} mv_{tangent}^{2}\\ P_{angular\ momentum} \ =\ I\left(\frac{v_{tangent}}{r}\right)\\ \ \ \ \ \ \ \ \ =\ \frac{1}{2} mrv_{tangent} \end{array}$$
Therefore, Kinetic Energy of Circular body A is: $$\frac{1}{2} m\left( v_{normal}^{2} +\frac{1}{2} v_{tangent}^{2}\right)$$
Conservation of Kinetic Energy: $$ \begin{array}{l} \frac{1}{2} m_{1}\left( v_{normal\ ( before)}^{2} +\frac{1}{2} v_{tangent\ ( before)}^{2}\right) +\frac{1}{2} m_{2}\left( u_{normal\ ( before)}^{2} +\frac{1}{2} u_{tangent\ ( before)}^{2}\right)\\ =\ \frac{1}{2} m_{1}\left( v_{normal\ ( after)}^{2} +\frac{1}{2} v_{tangent\ ( after)}^{2}\right) +\frac{1}{2} m_{2}\left( u_{normal\ ( after)}^{2} +\frac{1}{2} u_{tangent\ ( after)}^{2}\right) \end{array}$$
Conservation of Momentum: $$ \begin{array}{l} m_{1}\left( v_{normal\ ( before)} +\frac{r_{A}}{2} v_{tangent\ ( before)}\right) +m_{2}\left( u_{normal\ ( before)} +\frac{r_{B}}{2} u_{tangent\ ( before)}\right)\\ m_{1}\left( v_{normal\ ( after)} +\frac{r_{A}}{2} v_{tangent\ ( after)}\right) +m_{2}\left( u_{normal\ ( after)} +\frac{r_{B}}{2} u_{tangent\ ( after)}\right) \end{array}$$
There seems to be no way to isolate out the velocities in the RHS of the equations and calculate them individually. I am not sure if this is even the right way, as I am not sure if the two tangential velocities (one is the tangent component of the velocity vector, the other is the angular velocity times its radius) can be resolved together.
It would be helpful to point me towards some resources as what I see online only discuss about the rotations of polygons. Thanks!