Primitive objects are the building box with which other objects are
created. Each primitive type has associated with it specialized
methods for
creation,
intersection with a ray,
bounding box calculation,
surface normal calculation,
ray enter/exit classification,
and for the computation 2D texture coordinates termed <#358#><EM>u-v</EM><#358#>
coordinates.
This latter method is often referred to as the <#359#><EM>inverse mapping</EM><#359#>
method.
<P>
While most of these methods should be of little concern to you, the
inverse mapping methods
will affect the way in which certain textures are applied to primitives.
Inverse mapping is a matter of computing normalized <I>u</I> and <I>v</I> coordinates
for a given point on the surface of the primitive. For planar objects,
the <I>u</I> and <I>v</I> coordinates of a point are computed
by linear interpolation based upon the <I>u</I> and <I>v</I> coordinates assigned
to vertices or other known points on the primitive. For non-planar
objects, <I>uv</I> computation can be considerably more involved.
<P>
This section briefly describes each primitive and
the syntax that should be used to create an instance of the primitive.
It also describes the inverse mapping method, if any, for each type.
<P>
<DL>
<DT><STRONG><#4723#><#4723#></STRONG></DT>
<DD><#1277#><TT>blob</TT><#1277#> <#1278#><EM>thresh st r</EM><#1278#> <tex2html_verbatim_mark>#math74#<tex2html_image_mark>#tex2html_wrap_inline4725#⇧ [<#1280#><EM>st r</EM><#1280#> <tex2html_verbatim_mark>#math75#<tex2html_image_mark>#tex2html_wrap_inline4727#⇧ ...]
<BR> Defines a blob with consisting of a threshold equal to <#366#><EM>thresh</EM><#366#>,
and a
group of one or more metaballs. Each metaball is defined by
its position <tex2html_verbatim_mark>#math76#<tex2html_image_mark>#tex2html_wrap_inline4729#⇧, radius <#368#><EM>r</EM><#368#>, and strength <#369#><EM>st</EM><#369#>.
</DD>
</DL>The metaballs affect each other according to a superimposed
which has <tex2html_verbatim_mark>#math80#<tex2html_image_mark>#tex2html_wrap_inline4738#⇧ and <tex2html_verbatim_mark>#math81#<tex2html_image_mark>#tex2html_wrap_inline4740#⇧ as
opposite corners.
</DD>
</DL>Transformations may be applied to the box if a non-axis-aligned instance
is required. There is no inverse mapping method for boxes.
<BR> Creates a Phong-shaded triangle with the given vertices and
vertex normals.
</DD>
</DL>For both Phong- and flat-shaded triangles, the <I>u</I> axis is the
vector from <tex2html_verbatim_mark>#math95#<tex2html_image_mark>#tex2html_wrap_inline4782#⇧ to <tex2html_verbatim_mark>#math96#<tex2html_image_mark>#tex2html_wrap_inline4784#⇧, and the <I>v</I> axis the vector
from <tex2html_verbatim_mark>#math97#<tex2html_image_mark>#tex2html_wrap_inline4787#⇧ to <tex2html_verbatim_mark>#math98#<tex2html_image_mark>#tex2html_wrap_inline4789#⇧. There is a degeneracy at
<tex2html_verbatim_mark>#math99#<tex2html_image_mark>#tex2html_wrap_inline4791#⇧, which contains all points with <I>v</I> = 1.0. This default
mapping may be modified using the <#414#><TT>triangleuv</TT><#414#> primitive described
<BR> Creates a cylinder that extends from <tex2html_verbatim_mark>#math117#<tex2html_image_mark>#tex2html_wrap_inline4843#⇧ to <tex2html_verbatim_mark>#math118#<tex2html_image_mark>#tex2html_wrap_inline4845#⇧
and has the indicated <#453#><EM>radius</EM><#453#>. Cylinders are rendered
<#454#><EM>without</EM><#454#> endcaps.
</DD>
</DL>The cylinder's axis defines the <I>v</I> axis. The <I>u</I> axis wraps around the
cylinder, with <I>u</I> = 0 dependent upon the orientation of the cylinder.
<BR> Creats a (truncated) cone that extends from <tex2html_verbatim_mark>#math122#<tex2html_image_mark>#tex2html_wrap_inline4857#⇧ to
<tex2html_verbatim_mark>#math123#<tex2html_image_mark>#tex2html_wrap_inline4859#⇧. The cone will have a radius of <tex2html_verbatim_mark>#math124#<I>rad</I><SUB>bottom</SUB> at
<tex2html_verbatim_mark>#math125#<tex2html_image_mark>#tex2html_wrap_inline4862#⇧ and a radius of <I>rad</I><SUB>top</SUB> at <tex2html_verbatim_mark>#math126#<tex2html_image_mark>#tex2html_wrap_inline4865#⇧.
Cones are rendered <#468#><EM>without</EM><#468#> endcaps.
</DD>
</DL>Cone inverse mapping is analogous to cylinder mapping.