Controlling Two Linear Motions of an Object

This is called as Hbot mechanism.
Hbot = H-shaped robot.
Linear motions of orange object along X and Y axes are controlled by pink and green driving pulleys.
The black timing belt is fixed to the object.
When pink and green pulleys rotate in opposite directions at the same velocity, the object moves along X axis.
When pink and green pulleys rotate in the same direction at the same velocity, the object moves along Y axis.
The green line is trajectory of a point on the object.
The mechanism can be used for 3D printers.
When the pink pulley turns P deg. clockwise (the green one is immobile) the orange object displacements are:
Along X axis: ΔXp = - Pi.D.P/720




Along Y axis: ΔYp = - Pi.D.P/360




When the green pulley turns G deg. clockwise (the pink one is immobile) the orange object displacements are:
Along X axis: ΔXg = Pi.D.G/720




Along Y axis: ΔYg = - Pi.D.G/360




Pi = 3.1416
D: pulley diameter.
Programming driving pulley motion to get desired trjectory of the orange object is not easy.