(*:Title: METPROGS *)

(*:Author: Alfred Gray *)

(* Copyright 1994  by Alfred Gray *)

(*:Package Version: 1.0 *)

(*:Mathematica Version: 2.2 *)

(*:Summary: 
	This package consists of definitions of surface metrics
*)

(*:Keywords:
geopolar, liouville, poincare, poindisk, schwarzschildplane
*)

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

BeginPackage["METPROGS`"]

    metprogs:=Print[Select[Names["METPROGS`*"],#!="metprogs"&]]

    geopolar::usage="geopolar[f] is the
geodesic polar coordinate metric relative to the function f."

    liouville::usage="liouville[f,g] is the metric of a 
Liouville patch corresponding to the functions f and g."

    poincare::usage="poincare[lambda] is the metric on the
Poincare upper half plane with constant curvature -1/lambda^2.
poincare[m,n,lambda] is a generalization of the metric
poincare[lambda]."

    poindisk::usage="poindisk[lambda] is the metric on the
Poincare disk with constant curvature -1/lambda^2."

    schwarzschildplane::usage="schwarzschildplane[m] is the
2-dimensional Schwarzschild metric. schwarzschildplane[m,f] is the
2-dimensional Schwarzschild metric relative to the function $f$."

Begin["`Private`"]

    ee[geopolar[f_]][u_,v_]:= 1

    ff[geopolar[f_]][u_,v_]:= 0

    gg[geopolar[f_]][u_,v_]:= f[u,v]^2

    ee[liouville[f_,g_]][u_,v_]:= f[u] + g[v]

    ff[liouville[f_,g_]][u_,v_]:= 0

    gg[liouville[f_,g_]][u_,v_]:= f[u] + g[v]

    ee[poincare[lambda_]][u_,v_]:= 1/(lambda*v)^2

    ff[poincare[lambda_]][u_,v_]:= 0

    gg[poincare[lambda_]][u_,v_]:= 1/(lambda*v)^2

    ee[poindisk[lambda_]][u_,v_]:=
                  1/(1 - lambda^2*(u^2 + v^2)/4)^2

    ff[poindisk[lambda_]][u_,v_]:= 0

    gg[poindisk[lambda_]][u_,v_]:=
                  1/(1 - lambda^2*(u^2 + v^2)/4)^2

    ee[poincare[m_,n_,lambda_]][u_,v_]:= 1/(lambda*v)^m

    ff[poincare[m_,n_,lambda_]][u_,v_]:= 0

    gg[poincare[m_,n_,lambda_]][u_,v_]:= 1/(lambda*v)^n

    ee[schwarzschildplane[m_]][u_,v_]:=  -(1 - 2*m/v)

    ff[schwarzschildplane[m_]][u_,v_]:= 0

    gg[schwarzschildplane[m_]][u_,v_]:= (1 - 2*m/v)^-1

    ee[schwarzschildplane[m_,f_]][u_,v_]:=  -(1 - 2*m/v + f[v])

    ff[schwarzschildplane[m_,f_]][u_,v_]:= 0

    gg[schwarzschildplane[m_,f_]][u_,v_]:= (1 - 2*m/v + f[v])^-1
End[]

EndPackage[]

