# 3D MDS

This page describes a trivariate version of the bivariate MDS code described elsewhere. Familiarity with that code and the associated mathematical concepts is assumed.

Send questions to Peter Alfeld at

# List of Contents

The code can be invoked by the above applet. You can also download this
message and unfold it on a Unix system with the command source message. Alternatively, you can download a zip file with all the class files. Or, you can download the following set of (binary) java class files individually:

Invoke the package with the Unix command java tv or its equivalent.

## Version Number and Status Label

The version number of the code is indicated in the top row of the control panel. It increases whenever there are changes in this software. Next to the version number the top row also contains a status label that gives some information about the current state of the spline space being investigated.

## Residual Arithmetic

The code sets up a linear system with integer entries, and (usually) analyzes it modulo a prime number P. Thus two integers are considered equal if they have the same residual when divided by P. In particular, an integer is considered to be equal to zero if it is a multiple of P. By default,
P=231-1= 2,147,483,647.

This will serve for most purposes. However, you can choose a different (even non-prime) value of P. Click on the button labeled Prime. This will bring up a new panel showing a text field with the current value of P. You can enter a new value in the text field or use the following buttons:

• Hide causes the prime control panel to disappear.
• Default resets P to its default value.
• << replaces P with the next smaller prime number. The minimum value of P is 2.
• < reduces P by 1.
• > increase P by 1. The maximum value of P is the default. This is the largest integer that can be expressed in java.
• >> sets the value of P to the next largest prime number.
It would in principle be possible to make the residual arithmetic exact by exploiting the residuals modulo several prime numbers. In particular one would have to use enough prime numbers so that their product exceeds the largest possible determinant of any square matrix of the integer system. A bound on such determinants is given by Hadamard's bound which is evaluated and printed whenever the system is analyzed exactly or its stability is examined, see
below. The 2D software is able to use several prime numbers simultaneously, at present such a facility is not available in the 3D software.

## Configurations

We use the word configuration for what is otherwise and variously called "tetrahedral decomposition", "tetrahedral decomposition", "tetrahedral" or "simplicial complex", "three-dimensional triangulation", "tetrahedralization", etc: A configuration is a finite set of non-degenerate tetrahedra satisfying these conditions:

## User's Guide

The trivariate code is under development and features will be added as needed. Following is a list of major differences and similarities between the 2D and the 3D packages:

## Flushing, Stopping, and Quitting

The three buttons in the upper left corner of the control panel are usually effective immediately, even if a possibly lengthy calculation is in process. However, their effect may be delayed for actions that were initiated from auxiliary panels. The Stop Button on the Control Panel and also the Macro panels interrupts a computation in progress. The same effect can be obtained by typing 'x' in the drawing window. The Quit Button exits the system immediately. If used from an Applet the same effect can be obtained by clicking on the Applet a second time. Typing 'X' in the drawing window also works. Events like mouse and button clicks are kept in an event queue and are executed in the sequence they take place. You can flush the event queue, and undo any pending mouse clicks you may have entered while a calculation is taking place, by clicking on the button labeled Flush.

All other buttons, menus, and text fields, will have an effect only after the current calculation and any pending events have completed.

The button labeled Beep in the first row of the control panel writes the character Control-G to standard output. On most systems this causes an audible beep. This is useful after initiating a lengthy calculation: your computer will beep when the computation is done.

## Available Configurations

The menu in the middle of the second line of the control panel lets you select a configuration. The first item lets you import your own configuration from a file (or URL). For details see the next section. The following configurations are provided directly in the code:

## Refining Configurations

