The cathetus AB is constrained to move on the horizontal axis x . An elastic force acts on the dynamic system pulling the A vertex of the triangle towards the O point.
G is the centre of mass of the disc.
C is the contact point between disk and triangle. The dynamic system has six degrees of freedom and four constraints, then we can choose two Lagrangian coordinates. The sytem is subject to the force of gravity and the force of elasticity . Ig is the moment of inertia of the disk relating of the axis for G parallel to . Now we can write the Lagrangian equations.