Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

translate()

   
Examples  
translate(30, 20); 
rect(0, 0, 55, 55); 
translate(30, 20, -50); 
rect(0, 0, 55, 55); 
translate(30, 20); 
rect(0, 0, 55, 55); 
translate(14, 14); 
rect(0, 0, 55, 55); 
Description   Specifies the amount to move objects in space. The x parameter specifies left/right translation, the y paramater specifies up/down translation, and the z parameter specifies translation toward/away from the screen. Technically, translate() multiplies the current transformation matrix by a translation matrix.
   
Syntax  
translate(x, y);
translate(x, y, z);
   
Parameters  
x   int or float: left/right translation

y   int or float: up/down translation

z   int or float: forward/back translation

   
Returns   None
   
Usage   Web & Application
   
Related   rotate()
rotateX()
rotateY()
rotateZ()
scale()
push()
pop()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas