<<<<<<<<<<<<<<<<<

sphere(gert) Gert sphere(gert)

NAME

sphere

DESCRIPTION

Sphere is a geometry object. It represents a unit sphere relative to local coordinate system. Since sphere is a subclass of assembly, this geometry transforms into an ellipsoid in 3D space.

SUPERCLASS

geometry

INSTANCE VARIABLES

none

MESSAGES

intersect! finds ray-sphere intersection.

near_far! calculates and returns supporting plane displacement for each of plane_normals.

normal! sets the normal to the surface.

row_products! calculates a matrix of pairwise scalar products of scene_to_local_transform. This matrix is used by "normal!" method.

transform_bounding_volume! transforms bounding volume center and radius to the global coordinate system.

EXAMPLE

/* White and blue below should be defined as properties objects in GERT, DO NOT CONFUSE with property object in OSCAR. */ sphere_1 := sphere{ scale= (35,39,45) position=(0,0,15) properties=blue }; sphere_2 := sphere{ scale=(50,2,75) position=(0,39,0) properties=white };

SEE ALSO

ray, geometry, cone, cylinder, block, properties


Please send comments and suggestions to
consult@rpi.edu