The translate( ) function moves the shape from its origin to a new origin.
In 2D :
In 2D , translate() takes two parameters, which are x-axis and y-axis.
e.g.
translate(200, 200);
In 3D :
In 3D , translate() takes three parameters, which are x-axis , y-axis and z-axis.
e.g.
translate(0, 100, -50);