.TH "CURVATURE LINES" 1 "21 July 1989" "Project Riemann"
.SH NAME
impcurv, parcurv - compute the curvature lines on 3D surfaces
.SH SYNOPSIS
\fBimpcurv\fR [\fB-t\fI title\fR] [\fB-v \fIx y z\fR] [\fB-s \fIstep\fR]
[\fB-sp \fIspacing\fR] [\fB-1 \fIdistance1\fR] [\fB-2 \fIdistance2\fR] 
[\fIfile\fR] \fB-e \fIexpression \fR| \fB-p \fIpolynomial\fR

\fBparcurv\fR [\fB-t\fI title\fR] [\fB-v \fIs t\fR] [\fB-s \fIstep\fR]
[\fB-sp \fIspacing\fR] [\fB-1 \fIdistance1\fR] [\fB-2 \fIdistance2\fR] 
[\fB-2d \fIfile\fR] [\fIfile\fR] \fB-ex \fIexpression \fB-ey \fIexpression
\fB-ez \fIexpression \fR| \fB-px \fIpolynomial \fB-py \fIpolynomial 
\fB-pz \fIpolynomial
.SH DESCRIPTION
.PP
\fIImpcurv\fR and \fIparcurv\fR both compute the curvature lines on 
three-dimensional algebraic surfaces.  \fIImpcurv\fR works with implicitly 
defined
surfaces; that is, surfaces of the form f(x,y,z) = 0.  \fIParcurv\fR works
with parametrically defined surfaces; that is, surfaces of the form
x = f(s,t), y = g(s,t), and z = h(s,t).  Both programs take as input a 
description of the surface, using either polynomials or general algebraic
expressions (see SPECIFYING SURFACES below), and some other parameters.  Both
programs then compute the curvature lines on the surface.  The programs' output
can go either to files or to standard output.  \fIParcurv\fR generates two 
output files; one file describes the curvature lines in the parameter space and
the other in the regular, three-dimensional space.  In other words, one file
lists the values of s and t along the curvature lines while the other lists the
values of x, y, and z along the curvature lines.  The output is in a format that
can be displayed by the project Riemann X-Windows program \fIxdisp\fR or edited
with a text editor.  Note that \fIxdisp\fR can accept input from standard input
and thus the user can pipe the output of \fIimpcurv\fR and \fIparcurv\fR to 
\fIxdisp\fR.
.PP
The curvature line programs work as follows.  They start at the specified 
initial point and compute a curvature line \fIdistance1\fR units long.  We'll
say that this curvature line is in direction one.  They
then compute a second curvature line starting from the initial point, orthogonal
to the first curvature line, and \fIdistance2\fR units long.  This curvature 
line is in direction two.  The programs then compute curvature lines in 
direction one every \fIspacing\fR units along the initial direction two 
curvature line.  Finally, the programs compute curvature lines in direction
two every \fIspacing\fR units along the initial direction one curvature line.
.so userinterface
either a polynomial or an expression (or three polynomials or expressions for
\fIparcurv\fR) must be specified.
.PP
The programs can print out several warning messages for some points on some
surfaces.  \fIParcurv\fR prints out "Surface is degenerate" when the gauss
and mean curvature is (virtually) infinite.  This message indicates a very nasty
area of the surface.  \fIParcurv\fR and \fIimpcurv\fR handle umbilical points
differently.  Umbilical points are points where the curvature is the same in 
every direction.  A sphere, for example, contains nothing but umbilical points.
\fIParcurv\fR prints out "Using supplied curvature direction" at umbilical 
points and uses the previous curvature direction.  \fIImpcurv\fR prints out
"Choose a different starting point" at umbilical points and projects
the previous curvature direction vector into the tangent plane at the current 
point and uses this direction as the new direction vector.  Both programs will
generally fail when the starting point is an umbilical point.  In general, the
programs' handling of umbilical points is imperfect and hard to predict; the
programs sometimes handle umbilical points and sometimes don't.
.SH OPTIONS
.TP .5i
\fB-t \fItitle\fR
Specifies the title to be placed in the output file and displayed by 
\fIxdisp\fR.
.TP .5i
\fB-v \fIx y z\fR
Specifies the initial point (\fBv\fR stands for vector) for \fIimpcurv\fR.  This
point must be on the surface and will end up being at the corner of the 
curvature line mesh.
.TP .5i
\fB-v \fIs t\fR
Specifies the initial point (\fBv\fR stands for vector) in the parameter space 
for \fIparcurv\fR.  This point will end up being at the corner of the curvature
line mesh.
.TP .5i
\fB-s \fIstep\fR
Specifies the step size.  A point is computed and output every \fIstep\fR units
along each curvature line.
.TP .5i
\fB-sp \fIspacing\fR
Specifies the mesh spacing.  A curvature line is computed and output every 
\fIspacing\fR units along the two initial curvature lines.
.TP .5i
\fB-1 \fIdistance1\fR
Specifies the distance along direction one.  All the curvature lines in 
direction one are \fIdistance1\fR units long.
.TP .5i
\fB-2 \fIdistance2\fR
Specifies the distance along direction two.  All the curvature lines in 
direction two are \fIdistance2\fR units long.
.TP .5i
\fB-2d \fIfile\fR
Specifies the file to hold the parameter space output from \fIparcurv\fR.
.TP .5i
\fIfile\fR
Specifies the file to hold the output from \fIimpcurv\fR or the three-space
output from \fIparcurv\fR.
.TP .5i
\fB-e \fIexpression \fR| \fB-p \fIpolynomial
Specifies the surface for \fIimpcurv\fR.  One of these options must be present.
See SPECIFYING SURFACES below.  \fIExpression\fR and \fIpolynomial\fR usually 
need to be enclosed in quotes to prevent evaluation by the shell.
.PP
\fB-ex \fIexpression \fB-ey \fIexpression \fB-ez \fIexpression\fR | 
\fB-px \fIpolynomial \fB-py \fIpolynomial \fB-pz \fIpolynomial
.RS .5i
Specifies the surface for \fIparcurv\fR.  One of these two options must be 
present.  See SPECIFYING SURFACES below.  \fIExpression\fR and 
\fIpolynomial\fR usually need to be enclosed in quotes to prevent evaluation by
the shell.
.RE
.so surfaces
.PP
Recall that parametrically defined surfaces are of the form x = f(s,t), 
y = g(s,t), and z = h(s,t).  These surfaces are entered by specifying the
functions f, g, and h.  For example, the parametric equations of a cylinder are
x = cos s, y = sin s, and z = t.  So when \fIparcurv\fR asks for expressions
one, two, and three, the user should enter "cos s", "sin s", and "t".
When entering parametric surfaces, only "s" and "t" should 
be used as variable names.  The
polynomial and expression parsers recognize "s" and "t" as synonyms for
"x" and "y", and thus don't report an error if the user accidently slips an "x",
"y", or "z" into a parametric equation.  It is the user's responsibility to
ensure that his parametric equations only include the variables "s" and "t".
.so surfaces_test
.SH BUGS
.PP
\fIImpcurv\fR and \fIparcurv\fR often cannot deal with umbilical points, as
mentioned above, especially when the starting point is an umbilical point.
.so author

