Next: featpost3D, Previous: graph3, Up: Base modules
solids
This solid geometry package defines a struct revolution
that
can be used to fill and draw surfaces of revolution. The following example
uses it to display the outline of a circular cylinder of radius 1 and
height 1.5 aligned in the direction (0,1,1)
with perspective projection:
import solids; size(0,100); revolution r=cylinder(O,1,1.5,Y+Z); r.draw(heavygreen);
Further illustrations are provided in the example files cylinder.asy
,
sphere.asy
, cones.asy
, hyperboloid.asy
, and
torus.asy
.