Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

XG.3D-INSERT-BALL

source files: [xc]shp.[ch]

SYNTAX

(XG.3D-INSERT-BALL
  :THING <thing>
[ :U-POINTS <num> ]
[ :V-POINTS <num> ]
[ :TRANSFORM <xtfm> ]
[ :X <num> ] [ :Y <num> ] [ :Z <num> ]
[ :SCALE <num> ]
[ :SCALE-X <num> ] [ :SCALE-Y <num> ] [ :SCALE-Z <num> ]
[ :WANT-HOLES t ]
[ :RED   <num>] [:GREEN   <num>] [:BLUE   <num>]
[ :RED-B <num>] [:GREEN-B <num>] [:BLUE-B <num>]
)

DESCRIPTION

This call inserts some approximation to a sphere into the given thing. Some of the stranger options are present to help test the rendering capabilities of the program and host machine.

The <thing> must be a 'thing' in the :DRAW <camera> sense, a disembodied propertylist containing a :POINT-RELATION, and (unless only a point-cloud sphere is desired) also a :FACET-RELATION. Both must be rank-1.

This call inserts points, linesegments, triangles, or rectangles, according to the nature of the thing provided. (For example, if the thing has :FACET-0/1/2 but not :FACET-3, triangles are inserted.)

If :U-POINTS is specified, the call attempts to use approximately this many points on 'lattitude' lines, but changing it to a more convenient or sensible number at whim.

If :V-POINTS is specified, the call attempts to use approximately this many points on 'longitude' lines, but changing it to a more convenient or sensible number at whim.

The resulting ball has its center at :X/Y/Z (before :TRANSFORM is applied), and is of unit diameter before SCALEing.

If :TRANSFORM is supplied, it must be an instance of CLASS-MATRIX44, and will be used to transform the ball exactly as if by XG.3D-TRANSFORM-THING.

If :WANT-HOLES is set non-NIL, every other triangle/rectangle will be dropped out, in a checkerboard sort of pattern. This is handy when testing rendering, since it lets one see what is happening on the inside of the ball. It also possesses some visual appeal.

If :RED/:GREEN/:BLUE are specified and :POINT-RED/GREEN/BLUE or :FACET-RED/GREEN/BLUE are present in the thing, they will be set as specified (0-1 range).

If :RED-B/:GREEN-B/:BLUE-B are also specified, then if :POINT-RED/GREEN/BLUE are present, the colors are shaded smoothly from :RED/:GREEN/:BLUE at one pole to :RED-B/:GREEN-B/:BLUE-B at the other pole. This is largely for testing. If :FACET-RED/GREEN/BLUE are present, then alternate polygons (in a checkboard pattern) will be set to :RED/:GREEN/:BLUE and :RED-B/:GREEN-B/:BLUE-B.


Go to the first, previous, next, last section, table of contents.