Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 1286)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 1287)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-23 00:40:36 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-23 03:13:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 #include "psList.h"
 #include "psCoord.h"
+#include "psMemory.h"
 
 
@@ -27,5 +28,16 @@
                                const psPlane *coords)
 {
-    return(NULL);
+    if (out == NULL) {
+        out = (psPlane *) psAlloc(sizeof(psPlane));
+    }
+    out->x = transform->x->coeff[0][0] +
+             (transform->x->coeff[1][0] * coords->x) +
+             (transform->x->coeff[0][1] * coords->y);
+
+    out->y = transform->y->coeff[0][0] +
+             (transform->y->coeff[1][0] * coords->x) +
+             (transform->y->coeff[0][1] * coords->y);
+
+    return(out);
 }
 
@@ -37,14 +49,39 @@
                              float term4)
 {
-    return(NULL);
+    if (out == NULL) {
+        out = (psPlane *) psAlloc(sizeof(psPlane));
+    }
+
+    out->x = transform->x->coeff[0][0][0][0] +
+             (transform->x->coeff[1][0][0][0] * coords->x) +
+             (transform->x->coeff[0][1][0][0] * coords->y) +
+             (transform->x->coeff[0][0][1][0] * term3) +
+             (transform->x->coeff[0][0][0][1] * term4);
+
+    out->y = transform->y->coeff[0][0][0][0] +
+             (transform->y->coeff[1][0][0][0] * coords->x) +
+             (transform->y->coeff[0][1][0][0] * coords->y) +
+             (transform->y->coeff[0][0][1][0] * term3) +
+             (transform->y->coeff[0][0][0][1] * term4);
+
+    return(out);
 }
 
 
 
-psSphereTransform *psSphereTransform(double NPlon,
-                                     double NPlat;
-                                     double ZP)
+psSphereTransform *psSphereTransformAlloc(double NPlon,
+        double NPlat,
+        double ZP)
 {
-    return(NULL);
+    psSphereTransform *tmp = (psSphereTransform *) psAlloc(sizeof(psSphereTransform));
+
+    tmp->sinNPlon = sin(NPlon);
+    tmp->cosNPlon = cos(NPlon);
+    tmp->sinNPlat = sin(NPlat);
+    tmp->cosNPlat = cos(NPlat);
+    tmp->sinZP = sin(ZP);
+    tmp->cosZP = cos(ZP);
+
+    return(tmp);
 }
 
@@ -52,5 +89,5 @@
 void p_psSphereTransformFree(psSphereTransform *trans)
 {
-    return(NULL);
+    psFree(trans);
 }
 
@@ -68,4 +105,5 @@
 psSphereTransform *psSphereTransformICRStoEcliptic(void)
 {
+    // sla_EQECL();
     return(NULL);
 }
@@ -73,4 +111,5 @@
 psSphereTransform *psSphereTransformEcliptictoICRS(void)
 {
+    // sla_ECLEQ();
     return(NULL);
 }
@@ -78,4 +117,5 @@
 psSphereTransform *psSphereTransformICRStoGalatic(void)
 {
+    // sla_EQGAL();
     return(NULL);
 }
@@ -83,4 +123,5 @@
 psSphereTransform *psSphereTransformGalatictoICRS(void)
 {
+    // sla_GALEQL();
     return(NULL);
 }
Index: /trunk/psLib/src/astro/psCoord.h
===================================================================
--- /trunk/psLib/src/astro/psCoord.h	(revision 1286)
+++ /trunk/psLib/src/astro/psCoord.h	(revision 1287)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-23 00:40:36 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-23 03:13:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,5 +24,4 @@
 #include "psList.h"
 #include "psFunctions.h"
-
 
 typedef struct
@@ -69,31 +68,12 @@
 psSphereTransform;
 
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords);
-
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4);
-
-
-psSphereTransform *psSphereTransform(double NPlon,
-                                     double NPlat;
-                                     double ZP);
-
-void p_psSphereTransformFree(psSphereTransform *trans);
-
-
-
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord);
-
-psSphereTransform *psSphereTransformICRStoEcliptic(void);
-psSphereTransform *psSphereTransformEcliptictoICRS(void);
-psSphereTransform *psSphereTransformICRStoGalatic(void);
-psSphereTransform *psSphereTransformGalatictoICRS(void);
+typedef enum {
+    PS_PROJ_TAN,   ///< Tangent projection
+    PS_PROJ_SIN,   ///< Sine projection
+    PS_PROJ_AIT,   ///< Aitoff projection
+    PS_PROJ_PAR,   ///< Par projection
+    PS_PROJ_GLS,   ///< GLS projection
+    PS_PROJ_NTYPE   ///< Number of types; must be last.
+} psProjectionType;
 
 typedef struct
