Skip to content

Development of a procedurally generated animation of the anti-twister mechanism to demonstrate its connection to Spin(3).

License

Notifications You must be signed in to change notification settings

amirleidel/spinny

Repository files navigation

Introduction

Procedurally generated animation of the anti-twister mechanism and its connection to Spin(3). Also known as Dirac's belt trick, a demonstration of an object that is subject to 4 π or 720 ° symmetry, so it needs two full revolutions to revert to its initial state.

Inspired by Jason Hise's animations, please check out: https://en.wikipedia.org/wiki/User:JasonHise

Observables as quaternions States of the anti-twister and their corresponding spin observables as quaternions

How it works

Coded using CGA ( Cl ( 4 , 1 ) ) motor interpolation as described by Belon et al (2017).

In order to model the ribbon that is secured in s -direction while rotating in r by 2 π λ rad . We define three oriented control points using CGA rotors. For this, using two rotors R and S , describing the rotation of the center cube and the twisting of the ribbon R ( λ ) = exp ( r e 123 π λ ) , S = exp ( s e 123 π 2 ) and three translators T 0 ( λ ) = 1 R ( λ ) 0.3 s R ( λ ) e 2 , T 1 ( λ ) = 1 R ( λ ) 1.0 s R ( λ ) e 2 , T 2 = 1 2.0 s e 2 we define the motors of oriented control points as M 0 ( λ ) = T 0 ( λ ) R ( λ ) S M 1 ( λ ) = T 1 ( λ ) R ( λ ) S M 2 ( λ ) = T 2 Which can be interpolated linearly using motor logarithms: M ( λ , α ) = exp ( i B i ( α ) log ( M i ( λ ) ) ) Where α [ 0 , 1 ] is the interpolation parameter along the ribbon originating from the center cube face. And B i ( α ) are weight functions defined using B i ( α ) = B i ( α ) / j B j ( α ) which is normalizing B 1 ( α ) = ( 1 α ) 2 , B 2 ( α ) = 10 α 2 ( 1 α ) 4 , B 3 ( α ) = α 3 .

Finally, the interpolation motor M ( λ , α ) can be used to calculate the mesh of a ribbon extending in c direction ρ l , r ( λ , α ) = M ( λ , α ) ( ± c ) M ( λ , α ) . Where ρ l ( λ , α ) and ρ r ( λ , α ) are its left and right boundaries respectively and we used the up-projection c for the conformal representation defined by c = c + 1 2 c 2 e + e o .

The full set of twelve equations (2 boundaries × 6 directions) for rotating in the z -axis is given by

ρ l , r + x ( λ , α ) = M ( λ , α , s = + e 1 , r = e 3 ) ( ± 0.1 e 2 ) ρ l , r x ( λ , α ) = M ( λ + 1 , α , s = e 1 , r = e 3 ) ( ± 0.1 e 2 ) ρ l , r + y ( λ , α ) = M ( λ + 3 2 , α , s = + e 2 , r = e 3 ) ( ± 0.1 e 3 ) ρ l , r y ( λ , α ) = M ( λ + 1 2 , α , s = e 2 , r = e 3 ) ( ± 0.1 e 3 ) ρ l , r + z ( λ , α ) = R 12 ( λ 2 ) M ( 1 2 , α , s = + e 3 , r = e 2 ) ) R 12 ( λ 2 ) ( ± 0.1 e 1 ) ρ l , r z ( λ , α ) = R 12 ( λ 2 ) M ( 3 2 , α , s = e 3 , r = e 2 ) ) R 12 ( λ 2 ) ( ± 0.1 e 1 ) .

Where we used M ( x ) to denote the sandwich-product M x M of x . The ρ l , r ± i ( λ , α ) are at last projected back into Cl ( 3 , 0 ) by using

ρ = ( ρ ρ e e + e ) ( e + e ) 1

Which first normalizes the conformal point by dividing it with ρ e and then rejects it from the Minkowski plane e + e .

How to it compile yourself

After cd in the project folder download dependencies using

pip install -r requirements.txt

After that, you may use pyinstaller to build an executable

pyinstaller ./Spinor_Cube_Ver2.2.2.py --onefile

References:

[1] Belon, M.C.L., Hildenbrand, D. Practical Geometric Modeling Using Geometric Algebra Motors. Adv. Appl. Clifford Algebras 27, 2019–2033 (2017). https://doi.org/10.1007/s00006-017-0777-z

About

Development of a procedurally generated animation of the anti-twister mechanism to demonstrate its connection to Spin(3).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published