FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
    Examples \ Tutorials \ Courses & Workshops
 
   
 
 
Examples for Processing (BETA) version 91+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know.



Shape Primitives
by REAS <http://reas.com>

The basic shape primitive functions are triangle(), rect(), quad(), and ellipse(). Squares are made with rect() and circles are made with ellise(). Each of these functions requires a number of parameters which determines their position and size.

Created 19 January 2003

   
// Shape Primitives 
// by REAS <http://reas.com> 

size(200, 200); 
smooth(); 
background(0); 
noStroke(); 
fill(226); 
triangle(10, 10, 10, 200, 45, 200); 
rect(45, 45, 35, 35); 
quad(105, 10, 120, 10, 120, 200, 80, 200); 
ellipse(140, 80, 40, 40); 
triangle(160, 10, 195, 200, 160, 200); 
 
 







   
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info