Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 4957)
+++ trunk/psLib/src/astro/psCoord.c	(revision 4991)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-07 21:33:48 $
+*  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-09-11 22:18:40 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -545,7 +545,4 @@
         int nSamples)
 {
-
-    // XXX: This does not yet use region and nSamples:  need to modify -rdd
-
     PS_ASSERT_PTR_NON_NULL(trans1, NULL);
     PS_ASSERT_PTR_NON_NULL(trans2, NULL);
@@ -905,63 +902,61 @@
 )
 {
-    /*
-        PS_ASSERT_PTR_NON_NULL(transformation, NULL);
-        PS_ASSERT_POLY_NON_NULL(transformation->x, NULL);
-        PS_ASSERT_POLY_NON_NULL(transformation->y, NULL);
-        PS_ASSERT_PTR_NON_NULL(coord, NULL);
-     
-        if (out == NULL) {
-            out = psPlaneAlloc();
-        }
-     
-        out->x = 0.0;
-        out->y = 0.0;
-        out->xErr = 0.0;
-        out->yErr = 0.0;
-     
-        psPolynomial2D *xPoly = transformation->x;
-        psPolynomial2D *yPoly = transformation->y;
-     
-        //
-        // Calculate the derivative with respect to x.
-        //
-        psF32 xSum = 1.0;
-        psF32 ySum = 1.0;
-     
-        // This loop starts at loop_x=1 since the derivative of the loop_x=0 terms are all 0.0
-        for (psS32 loop_x = 1; loop_x < xPoly->nX; loop_x++) {
-            ySum = 1.0;
-            for (psS32 loop_y = 0; loop_y < xPoly->nY; loop_y++) {
-                //
-                // For each iteration of the loop, we multiple the (x, y) coefficient
-                // by (coord->x^(loop_x-1) * coord->y^loop_y)
-                //
-     
-                out->x+= xPoly->coeff[loop_x][loop_y] * xSum * ySum;
-                ySum*= coord->y;
-            }
-            xSum*= coord->x;
-        }
-     
-        //
-        // Calculate the derivative with respect to x.
-        //
-        xSum = 1.0;
-     
-        // This loop starts at loop_y=1 since the derivative of the loop_y=0 terms are all 0.0
-        for (psS32 loop_x = 0; loop_x < yPoly->nX; loop_x++) {
-            ySum = 1.0;
-            for (psS32 loop_y = 1; loop_y < yPoly->nY; loop_y++) {
-                //
-                // For each iteration of the loop, we multiple the (x, y) coefficient
-                // by (coord->x^(loop_x-1) * coord->y^loop_y)
-                //
-     
-                out->y+= yPoly->coeff[loop_x][loop_y] * xSum * ySum;
-                ySum*= coord->y;
-            }
-            xSum*= coord->x;
-        }
-    */
+    PS_ASSERT_PTR_NON_NULL(transformation, NULL);
+    PS_ASSERT_POLY_NON_NULL(transformation->x, NULL);
+    PS_ASSERT_POLY_NON_NULL(transformation->y, NULL);
+    PS_ASSERT_PTR_NON_NULL(coord, NULL);
+
+    if (out == NULL) {
+        out = psPlaneAlloc();
+    }
+
+    out->x = 0.0;
+    out->y = 0.0;
+    out->xErr = 0.0;
+    out->yErr = 0.0;
+
+    psPolynomial2D *xPoly = transformation->x;
+    psPolynomial2D *yPoly = transformation->y;
+
+    //
+    // Calculate the derivative with respect to x.
+    //
+    psF32 xSum = 1.0;
+    psF32 ySum = 1.0;
+
+    // This loop starts at loop_x=1 since the derivative of the loop_x=0 terms are all 0.0
+    for (psS32 loop_x = 1; loop_x < xPoly->nX; loop_x++) {
+        ySum = 1.0;
+        for (psS32 loop_y = 0; loop_y < xPoly->nY; loop_y++) {
+            //
+            // For each iteration of the loop, we multiple the (x, y) coefficient
+            // by (coord->x^(loop_x-1) * coord->y^loop_y)
+            //
+
+            out->x+= xPoly->coeff[loop_x][loop_y] * xSum * ySum;
+            ySum*= coord->y;
+        }
+        xSum*= coord->x;
+    }
+
+    //
+    // Calculate the derivative with respect to x.
+    //
+    xSum = 1.0;
+
+    // This loop starts at loop_y=1 since the derivative of the loop_y=0 terms are all 0.0
+    for (psS32 loop_x = 0; loop_x < yPoly->nX; loop_x++) {
+        ySum = 1.0;
+        for (psS32 loop_y = 1; loop_y < yPoly->nY; loop_y++) {
+            //
+            // For each iteration of the loop, we multiple the (x, y) coefficient
+            // by (coord->x^(loop_x-1) * coord->y^loop_y)
+            //
+
+            out->y+= yPoly->coeff[loop_x][loop_y] * xSum * ySum;
+            ySum*= coord->y;
+        }
+        xSum*= coord->x;
+    }
     return(out);
 }
@@ -970,5 +965,5 @@
 {
     if(sphere == NULL) {
-        //        psError();
+        psError( PS_ERR_UNKNOWN, true, "psSphere argument is NULL.  Returning NULL.\n");
         return NULL;
     }
@@ -990,5 +985,5 @@
 {
     if(cube == NULL) {
-        //        psError();
+        psError( PS_ERR_UNKNOWN, true, "psCube argument is NULL.  Returning NULL.\n");
         return NULL;
     }
