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

sphere_wedge_modeller(sphere_wedge)sphere_wedgesphere_wedge_modeller(sphere_wedge)

NAME

sphere_wedge_modeller - a geometric representation of a sphere_wedge

DESCRIPTION

The sphere_wedge_modeller class implements a geometric representation of a sphere_wedge. A sphere wedge has as its outer surface, the surface of a sphere. Opposite this surface is the inner surface which is geometrically similar to the outer surface. The four sides connecting these two surfaces define the sphere_wedge volume. The modeller allows the user to manipulate a sphere_wedge without seeing the details of its internal representation. The sphere_wedge_modeller can be rendered directly on the graphics display. The default sphere_wedge_modeller has an outer radius of 1.0, an inner radius of 0.5 and is centered at the origin. The four bounding sides are given using the polar coordinates phi1, phi2, theta1, and theta2 which are 0, 90, 0, and 90 respectively by default. The sphere_wedge has as a default a very coarse approximation to a sphere for the inner and outer surfaces (4 triangles for resolution = 1). For each increment in the resolution instance variable, each triangle is subdivided into four triangles as is done with the sphere_modeller.

SUPERCLASS

sphere_modeller

INSTANCE VARIABLES

phi1 Polar coordinate specifying one of the four sides.

phi2 Polar coordinate specifying the side opposite that specified by phi1.

theta1 Polar coordinate specifying side approximately orthogonal to that given by phi1.

theta2 Polar coordinate specifying the side opposite that specified by theta1.

inner_radius The normalized radius of the inner surface of the sphere_wedge.

MESSAGES

phi1? Returns the value of the phi1 instance variable.

phi2? Returns the value of the phi2 instance variable.

theta1? Returns the value of the theta1 instance variable.

theta2? Returns the value of the theta2 instance variable.

inner_radius? Returns the value of the inner_radius instance variable.

calculate! Recomputes all the vertices and triangles of the sphere_wedge according to the current value of "resolution", an inherited variable.

phi1= Sets the phi1 instance variable.

phi2= Sets the phi2 instance variable.

theta1= Sets the theta1 instance variable.

theta2= Sets the theta2 instance variable.

inner_radius= Sets the inner_radius instance variable. The coordinates of the vertices for the inner surface are scaled from the outer surface using this instance variable.

phi1+: arg Increase the phi1 instance variable by the given argument.

phi2+: arg Increase the phi2 instance variable by the given argument.

theta1+: arg Increase the theta1 instance variable by the given argument.

theta2+: arg Increase the theta2 instance variable by the given argument.

inner_radius+: arg Increase the inner_radius instance variable by the given argument.

EXAMPLES

The following LYMB script creates a sphere_wedge model with a resolution of 3 (64 triangles each on the inner and outer surface) and sets the inner radius to .2.

sphere_wedge_modeller new: sphere_wedge_model1 resolution=4 inner_radius=.2 ;

actor new: spy_sector modeller=sphere_wedge_model1 ;

SEE ALSO

sphere_modeller, actor, modeller, byu, cube_modeller, display_polygons


Please send comments and suggestions to
consult@rpi.edu