The problem goes like that:
Rotation - Pressing and dragging the right mouse button, all objects in the scene will rotate around their center . This means that if initially the object was not centered at (0, 0), you will have to calculate its center (by averaging the x and y coordinates) and make the appropriate transformation before rotating the object.

All directions are in the local object coordinate system. This means that initially, before any rotations are applied, moving the mouse to the right will make the objects move to the right as well. Once the objects are rotated, their coordinate system is rotated as well. This means that making a translation in the X coordinate, for example, will not cause the object to move to the right. Instead it will move in the direction of its own X direction.

For one object in the scene it is easy:
each time I call display() I do