Elliptical_cylinder_modeller(modeller)LYMBElliptical_cylinder_modeller(modeller)
NAME
elliptical_cylinder_modeller - a geometric representation
of a cylinder with an elliptical base.
DESCRIPTION
The elliptical_cylinder_modeller class implements a geometric representation of a cylinder with an elliptical
base. It allows the user to manipulate a cylinder without
seeing the details of its internal representation. The
elliptical_cylinder_modeller can be rendered directly on
the graphics display. The default cylinder has a height of
1.0, and is centered at the origin. It is oriented along
the y-axis. The elliptical_cylinder_model is a variable
resolution modeller. By default it has a very coarse
approximation to a cylinder, using only 3 rectangles for
its sides. The resolution instance variable can be used
to set the number of polygons used for the body of the
cylinder. A value less than 3 results in three polygons.
SUPERCLASS
cylinder_modeller
INSTANCE VARIABLES
focal_length
The distance between the focal points. By default,
the foci are on the x axis and centered about the
origin. The default focal_length is zero (i.e. a
circle).
const_val
The constant distance used to define the elliptical
base. The base is defined to be the locus of
points in the xz plane such that the sum of the
distances from the foci is equal to const_val. By
default, const_val is 1.
MESSAGES
In addition to those messages accepted by cylinder_modeller, the following messages are known to the
elliptical_cylinder_modeller.
focal_length[=?]
Set/get the focal length.
const_val[=?]
Set/get the const_val instance variable. Get the
number of polygons. Like num_vertices, this value
should not be set since it is computed by the
elliptical_cylinder_modeller when it builds itself.
calculate!
Recomputes all the vertices and polygons of the
cylinder according to the current value of "resolution", an inherited variable.
EXAMPLES
The following LYMB script creates an elliptical cylinder
model and rotates a camera about it in space so that the
geometry may be viewed.
elliptical_cylinder_modeller new: the_model
resolution= 40
focal_length= 2.2
const_val= 2.5
height= 5
;
actor new: the_actor
color=(.2,.6,.6)
modeller=the_model;
environment new: env
variable="LYMB_RENDERER";
camera new: c1
position=(7,7,0)
focal_point=(0.0,0.0,0.0)
view_angle=45
on!;
light new: l1
position=(10,3,6)
on!;
object # [env value?] new: aren
actors=[actor instances?]
cameras=[camera instances?]
lights=[light instances?];
aren render!;
cue new: rotate
duration=100
tick_actions="c1 azimuth:2;"
;
scene new: ascene
cues=rotate
duration=100
renderers=aren
;
ascene start!;
aren render!;
SEE ALSO
actor, modeller, byu, cylinder_modeller, cube_modeller,
hershey_text, points_modeller, polyline_modeller,
sphere_modeller
Please send comments and suggestions toconsult@rpi.edu