torus

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

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

function draw()
  background('purple');
 
  torus(180, 80);
end

Output

See torus in shapes3D.h