[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
7.31 solids
This solid geometry package defines a structure 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
with axis O--1.5unit(Y+Z)
with perspective projection:
import solids; size(0,100); revolution r=cylinder(O,1,1.5,Y+Z); draw(r,heavygreen);
Further illustrations are provided in the example files cylinder.asy
,
cones.asy
, hyperboloid.asy
, and torus.asy
.
The structure skeleton
contains the three-dimensional wireframe
used to visualize a volume of revolution:
struct skeleton { struct curve { path3[] front; path3[] back; } // transverse skeleton (perpendicular to axis of revolution) curve transverse; // longitudinal skeleton (parallel to axis of revolution) curve longitudinal; }