(* Copyright 1993 Alfred Gray *)

BeginPackage["ICURVES2D`","Graphics`ImplicitPlot`"]

    agnesiimplicit::usage="agnesiimplicit[a][x,y]==0 is the nonparametric
form of the parametrized curve t->2*a*{Tan[t],Cos[t]^2}."

     astroidimplicit::usage="astroidimplicit[n,a,b][x,y]==0 is the
nonparametric form of the parametrized curve t->{a*Cos[t]^n,b*Sin[t]^n}."

    cardioidimplicit::usage="cardioidimplicit[a][x,y]==0 is the nonparametric
form of the parametrized circle t->a*(1 + Cos[t])*{Cos[t],a*Sin[t]}."

    cassini::usage="cassini[a,b][x,y]==0 the nonparametric form of an
oval of Cassini: (x^2 + y^2 + a^2)^2 - b^4 - 4a^2*x^2==0."

    circleimplicit::usage="circleimplicit[a][x,y]==0 is the nonparametric
form of the parametrized circle t->{a*Cos[t],a*Sin[t]}."

    cissoidimplicit::usage="cissoidimplicit[a][x,y]==0 is the nonparametric
form of the parametrized curve t->{2*a*t^2/(1 + t^2),2*a*t^3/(1 + t^2)}."

    conchoidimplicit::usage="conchoidimplicit[a,b][x,y]==0 is the
nonparametric form of the parametrized curve
t->{b + a*Cos[t],b*Tan[t] + a*Sin[t]}."

    cubicparabolaimplicit::usage="cubicparabolaimplicit[a,b,c,d][x,y]==0
is the nonparametric form of the parametrized curve
t->{t,a*t^3 + b*t^2 + c*t + d}."

    deltoidimplicit::usage="deltoidimplicit[a][x,y]==0 is the
nonparametric form of the parametrized curve
t->{2*a*Cos[t]*(1 + Cos[t]) - a,2*a*Sin[t]*(1 - Cos[t])}."

    devil::usage="devil[a,b][x,y]==0 the nonparametric form of the
devil's curve: y^2*(y^2 - b^2) - x^2*(x^2 - a^2)==0."

    ellipseimplicit::usage="ellipseimplicit[a,b][x,y]==0 is the
nonparametric form of the parametrized curve t->{a*Cos[t],b*Sin[t]}."

    foliumimplicit::usage="foliumimplicit[x,y]==0 is the
nonparametric form of the parametrized curve
t->{3*t/(1 +t^3),3*t^2/(1 + t^3)}."

    hyperbolaimplicit::usage="hyperbolaimplicit[a,b][x,y]==0 is the
nonparametric form of the parametrized curve t->{a*Cosh[t],b*Sinh[t]}."

    lemniscateimplicit::usage="lemniscateimplicit[a][x,y]==0 is the
nonparametric form of the parametrized curve
t->{a*Cos[t],a*Sin[t]*Cos[t]}/(1 + Sin[t]^2)."

    limaconimplicit::usage="limaconimplicit[a,b][x,y]==0 is the nonparametric
form of the parametrized curve t->(2*a*Cos[t]+b)*{Cos[t],Sin[t]}."

    nephroidimplicit::usage="nephroidimplicit[a][x,y]==0 is the
nonparametric form of the parametrized curve
t->a*{3*Cos[t] - Cos[3*t],3*Sin[t] - Sin[3*t]}."

    parabolaimplicit::usage="parabolaimplicit[a][x,y]==0 is the
nonparametric form of the parametrized curve t->{2*a*t,a*t^2}."

    piriformimplicit::usage="piriformimplicit[a,b][x,y]==0 is the
nonparametric form of the parametrized curve t->{a,b*Cos[t]}*(1 + Sin[t])."

    strophoidimplicit::usage="strophoidimplicit[a][x,y]==0 is the
nonparametric form of the parametrized curve
t->a*(t^2 - 1)/(t^2 + 1)*{1,t}. strophoidimplicit[m,a][x,y]==0 is the
nonparametric form of the parametrized curve
t->a*(t^2 - m)/(t^2 + 1){1,t}."

Begin["`Private`"]

    agnesiimplicit[a_][x_,y_]:= x^2*y - 4*a^2*(2*a - y)

    astroidimplicit[n_,a_,b_][x_,y_]:=
              (x/a)^(2/n) + (y/b)^(2/n) - 1

    cassini[a_,b_][x_,y_]:=
             (x^2 + y^2 + a^2)^2 - b^4 - 4*a^2*x^2

    cardioidimplicit[a_][x_,y_]:=
            (x^2 + y^2 - 2*a*x)^2 - 4*a^2*(x^2 + y^2)

    circleimplicit[a_][x_,y_]:= x^2 + y^2 - a^2

    cissoidimplicit[a_][x_,y_]:= x^3 + x*y^2 - 2*a*y^2

    conchoidimplicit[a_,b_][x_,y_]:=
                   (x^2 + y^2)*(x - b)^2 - a^2*x^2

    cubicparabolaimplicit[a_,b_,c_,d_][x_,y_]:=
          a*x^3 + b*x^2 + c*x + d - y

    deltoidimplicit[a_][x_,y_]:= (x^2 + y^2)^2 -
         8*a*x*(x^2 - 3*y^2) + 18*a^2*(x^2 + y^2) - 27*a^4

    devil[a_,b_][x_,y_]:= y^2*(y^2 - b^2) - x^2*(x^2 - a^2)

    ellipseimplicit[a_,b_][x_,y_]:= x^2/a^2 + y^2/b^2 - 1

    foliumimplicit[x_,y_]:= x^3 + y^3 - 3*x*y

    hyperbolaimplicit[a_,b_][x_,y_]:= x^2/a^2 - y^2/b^2 - 1

    lemniscateimplicit[a_][x_,y_]:=
               (x^2 + y^2)^2 - a^2*(x^2 - y^2)

    limaconimplicit[a_,b_][x_,y_]:=
         (x^2 + y^2 - 2a*x)^2 - b^2*(x^2 + y^2)

    nephroidimplicit[a_][x_,y_]:=
           (x^2 + y^2 - 4*a^2)^3- 108*a^4*y^2

    parabolaimplicit[a_][x_,y_]:= x^2 - 4*a*y

    piriformimplicit[a_,b_][x_,y_]:= a^4*y^2 - b^2*x^3*(2*a - x)

    strophoidimplicit[a_][x_,y_]:= y^2*(a - x) - x^2*(a + x)

    strophoidimplicit[m_,a_][x_,y_]:= y^2*(a - x) - x^2*(a*m + x)

End[]

EndPackage[]

