manpagez: man pages & more
info asymptote
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.33 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);

cylinderskeleton

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;
}

This document was generated on May 24, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.