@@ -108,11 +88,46 @@
 
 typedef enum {
-    PS_PROJ_TAN,   ///< Tangent projection
-    PS_PROJ_SIN,   ///< Sine projection
-    PS_PROJ_AIT,   ///< Aitoff projection
-    PS_PROJ_PAR,   ///< Par projection
-    PS_PROJ_GLS,   ///< GLS projection
-    PS_PROJ_NTYPE   ///< Number of types; must be last.
-} psProjectionType;
+    PS_SPHERICAL,
+    PS_LINEAR
+} psSphereOffsetMode;
+
+typedef enum {
+    PS_ARCSEC,
+    PS_ARCMIN,
+    PS_DEGREE,
+    PS_RADIAN
+} psSphereOffsetUnit;
+
+psPlane *psPlaneTransformApply(psPlane *out,
+                               const psPlaneTransform *transform,
+                               const psPlane *coords);
+
+psPlane *psPlaneDistortApply(psPlane *out,
+                             const psPlaneDistort *transform,
+                             const psPlane *coords,
+                             float term3,
+                             float term4);
+
+
+psSphereTransform *psSphereTransformAlloc(double NPlon,
+        double NPlat,
+        double ZP);
+
+void p_psSphereTransformFree(psSphereTransform *trans);
+
+psSphere *psSphereTransformApply(psSphere *out,
+                                 const psSphereTransform *transform,
+                                 const psSphere *coord);
+
+psSphereTransform *psSphereTransformICRStoEcliptic(void);
+psSphereTransform *psSphereTransformEcliptictoICRS(void);
+psSphereTransform *psSphereTransformICRStoGalatic(void);
+psSphereTransform *psSphereTransformGalatictoICRS(void);
+
+psPlane *psProject(const psSphere *coord,
+                   const psProjection *projection);
+
+psSphere *psProject(const psPlane *coord,
+                    const psProjection *projection);
 
 psSphere *psSphereGetOffset(const psSphere *restrict position1,
@@ -126,15 +141,6 @@
                             psSphereOffsetUnit unit);
 
-typedef enum {
-    PS_SPHERICAL;
-    PS_LINEAR;
-} psSphereOffsetMode;
 
-typedef enum {
-    PS_ARCSEC;
-    PS_ARCMIN;
-    PS_DEGREE;
-    PS_RADIAN;
-} psSphereOffsetUnit;
+
 
 #endif
Index: /trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.c	(revision 1286)
+++ /trunk/psLib/src/astronomy/psCoord.c	(revision 1287)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-23 00:40:36 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-23 03:13:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 #include "psList.h"
 #include "psCoord.h"
+#include "psMemory.h"
 
 
@@ -27,5 +28,16 @@
                                const psPlane *coords)
 {
-    return(NULL);
+    if (out == NULL) {
+        out = (psPlane *) psAlloc(sizeof(psPlane));
+    }
+    out->x = transform->x->coeff[0][0] +
+             (transform->x->coeff[1][0] * coords->x) +
+             (transform->x->coeff[0][1] * coords->y);
+
+    out->y = transform->y->coeff[0][0] +
+             (transform->y->coeff[1][0] * coords->x) +
+             (transform->y->coeff[0][1] * coords->y);
+
+    return(out);
 }
 
@@ -37,14 +49,39 @@
                              float term4)
 {
-    return(NULL);
+    if (out == NULL) {
+        out = (psPlane *) psAlloc(sizeof(psPlane));
+    }
+
+    out->x = transform->x->coeff[0][0][0][0] +
+             (transform->x->coeff[1][0][0][0] * coords->x) +
+             (transform->x->coeff[0][1][0][0] * coords->y) +
+             (transform->x->coeff[0][0][1][0] * term3) +
+             (transform->x->coeff[0][0][0][1] * term4);
+
+    out->y = transform->y->coeff[0][0][0][0] +
+             (transform->y->coeff[1][0][0][0] * coords->x) +
+             (transform->y->coeff[0][1][0][0] * coords->y) +
+             (transform->y->coeff[0][0][1][0] * term3) +
+             (transform->y->coeff[0][0][0][1] * term4);
+
+    return(out);
 }
 
 
 
-psSphereTransform *psSphereTransform(double NPlon,
-                                     double NPlat;
-                                     double ZP)
+psSphereTransform *psSphereTransformAlloc(double NPlon,
+        double NPlat,
+        double ZP)
 {
-    return(NULL);
+    psSphereTransform *tmp = (psSphereTransform *) psAlloc(sizeof(psSphereTransform));
+
+    tmp->sinNPlon = sin(NPlon);
+    tmp->cosNPlon = cos(NPlon);
+    tmp->sinNPlat = sin(NPlat);
+    tmp->cosNPlat = cos(NPlat);
+    tmp->sinZP = sin(ZP);
+    tmp->cosZP = cos(ZP);
+
+    return(tmp);
 }
 
@@ -52,5 +89,5 @@
 void p_psSphereTransformFree(psSphereTransform *trans)
 {
-    return(NULL);
+    psFree(trans);
 }
 
