For a full description please refer to the description given in video 1 of this series. The difference here is that the light changes colour according to the value of the Lagrangian of the system. Recall the Lagrangian L = T - V, the difference between the system kinetic energy (T) and potential energy (V). For this system:
L = 0.5 * (m1 * (U1^2 + V1^2) + m2 * (U2^2 + V2^2)) - g * (m1 * (y1 - y0) + m2 * (y2 - y0))
where from the kinematics:
y1 = y0 - L01 * cos(theta1)
y2 = y1 - L12 * cos(theta2)
U1 = omega1 * L01 * cos(theta1)
U2 = U1 + omega2 * L12 * cos(theta2)
V1 = omega1 * L01 * sin(theta1)
V2 = V1 + omega2 * L12 * sin(theta2)
The rotational kinetic energy terms (0.5 * I * omega^2) are zero since the moment of inertia of a point mass about its centre, Ig, is zero.
Indeed there are many other values that could be used to alter the colour of the light, such as the angular velocities or accelerations, the included angle, the linkage tensions etc. etc.
Hello, do you get the same result each time you run the simulation ?
nycoshouse 1 month ago
@nycoshouse Hi, yes. For a given set of initial conditions the state at any chosen instant in time is always the same regardless of when I run it. This is because this system is deterministic and so always exactly repeatable on a digital computer. The chaos is an emergent feature of the non-linear system.
khyar 1 month ago
Nice !... How did you integrate the equations of motion? RK ?
martinsaravia 3 months ago
@martinsaravia Thank you! Yes, non-symplectic RK 4th order.
khyar 3 months ago