(*:Title: ICURVS2D *)

(*:Author: Alfred Gray *)

(* Copyright 1994  by Alfred Gray *)

(*:Package Version: 1.0 *)

(*:Mathematica Version: 2.2 *)

(*:Summary: 
This package consists of definitions of implicitly defined plane curves.
*)

(*:Keywords:
agnesiimplicit, astroidimplicit, cardioidimplicit, cassini, circleimplicit, 
cissoidimplicit, conchoidimplicit, cubicparabolaimplicit, deltoidimplicit, 
devil, ellipseimplicit, foliumimplicit, hyperbolaimplicit, kepler, 
lemniscateimplicit, limaconimplicit, nephroidimplicit,  parabolaimplicit, 
piriformimplicit, scimplicit, semicubicimplicit, strophoidimplicit
*)

Print["For a list of implicitly defined plane curves type icurvs2d."]


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

    icurvs2d:=Print[Select[Names["ICURVS2D`*"],#!="icurvs2d"&]]

    agnesiimplicit::usage="agnesiimplicit[a][x,y]==0 is the nonparametric
form of the parametrized curve t->{2*a*Tan[t],2*a*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 curve
t->{a*(1 + Cos[t])*Cos[t],a*(1 + Cos[t])*Sin[t]}."

    cassini::usage="cassini[a,b][x,y]==0 is 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
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]}."

    kepler::usage="kepler[a,b][x,y]==0 is the
folium of Kepler."

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

    scimplicit::usage="scimplicit[x,y]==0 is the nonparametric form
of the semicubical parabola."

    semicubicimplicit::usage="semicubicimplicit[a,b,c,d][x,y]==0
is the nonparametric form of the curve y^2 = a*x^3 + b*x^2 + c*x + d."

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

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

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

    cassini[a_,b_][x_,y_]:=
             (x^2 + y^2 + a^2)^2 - b^4 - 4*a^2*x^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

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

    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)

    scimplicit[x_,y_]:=y^2-x^3

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

    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[]

