cylinder

v0.1.7
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 cylinder

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

function draw()
  background('purple');
 
  cylinder(80, 140);
end

Output

See cylinder in shapes3D.h