Search for the spin of a sphere taking into account the vectors X, Y and Z relative to the sphere

I use Electro in Lua for some 3D simulations, and I run something mathematical / algorithmic / physical.

I'm trying to figure out how I would find the “rotation” of a sphere sphere that rotates on some axis. By "spin" I mean a vector along the axis in which the ball rotates with a magnitude relative to the speed with which it rotates. The reason I need this information is to slow down the rotation of the sphere by applying reverse torque to the sphere until it stops spinning.

The only information I have access to is the unit vectors of X, Y, and Z relative to the sphere. That is, each frame, I can call three different functions, each of which returns a unit vector pointing in the direction of the local axis X, Y and Z of the sphere’s sphere, respectively. I can track how each of them changes, essentially storing the “previous” value of each vector and comparing it with the “new” value of each frame. The question is how to use this information to determine the spin of a sphere? I'm at a dead end.

Any help would be great. Thanks!

+3
source share
2 answers

My first answer was wrong. This is my edited answer.

X, Y, Z , 3x3:

A = [[x1 y1 z1],
     [x2 y2 z2],
     [x3 y3 z3]]

X, Y, Z , A .

A - ! , = (1,0,0) x, A i = X, A X. , y Y z Z.

A (DCM).

, DCM

theta = arccos((A_11 + A_22 + A_33 - 1)/2)

theta - .

angular, | w |

w = d(theta)/dt ~= (theta(t+dt)-theta(t)) / dt

= (e1, e2, e3),

e1 = (A_32 - A_23)/(2 sin(theta))
e2 = (A_13 - A_31)/(2 sin(theta))
e3 = (A_21 - A_12)/(2 sin(theta))
+8

~ unutbu, , , .

X- , :

deltaX1 = X2 - X1
deltaX2 = X3 - X2

( , X1 - , X 1, .)

- , .

. - , , :

dx1 = deltaX1/|deltaX1|
dx2 = deltax2/|deltaX2|
costheta = dx1.dx2
theta = acos(costheta)
w = theta/dt

(X, Y Z), .

0

Source: https://habr.com/ru/post/1722840/


All Articles