ImplicitWeb.mesa
Copyright Ó 1985, 1990 by Xerox Corporation. All rights reserved.
Bloomenthal, August 11, 1992 4:06 pm PDT
DIRECTORY G3dBasic, G3dPlane, G3dSpline, G3dTube, ImplicitDefs, ImplicitTube;
ImplicitWeb: CEDAR DEFINITIONS
~ BEGIN
Pair:    TYPE ~ G3dBasic.Pair;
Triple:   TYPE ~ G3dBasic.Triple;
Plane:    TYPE ~ G3dPlane.Plane;
Spline:   TYPE ~ G3dSpline.Spline;
Tube:    TYPE ~ G3dTube.Tube;
DistanceMode: TYPE ~ ImplicitDefs.DistanceMode;
Sample:   TYPE ~ ImplicitDefs.Sample;
Definitions
Web:      TYPE ~ REF WebRep;
WebRep:     TYPE ~ RECORD [
tube0, tube1:      Tube ¬ NIL,
taper:        REAL ¬ 0.5,
bow:        REAL ¬ -1.0,
plane:        Plane ¬ [0.0, 0.0, 0.0, 0.0],
helper:       Spline ¬ NIL
];
WebValue:    TYPE ~ RECORD [
a0, a1:       REAL ¬ 0.0,      -- relative weighting of tubes
value:        REAL ¬ 0.0,      -- implicit value
tube0, tube1:      Tube ¬ NIL      -- closest tubes
];
Creation/Preparation
MakeWeb: PROC [tube0, tube1: Tube] RETURNS [Web];
Return the web for tube0 and tube1.
PrepareWeb: PROC [tube: Tube, measureMode: ATOM, distanceMode: DistanceMode]
RETURNS [web: Web];
Create the necessary web from tube.
PrepareWebs: PROC [tube: Tube, measureMode: ATOM, distanceMode: DistanceMode]
RETURNS [web0, web1: Web];
Create the necessary webs from tube.
Valuation
ValueOfWeb: PROC [
q: Triple,
tube: Tube,
web: Web,
distanceMode: DistanceMode,
tolerance, spread: REAL ¬ 0.0]
RETURNS [Sample];
Return the value at a point q of a webbed tube.
ValueOfWebs: PROC [
q: Triple,
tube: Tube,
web0, web1: Web,
distanceMode: DistanceMode,
tolerance, spread: REAL ¬ 0.0]
RETURNS [Sample];
As above but for two webs.
TextureOfWeb: PROC [
q: Triple,
tube: Tube,
web: Web,
distanceMode: DistanceMode,
tolerance: REAL ¬ 0.0]
RETURNS [Pair];
Return the texture coordinates of the point q.
v is the parametric distance along a tube, or the average of the two ribs of a web.
u is the percentage contribution of the ribs to the total value (ribs plus web).
TextureOfWebs: PROC [
q: Triple,
tube: Tube,
web0, web1: Web,
distanceMode: DistanceMode,
tolerance: REAL ¬ 0.0]
RETURNS [Pair];
As WebsUV, but for two webs.
END.