Simulations — TgN Virtual Lab
Interactive mechanics simulations. Adjust parameters and observe animation and real-time graphs simultaneously.
Equations solved with 4th-order Runge–Kutta (RK4) numerical integration — Press ▶ Play to start each simulation.
Equation of Motion
m · ẍ = −k · x − c · ẋ
m = mass (kg) • k = stiffness (N/m) • c = damping coefficient • x = displacement from equilibrium
Single Spring–Mass System
Spring – Mass – Damper — 1 DOF
Animation
Graph
Equation of Motion (Non-linear)
θ̈ = −(g/L)·sin(θ) − (c/mL²)·θ̇
g = 9.81 m/s² • L = length (m) • θ = angle from vertical (rad) • m = mass (kg)
Simple Pendulum
Non-linear ODE with damping
Animation
Graph
Equations of Motion (2 DOF)
m₁ẍ₁ = −k₁x₁ − k₂(x₁−x₂) − cẋ₁
m₂ẍ₂ = −k₂(x₂−x₁) − cẋ₂
Normal modes: in-phase and anti-phase coupled oscillation
Coupled Spring–Mass System
Two masses connected by springs — normal modes
Animation
Graph
Physics: Pendulum ODE + Elastic Collision
θ̈ = −(g/L)sin(θ) — Impulse: v'₁ = v₁ − (1+e)(v₁−v₂)/2 , v'₂ = v₂ + (1+e)(v₁−v₂)/2
Equal-mass collision • e = restitution coefficient (≈1 elastic) • Impulse applied when adjacent balls contact
Newton's Cradle
Elastic collisions — conservation of momentum & energy
Animation
Pendulum Clock — Escapement & Gear Train
θ̈pend = −(g/L)sin(θ) + Fesc/mL — Escapement locks/releases escape wheel each half-swing
Escape wheel → minute wheel (ratio 1:60) → hour wheel (ratio 1:12) •
Pendulum period T = 2π√(L/g) • each tick advances escape wheel by 1 tooth
Pendulum Clock
Escapement wheel — minute gear — hour gear — clock hands
Animation
Escape ticks: 0
Elapsed sim time: 0.00 s
Clock time shown: 12:00:00
Period T: 2.007 s