.SH SPECIFYING SURFACES
.PP
Surfaces can be specified by either polynomials or general algebraic 
expressions.  Of course, polynomials can also be input as general expressions,
but there are advantages to entering polynomials as polynomials.  Polynomials
are often manipulated and evaluated somewhat faster than expressions for 
geodesics, though the reverse seems to be true for curvature lines.  Also, 
I believe the polynomial routines to be a little more bug free than the 
expression
routines.  Having two different sets of routines also allowed us to test the
routines by ensuring that polynomials treated as polynomials generate the same
output as polynomials treated as general expressions.
.PP
Implicitly defined surfaces are of the form f(x,y,z) = 0.  These surfaces are
entered by specifying, via either a polynomial or general expression, the
function f.  For example, the user should enter the 
surface x + y + z^2 = 1 by keying in "x + y + z^2 - 1" as a general expression
or a polynomial.
.PP
Polynomials are entered just as one would expect except that multiplication
signs must be omitted and exponents must be integers (positive, negative, or 
zero).  Valid operators are plus, minus, exponentiation ("^"), and unary minus.
Parentheses and division are not allowed.  Only variables can be taken to 
powers, not constants.  Variables must be entered in lower case, and
only "x", "y", and "z" should be used as variable names for implicitly defined 
surfaces.  The coefficient, if there is one, must precede the variables in each
term ("3x" is valid; "x3" is not).  An example polynomial is ".45x^2 + xy^-2z -
-z + 3".
.PP
General expressions are entered as they usually are on computers.  Valid 
operators in order of decreasing precedence are:

.RS .5i
unary minus ("-")
.PP
natural log ("ln"), square root ("sqrt"), sin ("sin"), and cos ("cos")
.PP
exponentiation ("^")
.PP
multiplication ("*") and division ("/")
.PP
addition ("+") and subtraction ("-")
.RE

The argument to named functions like sin can be in parentheses but that is not
required.  Note that "sin x^2" is the same as "(sin x)^2", not "sin (x^2)".
Constants don't have to include a decimal point, but if they do they
must have a digit on each side of it.  For example, "3" and "0.3" are valid
constants while "3." and ".3" are invalid constants.  Additionally, 
"e" and "pi" can be entered as a shorthand for 2.718281828... and 
3.141592653....  As with polynomials, variables must be entered in lower case,
and only "x", "y", and "z" should be used as variable names for implicitly 
defined surfaces.  It is legal for exponents to be floating point constants or 
even variables.

