plane(w, h);Draw a plane.
Arguments
wThe width dimensionhThe height dimensionfunction setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
 
  plane(400, 400);
end
Output
box(w, [h], [d]);Draw a 3D box.
Arguments
wThe width dimension[h]The height dimension[d]The depth dimensionfunction setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
 
  box(150, 225, 180);
endOutput
function setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
  
  rotateX(45);
  rotateZ(45);
  box(150, 225, 180);
endOutput
sphere(w, [detailX], [detailY]);Draw a 3D Sphere.
Arguments
wThe width dimension[detailX]The detail in the X axis[detailY]the detailt in the Y axisfunction setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
 
  sphere(200);
endOutput
cylinder([radius], [height], [detailX], [detailY], [bottomCap], [topCap]);Draw a 3D Cylinder.
Arguments
[radius]radius of the cylinder. Defaults to 50.[height]height of the cylinder. Defaults to the value of radius.[detailX]number of horizontal edges. Defaults to 24.[detailY]number of subdivisions along the y[bottomCap]whether to draw the cylinder[topCap]whether to draw the cylinderfunction setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
 
  cylinder(80, 140);
endOutput
torus([radius], [tubeRadius], [detailX], [detailY]);Draw a 3D Torus.
Arguments
[radius]radius of the torus. Defaults to 50.[tubeRadius]radius of the tube. Defaults to 10.[detailX]number of edges that form the hole. Defaults to 24.[detailY]number of triangle subdivisions along the yfunction setup()
  createWindow(300, 300, GL3D);
end
function draw()
  background('purple');
 
  torus(180, 80);
endOutput