← Back to Simulator

AniTop Physics Documentation

AniTop simulates three classical integrable rigid body systems using SO(3) integration methods for numerical stability. All simulations use Runge-Kutta 4th order or midpoint integration with periodic orthonormalization to prevent rotation matrix drift.

1. Euler Top (Free Rigid Body)

A rigid body rotating in space with no external torques. Demonstrates torque-free motion governed entirely by the body's inertia distribution.

Equations of Motion

Euler's equations in the body-fixed frame:

I₁ω̇₁ = (I₂ - I₃)ω₂ω₃
I₂ω̇₂ = (I₃ - I₁)ω₃ω₁
I₃ω̇₃ = (I₁ - I₂)ω₁ω₂

Rotation matrix evolution:

Ṙ = R[ω]ₓ

where [ω]ₓ is the skew-symmetric matrix of angular velocity.

Physical Quantities

I₁, I₂, I₃
Principal moments of inertia (kg·m²) - arbitrary positive values
ω = [ω₁, ω₂, ω₃]
Angular velocity in body frame (rad/s)
R ∈ SO(3)
Rotation matrix from body frame to world frame

Conservation Laws

E = ½(I₁ω₁² + I₂ω₂² + I₃ω₃²) [conserved]
L = R · [I₁ω₁, I₂ω₂, I₃ω₃]ᵀ [magnitude conserved]

Physical Phenomena

Configurable Parameters

I₁, I₂, I₃
Principal moments of inertia (0.1–10 kg·m²)
ω₀ = [ω₁, ω₂, ω₃]
Initial angular velocity (-10 to 10 rad/s)
dt
Integration timestep (0.0001–0.01 s, default: 0.001 s)
timeScale
Simulation speed multiplier (0.1–4×, default: 1.0)

2. Lagrange Top (Symmetric Top with Gravity)

A symmetric top subject to gravity with center of mass on the symmetry axis. One of three known integrable cases of the heavy top.

Symmetry Constraint

I₁ = I₂ ≠ I₃

Center of mass on symmetry axis: r_com = [0, 0, h]

Equations of Motion

Modified Euler's equations with gravitational torque:

I₁ω̇₁ = (I₂ - I₃)ω₂ω₃ + τ₁
I₂ω̇₂ = (I₃ - I₁)ω₃ω₁ + τ₂
I₃ω̇₃ = (I₁ - I₂)ω₁ω₂ + τ₃

Gravitational torque in body frame:

τ = r_com × (Rᵀ · [0, 0, -mg])

Physical Quantities

I₁ = I₂, I₃
Principal moments with axial symmetry (kg·m²)
m
Total mass (kg)
r_com = [0, 0, h]
Center of mass position on symmetry axis (m)
g
Gravitational acceleration (m/s²)

Energy Conservation

E_total = E_kinetic + E_potential
E_k = ½(I₁ω₁² + I₂ω₂² + I₃ω₃²)
E_p = mg(R · r_com)_z

Physical Phenomena

Configurable Parameters

I₁ = I₂, I₃
Symmetric inertia moments (0.1–10 kg·m²)
m
Mass (0.1–10 kg)
h (z-component of r_com)
Center of mass height (0.1–2 m)
g
Gravity (0–20 m/s², default: 9.81 m/s²)
ω₀, dt, timeScale
Same as Euler top

3. Kovalevskaya Top

A special integrable case discovered by Sofia Kovalevskaya (1888). Requires specific inertia ratio and center of mass position.

Special Constraints

I₁ = I₂ = 2I₃
r_com = [a, 0, 0] (on x-axis)

Equations of Motion

Same form as Lagrange top:

I₁ω̇₁ = (I₂ - I₃)ω₂ω₃ + τ₁
I₂ω̇₂ = (I₃ - I₁)ω₃ω₁ + τ₂
I₃ω̇₃ = (I₁ - I₂)ω₁ω₂ + τ₃

Note: Due to I₁ = I₂, the last term vanishes.

Kovalevskaya Invariant

Additional conserved quantity (complex invariant):

K = (ω₁² - ω₂²) + 2i·ω₁·ω₂

Physical Quantities

I₁ = I₂ = 2I₃
Fixed inertia ratio (kg·m²)
r_com = [a, 0, 0]
Center of mass on x-axis (m)
m, g
Mass and gravity as in Lagrange top

Conservation Laws

E_total = E_k + E_p [conserved]
|K|² = (ω₁² - ω₂²)² + 4ω₁²ω₂² [conserved]

Configurable Parameters

I₃
Determines I₁ = I₂ = 2I₃ (0.1–5 kg·m²)
a (x-component of r_com)
Center of mass position (0.1–2 m)
m, g, ω₀, dt, timeScale
Same as Lagrange top

Comparison Table

Feature Euler Top Lagrange Top Kovalevskaya Top
External Forces None Gravity Gravity
Inertia Constraints Arbitrary I₁, I₂, I₃ I₁ = I₂ ≠ I₃ I₁ = I₂ = 2I₃
COM Position N/A [0, 0, h] [a, 0, 0]
Energy Conservation Kinetic only Total (KE + PE) Total (KE + PE)
Angular Momentum |L| conserved L_z conserved L_z conserved
Special Invariants None None Kovalevskaya K

Integration Methods

Runge-Kutta 4th Order (RK4)

Fourth-order accurate integration for angular velocity evolution:

k₁ = f(ω)
k₂ = f(ω + 0.5h·k₁)
k₃ = f(ω + 0.5h·k₂)
k₄ = f(ω + h·k₃)
ω_next = ω + h/6(k₁ + 2k₂ + 2k₃ + k₄)

SO(3) Integration (Rodrigues Formula)

Rotation matrix updates using matrix exponential:

R_next = R · exp(h[ω]ₓ)
exp(h[ω]ₓ) = I + (sin θ/θ)[ω]ₓ + ((1-cos θ)/θ²)[ω]ₓ²

where θ = h|ω|. Small angle approximation used for θ < 10⁻⁸.

Numerical Stability


Return to Simulator | GitHub Repository