Refining a configuration means dividing some of its tetrahedra into subtetrahedra in such a way that a new configuration is obtained. Existing vertices remain where they are, and new vertices are added. At present, refining is possible only for regular configurations, and not for
general assembly. To invoke the refinement panel click on the button refine (at the left end of the third row in the control panel). A new panel, the refinement panel, will appear. Its controls are as follows:
• Row 1: General Controls:
• Quit: Quits the program, same as other quit buttons.
• Hide: Makes the refinement panel invisible.
• Undo, Redo, Reset: These buttons let you undo a step, or redo it. They write a sequence of files that store the state of your work at the given time. Thus they will not work, and will be absent, if you invoke the software as an applet. The files can be used in a new 3dMDS session. The reset button sets the redo pointer to zero. Clicking on redo subsequently will start at the beginning.
• Row 2: Refining a tetrahedron: Select the tetrahedron with the menu in that row. The buttons have the following effects:
• CT Split the tetrahedron into 4 by the Clough-Tocher split about its centroid.
• MS Split the tetrahedron into 14 by the symmetric Morgan-Scott split.
• invert Split the tetrahedron into 11 by splitting each face by the two dimensional Clough-Tocher split, and forming one tetrahedron from the centroids of the faces.
• Edges 12 Split the tetrahedron into 12 by splitting each edge about its midpoint, thus dividing each face into four triangles.
• Edges 16 Similarly, split the tetrahedron into 16 by splitting the edges into half and connecting each point on the boundary to the centroid.
• all CT Split each tetrahedron in the configuration into 4 about its centroid.
• all T60 Split each tetrahedron in the configuration into 60 according to T60 on the main selection menu. The vertices are named as vi for the vertices, ui for the centroids of faces, uij for the midpoints of edges of the inverted tetrahedron, pi for the centroids of faces of the inverted tetrahedron, and w for the centroid.
• Row 3: weighted CT split of a tetrahedron: The controls in this row let you apply a weighted Clough-Tocher split to the tetrahedron T selected in the previous row. b0, b1, b2, b3 are the barycentric coordinates of the split point with respect to T. The text fields, and their associated buttons, let you choose the numerators of the barycentric coordinates. The denominator is simply the sum of those numerators, and is indicated in the Label at the right end of the row. The barycentric coordinates must be positive. To invoke the split click on the button labeled wCT.
• Row 4: Refining a face: Select the face with the menu in that row. Opposing vertices are the remaining vertices of the one or two tetrahedra sharing the face. The buttons in this have the following effects:
• CT Split the face by the two dimensional Clough-Tocher split and cone to the opposing vertices.
• MS Proceed similarly with the two dimensional Morgan-Scott split.
• PS 6 Split the face by the Powell-Sabin 6 split, cone to the opposing vertices, and bisect the tetrahedra sharing an edge with the face.
• PS 12 Proceed similarly for the Powell-Sabin 12 split.
• pierce If the face is interior, pierce it with the line connecting the two opposing vertices. If that line does not pass through the interior of the face do nothing. If the face is a boundary face apply the two-dimensional CT split to that face.
• The remaining three buttons in that row take an edge of the face and split the two tetrahedra sharing that edge, so that the third point of the face and the two opposing vertices are planar. If the plane does not intersect the edge, or the face is a boundary face, do nothing. The indices of the buttons are actual vertex indices and change with the selection of the face. The blue fields to the left and right of the menu indicate indices of the opposing points.
• Row 5: weighted CT split of a face: This works similarly as Row 3, except it splits the face selected in Row 4.
• Row 6: Splitting an edge: Bisect an edge and cone the split point to all tetrahedra sharing the edge. As for tetrahedra and faces, the split point need not be the center but can be anywhere in the interior of the edge.

## Importing Configurations

Selecting the first item of the configuration menu brings up a dialog box that lets you enter a file name or a URL from which to read a configuration. To use a file you will need to use the downloaded version of the code. The browser version can only read a URL. Select "file" or "www", enter the file or URL name, and click on "LOAD" or "GET". LOAD will check the geometry of the imported file, GET will omit that potentially lengthy check. I recommend you use LOAD as a default, and, in any case, whenever importing a file for the first time. The data in the file are integers separated by spaces or commas, with no blank lines, and the data written in lines as follows:
• first line: V and N where V is the number of vertices and N is the number of tetrahedra.
• For each vertex, one line containing the coordinates of the vertex. These must be integers (between plus and minus 231-1).
• For each tetrahedron one line giving the indices of its vertices, starting with 0 and running through V-1.

### Example

The data file for the built-in Clough-Tocher split is
```5 4
8 24 24
8 0 24
-8 12 12
0 12 0
2 12 15
1 2 3 4
0 2 3 4
0 1 3 4
0 1 2 4
```

