Rigid body spring pendulums

preview_player
Показать описание
Double pendulums and sextuple pendulums consisting of rotating rigid bodies as pendulum bobs that are connected with ideal linear springs. The springs are identical. Rigid bodies have the same densities.

The system is treated as a Hamiltonian system with separate components. Each object has a kinetic energy associated with the quaternion rotation, which is non-separable and expressed in excessive coordinates. Each object is associated with a translational kinetic energy and a gravitational potential. Finally a spring is added between each consecutive rigid body or origin pivot. Seven pairs of canonical coordinates are used for each rigid body.

The simulations were performed with high order explicit symplectic integrators and rendered in real time.
Рекомендации по теме
Комментарии
Автор

The novelty of this simulation, is the kinetic energy of the rotating rigid bodies, which is expressed in excessive coordinates explicitly in terms of the four-component quaternion and corresponding conjugate momentum. The Hamiltonian of a rotating rigid body:
H = ((p2*q1 - p1*q2 + p3*q4 - p4*q3)^2/Ix + (p3*q1 - p1*q3 + p4*q2 - p2*q4)^2/Iy + (p4*q1 - p1*q4 - p3*q2 + p2*q3)^2/Iz)/8
where Ix, Iy, Iz are the inertia tensor diagonal i.e. moment of inertia around each axis

Zymplectic
Автор

Oh my, those compression stresses for those poor springs at 1:24 . Fear that it might be a it of a _stretch_ for the perfect spring model

sirlight-ljij
Автор

How do you make such complex simulations run in real time ? Like how do you optimize your code such that it runs that fast ?
Amazing animation btw.

rektlzz