Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 1285)
+++ 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);
 }
