             Parallel Curves, Evolutes, and Caustics
                       by Adrian Mariano
                   email adrian@u.washington.edu

The following two packages were developed during the Summer of 1991
when I attended an NSF sponsored summer research.  A paper describing
the various curves should be available from the Geometry Center.



                           ParallelCurves.m
 
This package draws pictures related to parallel curves.

If gamma is a parametrically defined curve, and N is its normal, then
the parallel curves are
      gamma + r N 
where r is a scalar.

The evolute is defined as  
       gamma + N/kappa 
where kappa is the curvature of gamma.

The evolute is the set of all the cusps in all the parallel curves.
It is also the envelope of the lines normal to the curve.


CONVENTIONS

Surrounding an option with < > signs indicates that it is optional.

Many functions take a plotrange as an argument.  This is the section of
the graph to plot, and is of the form {{xmin, xmax}, {ymin, ymax}}.

FUNCTIONS


ParallelCurves[{fx,fy}, <{dfx, dfy}> , {u, umin, umax, ustep},
               plotrange, {tmin, tmax, tstep}, <graphoptions> ]

Plots a sequence of parallel curves.  The curves are plotted on
separate graphs, and nothing is returned by the function.  {fx,fy}
should parametrically specify a curve in terms of u as u ranges from
umin to umax.  The variable ustep indicates the sampling frequency.
These curves are defined by {fx,fy} + t N where N is a normal vector
to {fx,fy}.  If {dfx, dfy} is supplied, it is used as the tangent to
{fx,fy}.  If not, then the tangent is computed symbolically.  Any
series of extra parameters at the end of the invocation will be passed
on to ListPlot.  This function returns nothing.


ParallelCurvesOverlay

This function has exactly the same parameters as ParallelCurves, but
combines the curves on one graph, displays the graph, and returns the
graphics object.


ParallelCurves3D[{fx,fy}, {u, umin, umax, <ustep>}, plotrange, 
                 {zmin, zmax, <zstep>}, <graphoptions>]

This function is similar to the two previous functions, but it stacks
the graphs to form a three-dimensional surface. The z range specifies
which curves will be used, and graphoptions is passed on to
ParametricPlot3D.


Evolute[{fx, fy}, t, < Simplify->False >]

Given {fx, fy} a parametrized curve in t, Evolute returns an
expression for the evolute of the curve.  Turning off simplification
will disable internal calls to Mathematica's Simplify and TrigReduce
functions.

GraphEvolute[{fx, fy}, {t, tmin, tmax}, < GraphOpts >]

Graph the evolute of the curve specified parametrically, passing
GraphOpts to ParametricPlot.


Ellipsoid[a, b, c, phi, theta]

Returns the equation for an ellipsoid of semiaxes a, b, and c:
  {a Sin[theta] Cos[phi], b Sin[theta] Sin[phi], c Cos[phi] }


ParallelSurfaces[{fx,fy,fz}, {u, umin, umax, ustep}, {v, vmin, vmax, vstep},
PlotRange, {tmin, tmax, tcount}, <GraphOpts> ]

Draws the surfaces parallel to the surface specified parametrically in
{fx,fy,fz} as a function of u and v.  ParallelSurfaces Displays a
sequence of graphs, but returns nothing.


NormalLines[{fx,fy}, {t, tmin, tmax, tstep}, plotrange, <GraphOpts>]

Draws lines normal to the curve {fx,fy}, with spacing defined by tstep.
GraphOpts is passed to Show.


                     ParallelSurfacesFile.m

ParallelSurfacesFile[{fx,fy,fz}, {u, umin, umax, ucount}, 
        {v, vmin, vmax, vcount}, {tmin, tmax, tcount}, name]

Produces a C header file 'defs.h' which defines bounds,
and functions for generating the parallel surfaces
to the specified surface.  The variable name is a string
variable which is used as the suffix by the C program
for the data files it produces.  Here is a sample defs.h file:

