ergetgetagt

Page 145

Chapter 8: Base modules

140

8.30 obj This module allows one to construct surfaces from simple obj files, as illustrated in the example files galleon.asy and triceratops.asy.

8.31 graph3 This module implements three-dimensional versions of the functions in graph.asy. To draw an x axis in three dimensions, use the routine void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero, real xmin=-infinity, real xmax=infinity, pen p=currentpen, ticks3 ticks=NoTicks3, arrowbar3 arrow=None, bool above=false); Analogous routines yaxis and zaxis can be used to draw y and z axes in three dimensions. There is also a routine for drawing all three axis: void axes3(picture pic=currentpicture, Label xlabel="", Label ylabel="", Label zlabel="", triple min=(-infinity,-infinity,-infinity), triple max=(infinity,infinity,infinity), pen p=currentpen, arrowbar3 arrow=None); The predefined three-dimensional axis types are axis axis axis axis axis axis axis

YZEquals(real y, real z, triple align=O, bool extend=false); XZEquals(real x, real z, triple align=O, bool extend=false); XYEquals(real x, real y, triple align=O, bool extend=false); YZZero(triple align=O, bool extend=false); XZZero(triple align=O, bool extend=false); XYZero(triple align=O, bool extend=false); Bounds(int type=Both, int type2=Both, triple align=O, bool extend=false);

The optional align parameter to these routines can be used to specify the default axis and tick label alignments. The Bounds axis accepts two type parameters, each of which must be one of Min, Max, or Both. These parameters specify which of the four possible three-dimensional bounding box edges should be drawn.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.