(*:Title: MINCURVS *)

(*:Author: Alfred Gray *)

(* Copyright 1994  by Alfred Gray *)

(*:Package Version: 1.0 *)

(*:Mathematica Version: 2.2 *)

(*:Summary: 
This package consists of definitions of parametrizations of minimal curves.
*)

(*:Keywords:
astroidmincurve, bourmincurve, cardioidmincurve, catalanmincurve, 
catenoidmincurve, cayleysexticmincurve, circleinvolutemincurve, 
cissoidmincurve, clothoidmincurve, cnchyprofilemincurve, cpcprofilemincurve, 
deltoidmincurve, ellipsemincurve, ennepercatenoidmincurve, ennepermincurve,
epicycloidmincurve, hennebergmincurve, hyperbolamincurve, hypocycloidmincurve, 
lemniscatemincurve, logspiralmincurve, nephroidmincurve, nielsenspiralmincurve, 
parabolamincurve, richmondmincurve, rosemincurve, scmincurve, tractrixmincurve, 
trinoidmincurve
*)

Print["For a list of minimal curves type mincurvs."]

BeginPackage["MINCURVS`"]

    mincurvs:=Print[Select[Names["MINCURVS`*"],#!="mincurvs"&]]

    astroidmincurve::usage="z->astroidmincurve[a][z] is the minimal curve
generated by the astroid t->astroid[a][t]."

    bourmincurve::usage="z->bourmincurve[m][z] is the minimal curve
corresponding to Bour's minimal surface of order m.
z->bourmincurve[m,n][z] is the minimal curve
corresponding to Bour's minimal surface of order {m,n}."

    cardioidmincurve::usage="z->cardioidmincurve[a][z] is the minimal curve
generated by the cardioid t->cardioid[a][t]."

    catalanmincurve::usage="z->catalanmincurve[a][z] is the minimal curve
corresponding to Catalan's minimal surface.  It contains a cycloid as a geodesic."

    catenoidmincurve::usage="z->catenoidmincurve[a][z] is the minimal curve
corresponding to a catenoid.  It contains a circle as a geodesic."

    cayleysexticmincurve::usage="z->cayleysexticmincurve[a][z] is the
minimal curve generated by the Cayley's sextic t->cayleysextic[a][t]."

    circleinvolutemincurve::usage="z->circleinvolutemincurve[n,a][z] is the
minimal curve generated by the nth involute starting at {a,0} of the
circle t->{a*Cos[t],a*Sin[t]}."

    cissoidmincurve::usage="z->cissoidmincurve[a][z] is the minimal curve
generated by the cissoid t->cissoid[a][t]."

    clothoidmincurve::usage="z->clothoidmincurve[a][z] is the minimal curve
generated by the clothoid t->clothoid[1,a][z]."

    cnchyprofilemincurve::usage="z->cnchyprofilemincurve[pm,a,b][z]
is the minimal curve generated by the curve t->cnchyprofile[pm,a,b][t].
The parameter pm is plus 1 or -1."

    cpcprofilemincurve::usage="z->cpcprofilemincurve[pm,a,b][z] is the
minimal curve generated by the curve t->cpcprofile[pm,a,b][t].
The parameter pm is plus 1 or -1."

    deltoidmincurve::usage="z->deltoidmincurve[a][z] is the minimal curve
generated by the deltoid t->deltoid[a][t]."

    ellipsemincurve::usage="z->ellipsemincurve[a,b][z] is the minimal curve
generated by the ellipse t->ellipse[a,b][t]."

    ennepermincurve::usage="z->ennepermincurve[n][z] is the minimal curve
corresponding to Enneper's minimal surface of order n."

    ennepercatenoidmincurve::usage="z->ennepercatenoidmincurve[z] is the
minimal curve whose Weierstrass representation is given by f(z)=1 and
g(z)=1/z + z^3."

    epicycloidmincurve::usage="z->epicycloidmincurve[a,b][z] is the
minimal curve generated by the epicycloid t->epicycloid[a,b][t]."

    hennebergmincurve::usage="z->hennebergmincurve[z] is the minimal curve
corresponding to Henneberg's minimal surface."

    hyperbolamincurve::usage="z->hyperbolamincurve[a,b][z] is the minimal curve
generated by the hyperbola t->hyperbola[a,b][t]."

    hypocycloidmincurve::usage="z->hypocycloidmincurve[a,b][z] is the
minimal curve generated by the hypocycloid t->hypocycloid[a,b][t]."

    lemniscatemincurve::usage="z->lemniscatemincurve[a][z] is the minimal curve
generated by the lemniscate t->lemniscate[a][t]."

    logspiralmincurve::usage="z->logspiralmincurve[a,b][z] is the minimal curve
generated by the logspiral t->logspiral[a,b][t]."

    nephroidmincurve::usage="z->nephroidmincurve[a][z] is the minimal curve
generated by the nephroid t->nephroid[a][t]."

    nielsenspiralmincurve::usage="z->nielsenspiralmincurve[a][z] is
the minimal curve generated by Nielsen's spiral t->nielsenspiral[a][t]."

    parabolamincurve::usage="z->parabolamincurve[a][z] is the minimal curve
generated by the parabola t->parabola[a][t]."

    richmondmincurve::usage="z->richmondmincurve[n][z] is the minimal curve
corresponding to Richmond's minimal surface of order n."

    rosemincurve::usage="z->rosemincurve[n,a][z] is the minimal curve
generated by the rose t->rose[n,a][t]."

    scmincurve::usage="z->scmincurve[z] is the minimal curve
generated by the semicubical parabola t->sc[t]."

    tractrixmincurve::usage="z->tractrixmincurve[a][z] is the minimal curve
generated by the tractrix t->tractrix[a][t]."

    trinoidmincurve::usage="z->trinoidmincurve[z] is the trinoid
minimal curve."

Begin["`Private`"]

    astroidmincurve[a_][z_]:={a*Cos[z]^3,a*Sin[z]^3,
                              (-3*I)/4*a*Cos[2*z]}

    bourmincurve[m_][z_]:=
        {z^(m - 1)/(m - 1) - z^(m + 1)/(m + 1),
         I*(z^(m - 1)/(m - 1) + z^(m + 1)/(m + 1)),
         2*z^m/m}

    bourmincurve[m_,n_][z_]:=
        {z^(m - 1)/(m - 1) - z^(m + 2*n - 1)/(m + 2*n - 1), 
         I*(z^(m - 1)/(m - 1) + z^(m + 2*n - 1)/(m + 2*n - 1)), 
         2*z^(m + n - 1)/(m + n - 1)}

    cardioidmincurve[a_][z_]:={2*a*Cos[z]*(1 + Cos[z]),
                               2*a*(1 + Cos[z])*Sin[z],
                               8*I*a*Sin[z/2]}

    catalanmincurve[a_][z_]:= {a*z - a*Sin[z],
                               a - a*Cos[z],
                               -4*I*a*Cos[z/2] + 4*I*a}

    catenoidmincurve[a_][z_]:={a*Cosh[z/a],z,-I*a*Sinh[z/a]}

(*
different: harmonictoanalytic[catenoid[a]][z]
*)

    cayleysexticmincurve[a_][z_]:=
                   {4*a*Cos[z/2]^4*(-1 + 2*Cos[z]),
                    4*a*Cos[z/2]^3*Sin[(3*z)/2],
                    3*I*a*(z + Sin[z])}

    circleinvolutemincurve[n_,a_][z_]:=
    Module[{tmp1,tmp2,tmp3},
         tmp1=E^(I*tt)Normal[Series[E^(-I*tt),{tt,0,n}]];
         tmp2=a*ComplexExpand[{Re[tmp1],Im[tmp1]}];
         tmp3=tmp2 /. tt->z;
         Append[tmp3,I*a*z^(n+1)/(n+1)!]]

    cissoidmincurve[a_][z_]:= {(2*a*z^2)/(1 + z^2),
                               (2*a*z^3)/(1 + z^2),
                       2*I*a*((4 + z^2)^(1/2) - 
     3^(1/2)*ArcTanh[(4 + z^2)^(1/2)/3^(1/2)])}

    clothoidmincurve[a_][z_]:=
            {a*Pi^(1/2)*FresnelS[z/Pi^(1/2)],
             a*Pi^(1/2)*FresnelC[z/Pi^(1/2)],
             I*a*z}

    cnchyprofilemincurve[pm_,a_,b_][z_]:=
                    {pm*b*Cosh[z/a],
                      -I*a*EllipticE[(I*z)/a,-(b^2/a^2)],
                       I*z}

    cpcprofilemincurve[pm_,a_,b_][z_]:= {b*pm*Cos[z/a],
                          a*EllipticE[z/a,b^2/a^2],I*z}

    deltoidmincurve[a_][z_]:={-a + 2*a*Cos[z]*(1 + Cos[z]),
                              2*a*(1 - Cos[z])*Sin[z],
                              (-8*I)/3*a*Cos[(3*z)/2]}

    ellipsemincurve[a_,b_][z_]:={a*Cos[z],
                                 b*Sin[z],
                I*b*EllipticE[z - a^2/b^2]}

    ennepermincurve[n_][z_]:={z - z^(2*n + 1)/(2*n + 1),
                              I*(z + z^(2*n + 1)/(2*n + 1)),
                              2*z^(n + 1)/(n + 1)}

    ennepercatenoidmincurve[z_]:={z^(-1) + z - (2*z^3)/3 - z^7/7, 
                                     -I/z + I*z + (2*I)/3*z^3 + I/7*z^7,
                                      z^4/2 + 2*Log[z]}

    epicycloidmincurve[a_,b_][z_]:=
              {(a + b)*Cos[z] - b*Cos[((a + b)*z)/b],
               (a + b)*Sin[z] - b*Sin[((a + b)*z)/b],
               (-4*I*b*(a + b)*Cos[(a*z)/(2*b)])/a}

    hennebergmincurve[z_]:= {(-8*Sinh[z]^3)/3,
                (8*I)/3 - 2*I*Cosh[z] - (2*I)/3*Cosh[3*z],
                 2*Cosh[2*z]}


    hyperbolamincurve[a_,b_][z_]:={a*Cos[z],
                                   b*Sin[z],
                    b*EllipticE[I*z + a^2/b^2]}

    hypocycloidmincurve[a_,b_][z_]:=
           {(a - b)*Cos[z] + b*Cos[((a - b)*z)/b],
            (a - b)*Sin[z] - b*Sin[((a - b)*z)/b],
            (-4*I*(a - b)*b*Cos[(a*z)/(2*b)])/a}

    lemniscatemincurve[a_][z_]:=
             {(a*Cos[z])/(1 + Sin[z]^2),
               (a*Cos[z]*Sin[z])/(1 + Sin[z]^2),
              I*a*EllipticF[z,- 1]}

    logspiralmincurve[a_,b_][z_]:={a*E^(b*z)*Cos[z],
                           a*E^(b*z)*Sin[z],
             (I*a*(1 + b^2)^(1/2)*E^(b*z))/b}

    nephroidmincurve[a_][z_]:=
           {a*(3*Cos[z] - Cos[3*z]),
            a*(3*Sin[z] - Sin[3*z]),
              -6*I*a*Cos[z]}

    nielsenspiralmincurve[a_][z_]:= 
        {a*CosIntegral[z],a*SinIntegral[z],I*a*Log[z]}

    parabolamincurve[a_][z_]:= {2*a*z,a*z^2,
        I*a*(z*(1 + z^2)^(1/2) + Log[z + (1 + z^2)^(1/2)])}

    richmondmincurve[n_][z_]:=
            {-1/(2*z) - z^(2*n + 1)/(4*n + 2),
             -I/(2*z) + I*z^(2*n + 1)/(4*n + 2),z^n/n}

    rosemincurve[n_,a_][z_]:= {a*Cos[z]*Cos[n*z],
                               a*Cos[n*z]*Sin[z],
                   (I*a*EllipticE[n*z,1 - n^2])/n}

    scmincurve[z_]:= {z^2,z^3,
         I*(4/(27*z) + z/3)*(4*z^2 + 9*z^4)^(1/2)}

    tractrixmincurve[a_][z_]:={a*Sin[z],
                               a*(Cos[z] + Log[Tan[z/2]]),
                        I*a*(Log[Cos[z/2]] + Log[Sin[z/2]])}

    trinoidmincurve[z_]:=
    {z/(6*(1 + z + z^2)) - 2*Log[1 - z]/9 + Log[1 + z + z^2]/9,
    -I*(z + z^2)/(6*(-1 + z^3)) + 2*I*ArcTan[(1 + 2*z)/Sqrt[3]]/Sqrt[27], 
    1/(3 - 3*z^3)}

End[]

EndPackage[]

