TubeDoc.tioga
Jules Bloomenthal, September 2, 1986 3:51:25 pm PDT
CEDAR 6.1 — FOR INTERNAL XEROX USE ONLY
Tube
a program and collection of interfaces for modeling tubes
Jules Bloomenthal
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: This software permits the creation and modification of tubular structures.
Created and Maintained by: Bloomenthal.pa
Keywords: tube, generalized cylinder, modeling, three-dimensional geometry, splines.
DF File: [Cedar]<CedarChest6.1>Top>Tube.df
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Introduction
Generalized cylinders have been used to advantage in representing three-dimensional synthetic and natural forms. The interest here is to provide the software support required to model the three-dimensional objects described in Bloomenthal: Modeling the Mighty Maple, Siggraph 1985.
The individual interfaces are self-documenting, and their use is typified in TubeCommandsImpl.mesa, which implements the program "Tube."
TubeCommandsImpl.mesa implements a program, called "Tube," which permits interactive specification of a tube.
Generalized cylinders, or tubes, consist of a cross-sections which follow along a central axis. The central axis consists of a sequence of spline sections which interpolate user specified knots. A surface is created by triangulating between the cross-sections.
The Interfaces
Tube permits the interactive specification of a tube.
The tube viewer is divided into four horizontal sections. The upper section contains a menu of functions, the next lower section contains a typescript for querying the user, the next lower section contains the graphic representation of the tube, and the lowest section contains a number of controls for manipulating the tube.
The Program "Tube"
Tube permits the interactive specification of a tube.
The tube viewer is divided into four horizontal sections. The upper section contains a menu of functions, the next lower section contains a typescript for querying the user, the next lower section contains the graphic representation of the tube, and the lowest section contains a number of controls for manipulating the tube.
The Graphics Viewer
The graphics viewer displays the tube. Initially the tube is represented only by its central axis. This begins as a single spline section, but may be manipulated into an indefinite number of sections, forming a continuous spline sequence. Any individual section may be selected for special modification; the selection is performed with the middle mouse button (to mark the beginning of the selection) and the right mouse button (to mark the end of the selection). The left mouse button selects an individual point along the sequence.
The Menu
Any mouse button may be used to activate a menu button; no distinction is made between mouse buttons. The individual menu buttons are:
Help:  prints a short summary of mouse use onto the commander viewer.
Auto-On/Off: auto-on automatically eliminates details (such as contours) during the display
  of the tube if the tube is being rotated; only the central spline and/or the tube
  skeleton are displayed. Auto-off defeats this feature, thus lengthening the
  graphics drawing time considerably if the tube has significant detail.
Label-On/Off: some details are labelled or not, depending on the state of this button.
Max-Out:  write the tube to a file in a points/polygon format especially designed for
  Nelson Max. The user is queried for a filename; a <CR> will abort the
  operation.
Poly-Out:  write the tube to a file in the points/polygon format used at PARC. The user
  is queried for a filename; a <CR> will abort the operation.
Skel-On/Off: if on, display the skeleton of the tube as a series of straight lines connecting
  the central knots.
Pick-On/Off: if on, display the tangent vector of the central axis where selected by the left
  mouse button.
Splines-On/Off: if on, display the central axis as a spline sequence; the selected sections are
  drawn solid, others dotted.
Circles-On/Off: if on, display the circular cross-sections of the tube.
Lines-On/Off: if on, display lines connecting the circular cross-sections of the tube.
Frames-On/Off: if on, display the reference frames used along the central axis of the tube.
Normals-On/Off: if on, display the normals to the tube surface.
Curv-On/Off: if on, display curvature vectors along the central axis of the tube.
Vel-On/Off: if on, display velocity vectors along the central axis of the tube.
Acc-On/Off: if on, display acceleration vectors along the central axis of the tube.
The TypeScript
This scrollable viewer displays certain information, such as the number of points and polygons written to a file. It also queries the user for information, such as a filename. A carriage-return in response to most queries will abort the current operation.
The Controls
The controls are divided into three rows. The upper row controls camera/object orientation; the middle row controls various surface parameters; the bottom row controls the shape of the central axis.
Camera Controls
pan: causes a rotation, or yaw, about the local y-axis.
tilt: causes a rotation, or pitch, about the local z-axis.
roll: causes a rotation, or roll, about the local x-axis.
zum: causes a zoom of the image.
dx: causes the image to shift left/right.
dy: causes the image to shift up/down.
dz: causes the images to shift front/back.
fov: adjust the field of view; if fov is zero, the projection is orthographic.
Surface Controls
tw0: twists the beginning of the selected splines.
tw1: twists the end of the selected splines.
r0: changes the radius at the beginning of the selected splines.
r1: changes the radius at the end of the selected splines.
scal: scales the radius of the entire tube.
eps: this adjusts the epsilon which is used to determine the number of linear segments to
 represent the continuously curving central axis. The smaller eps, the greater the
 number of segments.
cres: this adjusts the circular resolution of the cross-sections.
lim: this is actually a display control; if the number of vectors to be drawn is less than lim,
 then the image is double-buffered; it is single-buffered otherwise.
Shape Controls
ptx: move the horizontal position of the selected point on the central axis.
pty: move the vertical position of the selected point.
ptz: move the depth position of the selected point.
lng: change the longitude of the tangent to the central axis at the selected point.
lat: change the lattitude of the tangent.
mag: change the magnitude of the tangent.