3D Shapes

v0.1.6
plane(w, h);

Draw a plane

Arguments

wThe width dimension
hThe height dimension

function setup()
  createWindow(800, 800, GL3D);
end

function draw()
  background(51);
 
  rotateX(90);
  plane(400, 400);
end
See plane in shapes3D.h
box(w, [h], [d]);

Draw a 3D box

Arguments

wThe width dimension
[h]The height dimension
[d]The depth dimension

function setup()
  createWindow(800, 800, GL3D);
end

function draw()
  background(51);
 
  box(50, 25, 80);
end
See box in shapes3D.h
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 axis

function setup()
  createWindow(800, 800, GL3D);
end

function draw()
  background(51);
 
  sphere(50);
end
See sphere in shapes3D.h