DIRECTORY Contours, Controls, Controls3d, Draw2d, Imager, IO, Matrix3d, Render3d, Rope, Spline3d, ThreeDBasics, Vector3d; TubeDefs: CEDAR DEFINITIONS ~ BEGIN Tube: TYPE ~ REF TubeRep; TubeRep: TYPE ~ RECORD [ p0, p1: Triple _ origin, -- Hermite endpoints of curve v0, v1: Triple _ origin, -- Hermite tangents of curve tw0, tw1: REAL _ 0.0, -- twists tens0, tens1: REAL _ 1.0, -- tensions r0, r1: REAL _ 0.05, -- radii contours: ContourSequence _ NIL, -- optional contours coeffs: Coeffs _ NIL, -- coefficients of curve xCoeffs: Coeffs _ NIL, -- curve xformed to screen refVec: Triple _ origin, -- reference vector to make frames circleRes: INTEGER _ 6, -- # sides of circular contour length: REAL _ 0.0, -- length of the tube length0, length1: REAL _ 0.0, -- distances from root frames: FrameSequence _ NIL, -- reference frames, ordered by t prev, next: Tube _ NIL, -- parent and continuing tubes branches: TubeSequence _ NIL, -- branch (non-continuing) tubes near3d: Near3d _ [origin, 0.0, 0.0], -- relative to a previous query name: ROPE _ NIL, -- optional name of tube refAny: REF ANY _ NIL, -- for client data selected: BOOL _ FALSE -- selected for drawing? ]; TubeSequence: TYPE ~ REF TubeSequenceRep; TubeSequenceRep: TYPE ~ RECORD [ length: NAT _ 0, element: SEQUENCE maxLength: NAT OF Tube ]; Pendings: TYPE ~ REF PendingsRep; PendingsRep: TYPE ~ RECORD [ epsilon: BOOL _ FALSE, scale: BOOL _ FALSE, r: BOOL _ FALSE, tens: BOOL _ FALSE, tw0: BOOL _ FALSE, tw1: BOOL _ FALSE, cres: BOOL _ FALSE, holdPosition: BOOL _ FALSE, holdTangent: BOOL _ FALSE, shape: BOOL _ FALSE, skin: BOOL _ FALSE ]; DetailType: TYPE ~ {autoSimplify, label, skeleton, spline, ends, pick, enabled, frames, lines, curvature, velocity, acceleration, contours, normals, shape, skin}; Details: TYPE ~ REF DetailsRep; DetailsRep: TYPE ~ RECORD [ autoSimplify: BOOL _ FALSE, -- kill details if mouse held label: BOOL _ TRUE, -- label vectors skeleton: BOOL _ FALSE, -- draw straight line skeleton spline: BOOL _ TRUE, -- draw spline axis ends: BOOL _ TRUE, -- draw spline ends pick: BOOL _ TRUE, -- draw picked point enabled: BOOL _ TRUE, -- enable viewing of details frames: BOOL _ FALSE, -- reference frames lines: BOOL _ FALSE, -- longitudinal lines curvature: BOOL _ FALSE, -- curvature velocity: BOOL _ FALSE, -- velocity acceleration: BOOL _ FALSE, -- acceleration contours: BOOL _ FALSE, -- contours (default to circles) normals: BOOL _ FALSE, -- normals shape: BOOL _ FALSE, -- frames or curv or vel or acc skin: BOOL _ FALSE -- contours or normals: ]; Pick: TYPE ~ REF PickRep; PickRep: TYPE ~ RECORD [ origPos: Triple _ [0.0, 0.0, 0.0], pos, tan: Triple _ [0.0, 0.0, 0.0], t: REAL _ 1.0, tube: Tube _ NIL, selected0, selected1: Tube _ NIL, dividePending: BOOL _ FALSE ]; TubeProc: TYPE ~ PROC [tube: Tube] RETURNS [continue: BOOL _ TRUE]; FrameProc: TYPE ~ PROC [position, velocity: Triple, t: REAL] RETURNS [Frame]; PointProc: TYPE ~ PROC [id: INTEGER, position, normal: Triple, u, v: REAL] RETURNS [continue: BOOL _ TRUE]; PolyProc: TYPE ~ PROC [id, p0, p1, p2: INTEGER] RETURNS [continue: BOOL _ TRUE]; Near2d: TYPE ~ Spline3d.Near2d; Near3d: TYPE ~ Spline3d.Near3d; Hull: TYPE ~ RECORD [center, pMin, pMax: Triple, rMin, rMax: REAL]; Triad: TYPE ~ RECORD [v, n, b: Triple]; -- vector, principal normal, binormal RadiusMode: TYPE ~ {linear, square}; Contour: TYPE ~ Contours.Contour; ContourSequence: TYPE ~ Contours.ContourSequence; -- presumed ordered according to t Frame: TYPE ~ REF FrameRep; FrameRep: TYPE ~ RECORD [ t: REAL _ 0.0, -- parametric position on curve position: Triple _ origin, -- position on curve triad: Triad _ [origin,origin,origin], -- triad with no scale or twist scale: REAL _ 1.0, -- scale twist: REAL _ 0.0, -- twist matrix: Matrix _ NIL, -- matrix including scale, twist contour: Contour _ NIL, -- normalized to unit square normals: PairSequence _ NIL -- normals of contour ]; FrameSequence: TYPE ~ REF FrameSequenceRep; FrameSequenceRep: TYPE ~ RECORD [ length: NAT _ 0, element: SEQUENCE maxLength: NAT OF Frame ]; ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Context: TYPE ~ Imager.Context; MarkType: TYPE ~ Draw2d.MarkType; Viewer: TYPE ~ Controls.Viewer; Control: TYPE ~ Controls.Control; GraphicsData: TYPE ~ Controls.GraphicsData; OuterData: TYPE ~ Controls.OuterData; Mouse: TYPE ~ Controls.Mouse; ClickProc: TYPE ~ Controls.ClickProc; ControlList: TYPE ~ Controls.ControlList; ButtonList: TYPE ~ Controls.ButtonList; Camera: TYPE ~ Controls3d.Camera; Hold: TYPE ~ Controls3d.Hold; RenderStyle: TYPE ~ Render3d.RenderStyle; Context3d: TYPE ~ REF ThreeDBasics.Context; RealSequence: TYPE ~ Vector3d.RealSequence; Pair: TYPE ~ Vector3d.Pair; PairSequence: TYPE ~ Vector3d.PairSequence; PairSequenceRep: TYPE ~ Vector3d.PairSequenceRep; Triple: TYPE ~ Vector3d.Triple; TripleSequence: TYPE ~ Vector3d.TripleSequence; TripleSequenceRep: TYPE ~ Vector3d.TripleSequenceRep; Bezier: TYPE ~ Spline3d.Bezier; Coeffs: TYPE ~ Spline3d.Coeffs; CoeffsRep: TYPE ~ Spline3d.CoeffsRep; CoeffsSequence: TYPE ~ Spline3d.CoeffsSequence; Matrix: TYPE ~ Matrix3d.Matrix; MatrixRep: TYPE ~ Matrix3d.MatrixRep; MatrixSequence: TYPE ~ Matrix3d.MatrixSequence; MatrixSequenceRep: TYPE ~ Matrix3d.MatrixSequenceRep; origin: Triple ~ Vector3d.origin; xAxis: Triple ~ Vector3d.xAxis; yAxis: Triple ~ Vector3d.yAxis; zAxis: Triple ~ Vector3d.zAxis; PI: REAL ~ 3.1415926535; END. LTubeDefs.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bloomenthal, February 24, 1987 6:14:49 pm PST Nomenclature A tube is a tree-like structure that may have an antecedent (tube.prev), a continuation (tube.next), and an arbitrary number of branches (tube.branches). A section is a tube considered by itself, without its continuation or branches. A branch is a tube and, recursively, its continuation. Generally, a tube means the sub-tree consisting of the current section and, recursively, its continuation and branches. The entire tree is the sub-tree that has no antecedent. Tube Definitions geometric givens: geometric derivations: topology: nearness: miscellaneous: CallBack Procedure Definitions Procedure for operating on each tube section. Return a frame given the position and velocity of the curve at parametric position t. Procedure for operating on the given point. Procedure for operating on the given triangle. Geometric Definitions see Computational Geometry for Design and Manufacture Types Constants ΚX˜šœ ™ Jšœ Οmœ1™Jšœ!’˜=Jšœžœ ’ ˜'Jšœžœ ’ ˜,Jšœ žœ ’˜&Jšœ žœ’˜9—™Jšœžœ’˜6Jšœžœ’˜9Jšœ!’"˜CJšœžœ ’˜=Jšœ žœ ’˜1Jšœžœ ’˜9Jšœžœ’!˜C—™ Jšœžœ’˜>Jšœžœ’ ˜C—™ Jšœ)’˜H—™Jšœ žœžœ’˜3Jšœ žœžœžœ’˜0Jšœžœžœ’˜6—Jšœ˜—Jšœžœžœ˜*šœžœžœ˜ Jšœ žœ˜Jšœžœ žœžœ˜-Jšœ˜—J˜Jšœ žœžœ ˜$šœžœžœ˜Jšœžœžœ˜Jšœ žœžœ˜Jšœžœžœ˜Jšœ žœžœ˜Jšœ žœžœ˜Jšœ žœžœ˜Jšœž œžœ˜Jšœžœžœ˜Jšœžœžœ˜Jšœ žœžœ˜Jšœ žœž˜Jšœ˜J˜—šœ žœ6˜HJšœ4˜4Jšœ6˜6J˜—Jšœ žœžœ ˜"šœžœžœ˜Jšœžœžœ’˜@Jšœ žœžœ’˜-Jšœžœžœ’˜>Jšœ žœžœ’˜0Jšœ žœžœ’˜/Jšœ žœžœ’˜0Jšœžœžœ’Οi˜:Jšœ žœžœ’˜1Jšœž œžœ’˜3Jšœ žœžœ’ ˜,Jšœ žœžœ’ ˜+Jšœžœžœ’œž˜9Jšœ žœžœ’ ˜@Jšœžœžœ’ ˜)Jšœ žœžœ’£˜=Jšœ žœžœ’£˜3Jšœ˜J˜—Jšœžœžœ ˜šœ žœžœ˜J˜'J˜(Jšœž œ˜Jšœžœ˜Jšœžœ˜#Jšœžœž˜J˜——š ™š ‘œžœžœžœ žœžœ˜EJ™5J™—š ‘ œžœžœ!žœžœ ˜OJ™6J™.J™—š Οn œžœžœžœ"žœ˜LJšœžœ žœžœ˜(J™3—J˜š€œžœžœžœžœ žœžœ˜RJ™6——š ™Jšœ žœ˜"Jšœ žœ˜"J˜Jšœ žœžœ*žœ˜GJ˜Jšœ žœžœ’%˜RJšœ Οz1™>J™Jšœ žœ˜&J˜Jšœ žœ˜$Jšœžœ’"˜TJ˜Jšœ žœžœ ˜šœ žœžœ˜Jšœ žœ ’˜9Jšœ#’˜7JšœΟsœ’˜LJšœ žœ ’˜%Jšœ žœ ’˜%Jšœžœ’ ˜>Jšœžœ’"˜BJšœžœ’˜8Jšœ˜—Jšœžœžœ˜,šœžœžœ˜!Jšœ žœ˜Jšœžœ žœžœ˜.Jšœ˜——š ™Jšžœž œžœ˜Jšžœžœžœžœ˜Jšœ žœ˜"J˜Jšœ žœ˜#J˜Jšœ žœ˜"Jšœ žœ˜$Jšœžœ˜,Jšœ žœ˜'Jšœ žœ˜ Jšœ žœ˜'J˜Jšœžœ˜+Jšœžœ˜)J˜Jšœ žœ˜$Jšœ žœ˜!J˜Jšœžœ˜+Jšœ žœžœ˜-J˜Jšœžœ˜,J˜Jšœž œ˜Jšœ žœ˜,Jšœžœ˜2J˜Jšœ žœ˜#Jšœžœ˜0Jšœžœ˜5J˜Jšœ žœ˜"J˜Jšœ žœ˜"Jšœ žœ˜'Jšœžœ˜0J˜Jšœ žœ˜"Jšœ žœ˜'Jšœžœ˜0Jšœžœ˜5—š  ™ Jšœ$˜$Jšœ#˜#Jšœ"˜"Jšœ#˜#J˜Jšžœžœ˜J˜—Jšžœ˜J˜—…—”$8