@@ -68,4 +105,5 @@
 psSphereTransform *psSphereTransformICRStoEcliptic(void)
 {
+    // sla_EQECL();
     return(NULL);
 }
@@ -73,4 +111,5 @@
 psSphereTransform *psSphereTransformEcliptictoICRS(void)
 {
+    // sla_ECLEQ();
     return(NULL);
 }
@@ -78,4 +117,5 @@
 psSphereTransform *psSphereTransformICRStoGalatic(void)
 {
+    // sla_EQGAL();
     return(NULL);
 }
@@ -83,4 +123,5 @@
 psSphereTransform *psSphereTransformGalatictoICRS(void)
 {
+    // sla_GALEQL();
     return(NULL);
 }
Index: /trunk/psLib/src/astronomy/psCoord.h
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.h	(revision 1286)
+++ /trunk/psLib/src/astronomy/psCoord.h	(revision 1287)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-23 00:40:36 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-23 03:13:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,5 +24,4 @@
 #include "psList.h"
 #include "psFunctions.h"
-
 
 typedef struct
@@ -69,31 +68,12 @@
 psSphereTransform;
 
-psPlane *psPlaneTransformApply(psPlane *out,
-                               const psPlaneTransform *transform,
-                               const psPlane *coords);
-
-psPlane *psPlaneDistortApply(psPlane *out,
-                             const psPlaneDistort *transform,
-                             const psPlane *coords,
-                             float term3,
-                             float term4);
-
-
-psSphereTransform *psSphereTransform(double NPlon,
-                                     double NPlat;
-                                     double ZP);
-
-void p_psSphereTransformFree(psSphereTransform *trans);
-
-
-
-psSphere *psSphereTransformApply(psSphere *out,
-                                 const psSphereTransform *transform,
-                                 const psSphere *coord);
-
-psSphereTransform *psSphereTransformICRStoEcliptic(void);
-psSphereTransform *psSphereTransformEcliptictoICRS(void);
-psSphereTransform *psSphereTransformICRStoGalatic(void);
-psSphereTransform *psSphereTransformGalatictoICRS(void);
+typedef enum {
+    PS_PROJ_TAN,   ///< Tangent projection
+    PS_PROJ_SIN,   ///< Sine projection
+    PS_PROJ_AIT,   ///< Aitoff projection
+    PS_PROJ_PAR,   ///< Par projection
+    PS_PROJ_GLS,   ///< GLS projection
+    PS_PROJ_NTYPE   ///< Number of types; must be last.
+} psProjectionType;
 
 typedef struct
@@ -108,11 +88,46 @@
 
 typedef enum {
-    PS_PROJ_TAN,   ///< Tangent projection
-    PS_PROJ_SIN,   ///< Sine projection
-    PS_PROJ_AIT,   ///< Aitoff projection
-    PS_PROJ_PAR,   ///< Par projection
-    PS_PROJ_GLS,   ///< GLS projection
-    PS_PROJ_NTYPE   ///< Number of types; must be last.
-} psProjectionType;
+    PS_SPHERICAL,
+    PS_LINEAR
+} psSphereOffsetMode;
+
+typedef enum {
+    PS_ARCSEC,
+    PS_ARCMIN,
+    PS_DEGREE,
+    PS_RADIAN
+} psSphereOffsetUnit;
+
+psPlane *psPlaneTransformApply(psPlane *out,
+                               const psPlaneTransform *transform,
+                               const psPlane *coords);
+
+psPlane *psPlaneDistortApply(psPlane *out,
+                             const psPlaneDistort *transform,
+                             const psPlane *coords,
+                             float term3,
+                             float term4);
+
+
+psSphereTransform *psSphereTransformAlloc(double NPlon,
+        double NPlat,
+        double ZP);
+
+void p_psSphereTransformFree(psSphereTransform *trans);
+
+psSphere *psSphereTransformApply(psSphere *out,
+                                 const psSphereTransform *transform,
+                                 const psSphere *coord);
+
+psSphereTransform *psSphereTransformICRStoEcliptic(void);
+psSphereTransform *psSphereTransformEcliptictoICRS(void);
+psSphereTransform *psSphereTransformICRStoGalatic(void);
+psSphereTransform *psSphereTransformGalatictoICRS(void);
+
+psPlane *psProject(const psSphere *coord,
+                   const psProjection *projection);
+
+psSphere *psProject(const psPlane *coord,
+                    const psProjection *projection);
 
 psSphere *psSphereGetOffset(const psSphere *restrict position1,
@@ -126,15 +141,6 @@
                             psSphereOffsetUnit unit);
 
-typedef enum {
-    PS_SPHERICAL;
-    PS_LINEAR;
-} psSphereOffsetMode;
 
-typedef enum {
-    PS_ARCSEC;
-    PS_ARCMIN;
-    PS_DEGREE;
-    PS_RADIAN;
-} psSphereOffsetUnit;
+
 
 #endif
