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);
end
Output