Caution: Errors in the data file can give rise to mysterious effects in the MDS code. Similar effects can be caused by entering collections of tetrahedra whose union is not homeomorphic to a ball. The code proceeds by checking smoothness conditions across interior faces. Conditions along edges and at points are contained in the face conditions. For example, the code is unable to handle the case of just two tetrahedra sharing only an edge or a vertex. If an improperly defined configuration is entered the code may (or may not) detect that situation. If an anomalous condition is detected the drawing window will appear gray. (It's a gray area, because you may know what you are trying to do, but the code may not behave as you expect or would like.)

To see the effect you can use the following data which define two tetrahedra sharing a common edge:
```6 2
0 1 0
0 0 0
1 0 0
1 1 0
0 0 1
1 1 1
0 1 2 4
0 2 3 5
```

### Available Import Files

1. nc.cmb The above two tetrahedra sharing an edge.
2. ct.cmb The Clough-Tocher split
3. pct.cmb pre-CT, the Clough-Tocher split with one tetrahedron (with vertices 0, 1, 2, 4) removed, (giving rise to a 3-orange).
4. ppct.cmb pre-pre-CT, the Clough-Tocher split with one more tetrahedron (0,1,3,4) removed, (giving rise to two tetrahedra sharing a face).
5. prism.cmb A triangular prism partitioned into three tetrahedra
6. 4or.cmb a symmetric 4-orange (four tetrahedra sharing one interior edge)
7. 4por.cmb a symmetric 4-preorange, the symmetric 4-orange with one tetrahedron removed.
8. g4or.cmb a generic 4-orange.
9. g4por.cmb a generic 4-preorange.

## General Assembly

Usually the smoothness conditions analyzed by 3DMDS will be conditions across faces that are shared by two tetrahedra. There is a limited facility to examine more general configurations where tetrahedra may share only edges or vertices.
To use this feature click on the button labeled "general" in the second row of the control panel, next to the configuration selection menu, or select "general assembly", the last item in that menu. A new control window titled "general assembly" will appear. It controls a tetrahedron T with vertices V0, V1, V2, and V3, that can have other tetrahedra attached. You select those other tetrahedra by clicking on the corresponding check boxes. For example, selecting F012 and V3 will generate a configuration of three tetrahedra, where one is attached to T across the face F012, and another is attached just at the vertex V3. The check boxes are linked. For example, selecting edge E01 also selects vertices 0 and 1, and there will be only one tetrahedron sharing edge E01. The Clear button resets all check boxes. The button "After" creates the configuration with T present. The button "Before" does the same with T absent. The "Initialize" button initializes the linear algebra. It has the same effect as the initialize button on the control panel. By clicking on "Before", computing the dimension, then clicking on "After", and computing the dimension (by clicking on "initialize"), you can compute the change in the dimension y the kind of assembly your considering. You can also compute the difference simply by clicking on "difference" in the general assembly panel. Many of the ordinary controls work for the general assembly step, but not all of them.
The menu on the general control panel let's you select from a set of more complicated configurations. Currently these include:
• assembly. This is the default. It means the remainder of the panel is active as described above.
• square torus. This is a torus obtained by punching out the central cube of a square slab. The configurations consists of 16 vertices and 24 tetrahedra.
• generic square torus. A geometrically less regular version of the square torus.
• symmetric cave. The symmetric Morgan-Scott split with the central tetrahedron removed.
• generic cave. Similarly, the generic Morgan-Scott split with the central tetrahedron removed.
• triangular torus. This is a torus obtained by connecting three triangular prisons, each consisting of 3 tetrahedra, in a ring. There a re 9 points and 9 tetrahedra.
• generic triangular torus. A geometrically less regular version of the triangular torus.

Additional general configurations can be imported via the dialog box as described in the previous section. Make sure you select "general file" or "general" URL before loading the configuration. General configurations can be assembled in the sequence in which the tetrahedra are given to the software. This is specified for the built in configurations, but you can download them, modify them, and import them. Pressing the button build on the control panel writes a sequence of tetrahedra to standard output, and lists how each is joined to the growing decomposition. Pressing Bounds after pressing build computes upper and lower bounds on the spline space and write those bounds to standard output. Click here for a
table of assembly steps.

## Standard Output

The code provides information to standard output which is directed to your terminal, or to the java console if the code is used via a browser. That information includes data on the combinatorics and geometry of the configuration, and of the system of smoothness conditions. If a gray condition is present it contains information on that condition, including any java generated error messages.

## Selecting Polynomial and Smoothness Degrees

This is analogous to the 2D software.

## Display of Domain Point Indices

By default the indices of domain points are suppressed. However, they can be displayed in the drawing window.

The button coords turns the index display feature on and off. The button labeled dynamic switches between the two possible locations of the indices (upper right corner or close to the domain point). The domain point whose indices are being displayed can be marked as the cursor moves around. The button Dps turns this feature on and off. The display of the indices sometimes becomes corrupted, to clear the screen (in this and other circumstances) hit the space bar.

Four formats for the indices are available. They are used for screen display and for file output. Select them with the menu next to the Button labeled coords.

## Naming Vertices

Vertices can be named, for better comprehensibility, and for use in written output. To invoke the feature click on the Button labeled vtx names. The vertex name control panel appears. You can set the name of each vertex, and the color in which it is displayed in the drawing window. The button Setit makes the new notation appear on the screen. In stand alone mode the names of the vertices can be saved in a file and restored from that file.

## Selecting points for the minimal determining set.

(Left) clicking on a green point selects the point for inclusion in the MDS. Clicking on a red point deselects that point. Clicking on a blue or (small) black point has no effect (except possibly causing initialization of the linear system).

Domain points may be selected in groups for inclusion or exclusion in the MDS. Such groups may be associated with vertices, edges, faces, or tetrahedra. A point is eligible if it is either included in the growing MDS, or it is still available for inclusion. (Implied points and inactive points are not eligible.) Eligible points are red or green, and they must have been drawn. (They are unaffected by zooming, however.) The following modes are available. Select them with the menu at the beginning of the third row.
1. Point The default mode in which one point is selected at a time. This mode is indicated by a white background, the other modes have a light green background.
2. Vertex Select a vertex by clicking on it. (A blue square is drawn around it to indicate your selection.) Then click on an eligible point P. All points that have a distance no greater than P from the vertex, and that have the same status (color) as P, are processed as is they have been clicked. (P itself is processed first.)
3. Edge Similar to vertex mode except that you start by selecting an edge by clicking on a domain point in its interior. The selected edge is drawn in blue .
4. Face Similar to edge and vertex mode, except you start by selecting a face by clicking on a domain point in its interior.
5. Tetrahedron Click on an eligible domain point in the interior of the tetrahedron. That point, and all points with the same status in the tetrahedron (including its boundary) are processed immediately.
6. Hull Click on an eligible point P. All points with the same status in the convex hull of the vertices that correspond to nonzero indices of P are processed immediately. (Thus you can easily determine whole lines, faces, and tetrahedra, but you can't include, for example, all points up to distance r from an edge.)
7. visible Click on an eligible point P. All points that are being drawn (or would be drawn in a window that shows the entire configuration) and have the same status as P are processed. P itself is processed immediately. This is useful when displaying domain points selectively as described elsewhere in this guide.

## Rotating the Configuration

The right mouse button is used for rotating the configuration. (Alternatively you can use the left button while keeping the Control Button on your key board pressed.) Right click somewhere, keep the button down, and drag the mouse. You will see an outline of the configuration following your mouse movements. Releasing the mouse button will cause a full new picture to be drawn. Right clicking without mouse movement causes a display of the outline which may be useful for reminding yourself of the underlying geometry. The initial view of the configuration can be restored by pressing on the button labeled identity. (The underlying rotation matrix becomes the identity matrix.)

## Zooming In and Out

The middle mouse button is the zoom button. (Alternatively, you can use the left button while keeping the shift button on your key board down.) To zoom in on a rectangular part of the drawing click on a corner of the rectangle, keep the middle button down, drag the mouse to the diagonally opposite corner, and release the button. To zoom out double click the middle button anywhere in the drawing window. To show the entire configuration in the drawing window click on size in the Control Panel.

## Displaying Domain Points and Tetrahedra Selectively

Clicking on the Button selections brings up a new Panel, The Selection Panel that can be used to display subsets of domain points. The buttons and Menus have the following effects:
• Flush, Stop, and Quit have the same effect as the corresponding buttons on the main control panel, they are repeated here for convenience.
• The effect of the following buttons and menus is immediate:
• CLEAR removes all selections and displays all points.
• Hide makes the Selection Panel invisible (and displays all points). To make it reappear click again on selections in the main Control Panel.
• Interior causes only interior points of an edge, face, or tetrahedron to be drawn.
• Pressing Tets causes all domain points to disappear. Interior points of tetrahedra can then be drawn for individual tetrahedra by selecting tetrahedra one at a time on the Tetrahedron Menu in the second row. In this mode, a selection can be undone by reselecting the tetrahedron. This is particularly useful in conjunction with the partial, in which only a subset of the tetrahedra will be drawn. Those tetrahedra are associated with specific interior domain points. However, drawing those domain points can be suppressed by choosing their diameter to be zero (on the main control panel).
• None draws the configuration with no domain points at all.
• V draws domain points at all vertices.
• E draws domain points on all edges and vertices.
• F draws domain points on all faces, edges, and vertices.
• All draws all domain points.
• Radius selects a distance rho that effects the selections caused by some of the other menus in that row.
• Tetrahedron displays all domains point belonging to the selected tetrahedron.
• Face displays all domains points within a distance rho (selected by radius) of the selected face.
• Edge displays all domains points within a distance rho (selected by radius) of the selected edge.
• Vertex displays all domains points within a distance rho (selected by radius) of the selected vertex.
• Partial Suppresses or enables the drawing of tetrahedra that are not associated with any displayed domain points. In conjunction with the tets button it can be used to display any particular set of tetrahedra.
• The Partial, Interior, and Tets buttons indicate by their color whether they are active (green) or not (red).
The Selection Panel is specific to the current configuration, and the current value of d. Changing either causes the Selection Panel to disappear. You can obtain a new Selection Panel specific to the new configuration or value of d by clicking on selections on the main control panel.

There is a secondary way to remove points from the drawing. After clicking on Remove in the Control Window, clicking with the middle button on a single point P in the drawing window will remove all points whose indices have zero values wherever P has a zero index. Clicking on Undelete will undo these selections.

Regardless of which domain points are displayed, the analysis of the minimal determining set will take into account all of the domain points.

## Analyzing Subconfigurations

If only a subset of the tetrahedra is displayed spline spaces can be analyzed on that subset. In the selection panel, click on Reduce to treat the subset as an ordinary configuration or on General if it needs to be considered a general assembly. The old vertex names will be maintained.

There is a shortcut for analyzing spline spaces on stars of vertices, edges, or faces. In the main control panel, click on stars. A new panel will appear. It has three menus where you can select a face, edge, or vertex. Only those facets that are shared by at least two, but fewer than all, current tetrahedra, are available for selection.

## Marking Edges and Faces

The bottom row of the selections panel can be used to mark specific edges by drawing dashed, and specific faces by shading them with a transparent blue color. The two menus toggle the status of the edge of face. The text window and its associated buttons can be used to select the degree of transparency.

## Defining Super Splines

Smoothness requirements can be increased around specific vertices or edges and across faces. The resulting splines are called "super splines".

The fifth row of the control panel is dedicated to controlling super spline mode (including special conditions, see the next section). To enter that mode click on the button labeled Super. (To exit it click on Super or on initialize.) The mode is indicated by a light blue background in the drawing window. To increase smoothness around a vertex (left) click on the vertex, to increase it around an edge click on an interior domain point of that edge, and to increase smoothness across a face, click on an interior domain point of that face. Clicking on an interior domain point of a tetrahedron has no effect. Supersmoothness is graphically indicated as follows:
• Vertex: There is a red circle around the vertex for every degree of Supersmoothness beyond r.
• Edge: There is one red line indicating the edge or parallel to the edge for each degree of supersmoothness beyond r.
• Face: Supersmoothness across a face is indicated by drawing it in red. The larger the degree of supersmoothness the darker the shade of red.
The Button Undo Super removes the most recently imposed supersmoothness conditions. It's particularly useful for correcting mistakes.

The Button list Super causes a list of the supersmoothness conditions to be printed to standard output. The most recently imposed supersmoothness condition is displayed in the Status Label.

The Button Clear Super removes all supersmoothness conditions.

The button start Over labels all domain points as yet undetermined. This will not effect currently imposed supersmoothness conditions (and in fact will leave intact the current internal MDS).

## Imposing Special Conditions

"special conditions" are individual supersmoothness conditions. They are of the familiar Bezier form, equating the value of a Bezier coordinate with the value of a subpolynomial on the opposing tetrahedron. The corresponding domain point is the "tip" of the condition. (In principle any spline space could be built by setting r=0 and imposing suitable special conditions.)

Special conditions come in two flavors, depending on the side of the face on which their tip is located. Both flavors can be imposed. If the conditions are "supported" (in the sense that all relevant lower order conditions are present) the two flavors are equivalent (in the sense that imposing either one or both has the same effect on the dimension and on any minimal determining set). If they are unsupported the two flavors may be independent (in the sense that their combined presence lowers the dimension by 2).

Special conditions, and the location of their tips, are indicated by shades of purple. A good way to become familiar with them is to use the configuration consisting of two neighboring tetrahedra and setting r=0.

After clicking on Special a new panel will appear. To impose special conditions you can use the panel or click in the drawing window.

• To use the drawing window proceed as follows:
• Select an interior face by clicking on one of its interior domain points. The face is outlined in orange. (Special conditions cannot be imposed in this manner if the polynomial degree is less than 3.) To select a new face, click again on an interior point of the old face, and then click on an interior point of the new face.
• Click on the tip of the smoothness condition. Several conditions associated with the same face can be so selected.
• To select a new face first deselect the old face, again by clicking on a point int its interior, and then select the new face by clicking on a point in its interior.
• To use the special panel proceed as follows:
• Select an interior face with the menu in the center of the panel.
• The blue labels to the left and right of the menu show the opposing vertices.
• A special condition is determined by the indices of the domain point forming its tip. The indices of that domain point are given in the yellow labels and the blue text fields in the third row of the special panel. The three blue indices go with the vertices of the face. You can change them by entering them directly, or using the increment and decrement buttons surrounding each text field.
• The indices in the yellow labels are always the same. To impose the special condition going with the vertex on the right of the face click on the right impose button. Similarly you can impose the left tipped condition by clicking on the left impose button.
• The system will not let you impose conditions of degree less than or equal to r although you are able to select such conditions of lesser order. (This possibility makes the use of increment and decrement buttons a little more flexible.)
• The special panel and the drawing window can be used interchangeably.
• To exit special mode click again on special or on initialize.
• To remove the most recently imposed special condition click on Undo Special on the control or special panel.
• To remove all special conditions click on Clear Special on the control or special panel.
• To list all currently imposed conditions click on Clear Special on the control or special panel. A listing like
```5 face: 0 3 4 - 2 : 1 2 3 4
```
indicates that the 5-th special condition is across the face with the vertices 0, 3, and 4, the tip of the condition is in the tetrahedron with that face and the additional vertex 2, and the indices of the tip, in the same sequence of vertices is 1, 2, 3, 4. Thus this is a fourth order condition. Note that numbering of the conditions starts at 0, and conditions may be repeated.
• The Hide button causes the special panel to disappear. (So does exiting the special mode.)

## Saving Supersmoothness and Special Conditions

The button write Super causes a list of current supersmoothness and special conditions to be written to the file cfg.super where cfg is file name selected earlier in the control panel. At a later stage these conditions can be read back into the system by clicking on read Super. Thus complicated sets of supersmoothness and special conditions need to be entered only once. However, the system does not check that the supersmoothness conditions being read are applicable to the current configuration and the current values of r and d. You will get strange errors if you write a set of supersmoothness conditions for the Morgan-Scott split and later read them into the Clough-Tocher split.

## Solving the Linear System Exactly, Examining Stability

It is possible to express the Bezier ordinates exactly in terms of the Bezier ordinates corresponding to a minimal determining set, using arbitrary precision rational arithmetic, or 64 bit floating point arithmetic. The stability of the minimal determining set can also be examined. Three Modes are available in this suite, listed in order of increasing complexity, and selected by the four buttons (collectively called the Analyze buttons) at the right end of line 4 in the control panel:
• Stability, The linear system is analyzed in 64 bit floating point arithmetic and the infinity norm of the matrix A is computed where c=Am. The vector m is the vector of coefficients corresponding to the minimal determining set, and c is the vector of coefficients implied by the smoothness conditions.
• Forward, the implied coefficients are written in terms of coefficients corresponding to the minimal determining sets and previously defined implied coefficients. This would be the most convenient way to define these coefficients in a computer code.
• Analyze, in addition to the previous my mentioned form, all implied coefficients are given explicitly in terms of the coefficients corresponding to the minimal determining set.
• Code, creates a file with the extension .code. Its primary contents consists of the matrix C where d = Cc, c is the vector of coefficients whose domain points are in the minimal determining set, and d is the vector of coefficients that's determined by the smoothness conditions.
To obtain these data click on any of the analyze buttons, set the minimal determining set, and click again on the button corresponding to the desired mode. The first click must take place immediately before initializing the Linear Algebra (e.g., by clicking on a point in the drawing window). The Analyze buttons change color to indicate that the Analyze mode has been enabled. Exact expressions for the determined Bezier ordinates are written into the file specified in the Control Panel, with the extension .explicit. This option is available only in the downloaded version. A particularly effective way of computing the exact solution is first to find the desired minimal determining set, then saving it using Write MDS, and only then resetting the linear Algebra, clicking on an analyze button, using Read MDS, and then clicking on the desired analyze button again. The resulting process can be lengthy and the resulting .explicit file can be large. At present the format of the file is such that it can be read into the symbol manipulation language Maple (where the maple expressions could be converted to any computer language). The coefficients in the definitions of the implied coefficients are rational numbers that may have numerators and denominators too large to be expressed in a particular programming language. If you don't specify a minimal determining set the internally generated set will be used. The result of the stability computation is listed in the drawing window, the control window, and standard output, but no file is written.

## Macro Elements

Special control panels are available to analyze macro elements. To invoke a panel select the appropriate configuration and then click on the button labeled macros next to the configuration menu. These control panels are described on separate pages:
1. The (single) Clough Tocher Split
2. The double Clough Tocher Split
3. The Morgan-Scott Split
4. The Worsey-Farin Split (This is the same as a single Clough-Tocher Face Split.
5. The double Clough-Tocher Face Split
6. The Morgan-Scott Face Split
The panels work on the symmetric and the generic versions of these splits, although usually one will want to use the symmetric version.

## Dimension Bounds

It's an ongoing research project to obtain upper and lower bounds on the dimension of (trivariate) spline spaces. The button bounds will display the best currently known bounds on the dimension to be displayed in the Status text field, and to standard input. Clicking on the headline of this section leads to extensive tables listing various bounds and dimensions.

Next to "Bounds" there are two more buttons, c.l.b. and c.u.b, for combinatorial upper and lower bounds. These two bounds consider only "strong" dependencies that are clear without doing any linear algebra. The upper bound is obtained by constructing a set of domain points that imply the others directly, as for example the tip of a smoothness condition is implied by the other points in the stencil of that condition. The lower bound is obtained by continuing to add points in such a way that all implied points are implied directly, there aren't any implication that require the analysis of a linear system. Both bounds include a set of points already chosen by the user. If the bounds so obtained equal the dimension then they yield a minimal determining set that implies all other points directly. For example, one might choose the points needed for the data in a finite element and then click on either c.l.b. or c.u.b. in an attempt to obtain a minimal determining set that can be easily understood and analyzed. Unfortunately this attempt fails in many practical cases, and the bounds on the dimension so obtained are much too large or small. The effort to find a suitable set may also be so large that the search becomes impractical. Also note that the code does not guarantee to find the largest lower bound or smallest upper bound that can be constructed in this manner. To use either combinatorial bound the display of strong dependencies must be enabled.

## Cells

Following bivariate nomenclature, a cell is a configuration with one interior vertex such that all tetrahedra share that vertex. Clicking on a the button labeled cells brings up a new control panel that lets you explore cells. This package is experimental, and rudimentary at present.

## Saving High Resolution Postscript Images

Pressing the button ps on the control panel brings up a new panel that lets you save the contents of the drawing window as a high resolution postscript image. The text field on the postscript panel lets you specify a file name, the save button actually saves the file, and the ColorMode button toggles between full color mode and gray scale (which may be required by some publishers). The menu on the postscript panel lets you specify several image sizes and aspect ratios, as follows:
• full letter (default). The image is scaled to fill US letter size (8.5 by 11 inches) completely.
• screen letter. The aspect ratio of the drawing window is preserved, but otherwise as much space as possible is used on letter size paper.
• screen. The screen size is used, with one pixel corresponding to 1 point (and 72 points corresponding to one inch). Thus very small or very large images independent can be obtained independent of the paper size.
• square letter. As large a square as possible (8.5 by 8.5 inches) on letter paper is filled.
• legal. US legal paper (8.5 by 11 inches) is filled.
• 11x17. 11 by 17 inches are filled.
• 17x22. 17 by 22 (four letter sheets) inches are filled.
• A4. European A4 (210 by 297 millimeters) is filled.

## Annotating a Drawing

The display in the drawing window can be annotated (and subsequently saved or printed), for use of the drawing in notes or publications. To activate the annotation panel click on the button labeled Annotate in the Control Panel.

The annotation text starts at the location indicated by x and y. These are screen coordinate measured in pixels with the origin in the upper left corner of the drawing window. The location where the text will start is indicated with a gray circle in the drawing window. You can select the font, style, size, and color of the selected text. Color is given by its RGB values ranging from 0 to 255. The default color is black.

Text is specified in the text field, and activated by clicking on Draw Text. Several items can be specified sequentially. The Erase button redraws the drawing window without the text, and thus erases all text.

## Saving and Printing

If the code is downloaded and used locally (as opposed to via a browser) an additional line is present in the control window. The first button in that line is labeled Print. It allows printing of the drawing window, and saving a postscript version of that window to a file.
The text field in that row lets you specify a file name to which the status of a session can be saved, by clicking on Save. Clicking on Restore will restore the status of your work, including any partial choice of the minimal determining set, and let you continue your work.
Clicking on "Save" will also generate two more files:
• A file with the extension ".tri" that lists the points and triangles. It can be used to import the configuration as described elsewhere.
• A file with the extension ".cmb" that describes the combinatorics of the configuration. This can be particularly useful after the vertices have been changed from their default values.

A Geomview (with the extension ".off") file can be obtained by pressing the button labeled gv. This works only in the downloaded version. The Geomview shows the same picture as the drawing window. In addition transparent triangular faces can be turned on or off with the button to the left of gv.

## Saving Minimal Determining Sets

In the downloaded version, the two buttons Write MDS and Read MDS can be used to save and restore complete or partial Minimal Determining Sets. When writing Dps the indices of the points currently selected for the minimal determining set are written to a file with the extension .MDS. The name of the file is the string listed in the text field of the fourth row. When reading the Dps the linear algebra is initialized if necessary, points are removed from the current MDS if such are present, and then the indices are read into the code and selected for the minimal determining set. If one of the stored points is actually implied by those read previously it is skipped, and a message is written to standard output. This may occur if the .MDS file is created with a different program, or if the indices are read in after modifying supersmoothness conditions.

## Shelling A Configuration

A configuration is shellable if it consists of a single tetrahedron or it can be obtained from a shellable configuration by joining one new tetrahedron to a shellable configuration at precisely 1, 2, or 3 faces. The two buttons in the lower right corner of the control panel create an explicit sequence in which the current configuration can be assembled. The Button labeled shell attempts to create a shelling sequence, the button labeled assemble creates a sequence in which the configuration can be assembled without having to have a shellable configuration throughout. The only example in the standard set of an unshellable configuration is Rudin's example. Since it has so many tetrahedra the attempt to shell that particular configuration is not likely to terminate in any reasonable amount of time. It can, however, be assembled. Shelling is an experimental feature, for details contact the author.

## Transparent Colors

It is possible to draw the domain points with transparent colors. Transparency may increase clarity somewhat in some applications. However, it takes much longer to draw images with transparent objects, so the utility of this facility is very limited.

To use transparency click on the button labeled Transparency in the upper right corner of the control panel. A new control panel will appear. The degree of transparency ranges from 0 (totally transparent) to 255 (totally opaque). The degree of transparency can be entered in the text field of the new panel, and incremented or decremented by the usual buttons in steps of 10 or 50. The default button toggles between opaque and a default transparency value of 100.

## Miscellaneous Controls

1. Silence toggles (most of) standard output on and off. It's on by default.
2. Strong turns off the indication of points that are directly implied, as for example the tip of a C1 condition by the four other points in its stencil. This saves memory and CPU time. Clicking on Strong again turns the feature back on, but it will become active only after the next initialization.
3. initialize initializes the linear algebra and computes an initial internal MDS. (That set depends on the details of pivoting in the Gaussian Elimination stage, and in general is not useful for any particular purposes other than getting the system ready.) Clicking on any green domain point for the first time has the same effect.
4. Complete initializes the linear algebra if necessary, and displays the internal MDS.
5. Restart removes all points from the current MDS.
6. reset removes any supersmoothness conditions, and resets the linear algebra.
7. grid toggles the drawing of the grid formed by the domain points.
8. Vtcs toggles the labeling of the vertices.
9. The text window labeled diameter and its two buttons can be used to change the size of the displayed domain points. If the diameter of the domain points is chosen to be zero they will be invisible.
10. listDps causes a list of the domain points to be printed to standard output.
11. show A displays some properties of the underlying matrix, specifically its dimensions and its density. The message "A Ok!" means that the row sums of the matrix are zero, as they should be. (If they are not zero you get an error message that hopefully you will never see. It contains the word "catastrophic".)
12. plot Matrix displays the non-zero pattern of the original linear system. Note that if the matrix is too large then the space allocated to an entry of the matrix may be less than a pixel, and so not every non-zero entry may be displayed separately.
13. plot reduced Matrix similarly displays the non-zero pattern of the reduced linear system, with the columns corresponding to the points in the current minimal determining set.
14. hidden toggles the display of hidden lines. To get a feeling for the geometry of a configuration it may be helpful to set r=0 or d=1, and rotate and display the configuration. Lines behind other lines are broken where the lines cross.
15. listEqs causes two files to be written. The first file name has the extension ".eqs". Its name is given in the text field in the fourth row of the control panel. Note that the coefficients in the equations are modulo the prime P. In most cases the equation can be taken verbatim, but for complicated geometries and high degrees of smoothness the displayed coefficients may be residual rather than the actual coefficients. The second file is a matlab program (with the extension ".m") that will define the integer matrix corresponding to the original equations. The same comments about residuals modulo P apply. These files are written during initialization of the linear algebra. If you need them right away click on Initialize after clicking on listEqs. They will be available as soon as the equations have been written, before the matrix is processed by the 3DMDS code.
16. identical toggles the suppression of identical equations prior to the initial Gaussian Elimination. Two equations are identical if corresponding coefficients are equal. For example, if r=d=1, then on the CT split there are 6 conditions, i.e., one across each interior face, but they are all identical equations. The size of the initial linear system can be reduced by clicking on this button prior to computing the initial internal MDS. The effect can be observed by clicking on the button plot A.
17. DP labels toggles the printing in the drawing window of the internal numbering applied to the domain points.
18. The buttons labeled Front and Back move the drawing window to the front or back, respectively, of the windows on the screen.
19. visible counts and displays the number of points drawn in the various categories: total number of points, inactive points, points assigned to the growing Minimal Determining Set, total number of points implied by those already chosen, number of those implied directly, and points not yet assigned or implied. The button labeled total does the same for all domain points, whether they are drawn or not. Note that "visible" points may be obscured by other points, or they may be outside the drawing window if a part of the configuration has been enlarged.

## Key Board Commands

At present the following key board commands are available:
1. -space- or -enter-, clear the screen of clutter or debris like corrupted domain point indices displays.
2. d decrease d by 1.
3. D increase d by 1.
4. r decrease r by 1.
5. R increase r by 1.
6. S undo all zooming.
7. p print the drawing window. Equivalent to pressing "Print". You can try this in the browser version, but it may not work.
8. u undoes a deletion of points, equivalent to pressing "undelete".
9. c (control) move the control window on top of everything else on the screen. (You can move the drawing window back on top by clicking on "Front" in the control window.)
10. g Toggle the drawing of the B-grid on and off.
11. x interrupt the current calculation.
12. X exit the system.

## Memory and Hash Mode

For large problems, depending on the amount of memory available, the software may use a hash table, instead of a matrix, for its analysis. In that case, to reduce the required amount of memory, the analysis of dependencies and the computation of the better upper bound are suppressed. On the other hand, for large problems, eliminating identical equations (which would reduce the required amount of memory) takes a large amount of time (more than the actual solution of the problem), and therefore is also suppressed in hash mode.

Switching to hash mode is automatic. The initial size of the hash table equals 0.2% of the size of the matrix involved, or less if required by a lack of memory.

Hashing significantly slows down the computation. A better approach, if it is available, is to use a computer with more memory, or to use a command (e.g., on a Unix system) that allocates more memory to your calculations, as in

``` 	java -ms1024m -mx1024m tv
```