#define TMIN 0.
#define TSTEP -0.666667
#define TCOUNT 10
#define UMIN 0.01
#define USTEP 0.0620035
#define UCOUNT 51
#define VMIN 0.
#define VSTEP 0.125664
#define VCOUNT 51
#define NAME "ellipsoid"
#define F1(u, v, t) 10*Cos(v)*Sin(u)....
#define F2(u, v, t) 6*Sin(u)*Sin(v) ....
#define F3(u, v, t) 6*Cos(u) + t*(60*Cos(u)*Power ....

The program makedata.c, included with this package, will use these
header files to generate data for MinneView.  Check fcns.h to insure
that any functions like "Cos" or "Power" are #defined, and then
compile and run.  If you supply 'uwrap' or 'vwrap' on the command line, 
the program will indicate to MinneView that the mesh is wrapped in
the u, or v directions respectively.

This function is not in a package, because placing it in a package
interfered with normal operation.  





                                Caustic.m


If light is shined from a point source onto a curved mirror, it
focuses on a curve called the caustic.  The orthotomic is an
intermediate curve used to obtain the caustic.  If gamma is a
parametrized curve, then the orthotomic of gamma relative to the point
S is given by
               2((gamma - S) . N ) N
and the caustic of gamma for the light source at S is the evolute
of the orthotomic.

Orthotomic[{fx,fy}, {i,j}, t, <Options>]

Returns an expression for the orthtomic of {fx,fy} with respect to the
point {x,y}.  The curve {fx,fy} is specified parametrically in t.  The
only option is to disable internal simplification via calls to
TrigReduce and Simplify with Simplify->False.

Caustic[{fx,fy}, {i,j}, t, <Options>]

Returns an expression for the caustic of {fx,fy} relative to the light
source {i,j}.  The only option is to disable internal simplification
with Simplify->False.

EqnEllipse[a, {i, j},  t]

If a caustic is drawn to an ellipse with axes a and 1 from a light
source at {i,j}, the caustic may have asymptotes.  The roots of this
equation of t give the t values for the points at infinity, assuming
the parametrization {a Cos[t], Sin[t]}.

EqnCircle[i, t]

If a caustic is drawn to a unit circle from the point {i,0}, it may
have asymptotes.  The roots of this equation of t give the t values
for the points at infinity, assuming the usual parametrization for the
circle.

CausticBadEqn[{fx,fy}, {i,j}, t]

Given the mirror defined by {fx,fy}, the caustic from {i,j} may have
asymtotes.  This function returns an equation whose roots are the
parameter values for the points at infinity of the specified caustic.

EllipseCaustic[a, {i, j}, t]

Gives the equation for a caustic to the ellipse {a Cos[t], Sin[t]}
from the point {i,j}.

CircleCaustic[i_, t_]

Gives the equation for the caustic to the unit circle from the point
{i,0}.


CircleCausticBad[i_]

Returns a list of parameter values near which the caustic to the unit
circle from {i,0} is not defined.

EllipseCausticBad[a, {i, j}]

Returns a list of parameter values near which the caustic to the
ellipse from {i,j} is not defined.


CausticBad[{fx,fy}, {i,j}, {t, tmin, tmax}]

Returns the points in {tmin, tmax} which give bad sections of the
caustic to {fx,fy} from {i,j}.

PlotCircleCaustic[i, plotrange, <Options>]
PlotEllipseCaustic[a, {i, j}, plotrange, <Options>]
PlotCaustic[{fx,fy}, {i, j}, {t, tmin, tmax}, plotrange, <Options>]

Plot the caustic to a unit circle, ellipse, or arbitrary curve.  This
function will graph the caustics and properly handle asymptotes.  For
caustics to a circle, the light source is at {i,0}.  For arbitrary
caustics, the mirror is defined by {fx,fy}, evaluated over the
specified range of t.

The options are
  ShowSource->False
  Normally the light source is displayed as a dot.  This can be disabled.
 
  DotSize->.015  
  The default size of the light source dot is .015.  This can be changed
  as desired

  ShowCurve->False
  By default, the mirror curve is displayed.  This can be disable.

Any other options are passed on to Show.







