Changeset 4581 for trunk/psLib/src/astro
- Timestamp:
- Jul 19, 2005, 3:21:13 PM (21 years ago)
- Location:
- trunk/psLib/src/astro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r4540 r4581 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-07- 12 19:12:00$12 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-20 01:21:13 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 226 226 227 227 psPlaneTransform *pt = psAlloc(sizeof(psPlaneTransform)); 228 pt->x = ps DPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);229 pt->y = ps DPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD);228 pt->x = psPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 229 pt->y = psPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 230 230 231 231 psMemSetDeallocator(pt, (psFreeFunc) planeTransformFree); … … 246 246 } 247 247 248 out->x = ps DPolynomial2DEval(248 out->x = psPolynomial2DEval( 249 249 transform->x, 250 250 coords->x, … … 252 252 ); 253 253 254 out->y = ps DPolynomial2DEval(254 out->y = psPolynomial2DEval( 255 255 transform->y, 256 256 coords->x, … … 275 275 276 276 psPlaneDistort *pt = psAlloc(sizeof(psPlaneDistort)); 277 pt->x = ps DPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);278 pt->y = ps DPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD);277 pt->x = psPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 278 pt->y = psPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 279 279 280 280 psMemSetDeallocator(pt, (psFreeFunc) planeDistortFree); … … 300 300 out = (psPlane* ) psAlloc(sizeof(psPlane)); 301 301 } 302 out->x = ps DPolynomial4DEval(302 out->x = psPolynomial4DEval( 303 303 distort->x, 304 304 coords->x, … … 307 307 color 308 308 ); 309 out->y = ps DPolynomial4DEval(309 out->y = psPolynomial4DEval( 310 310 distort->y, 311 311 coords->x, … … 854 854 *****************************************************************************/ 855 855 856 static ps DPolynomial2D *multiplyDPoly2D(psDPolynomial2D *trans1,857 psDPolynomial2D *trans2)856 static psPolynomial2D *multiplyDPoly2D(psPolynomial2D *trans1, 857 psPolynomial2D *trans2) 858 858 { 859 859 //TRACE: printf("multiplyDPoly2D(%d %d: %d %d)\n", trans1->nX, trans1->nY, trans2->nX, trans2->nY); … … 861 861 psS32 orderY = (trans1->nY + trans2->nY) - 1; 862 862 863 ps DPolynomial2D *out = psDPolynomial2DAlloc(orderX, orderY, PS_POLYNOMIAL_ORD);863 psPolynomial2D *out = psPolynomial2DAlloc(orderX, orderY, PS_POLYNOMIAL_ORD); 864 864 //TRACE: printf("Creating poly (%d, %d)\n", orderX, orderY); 865 865 for (psS32 i = 0 ; i < out->nX; i++) { … … 966 966 for (psS32 t2x = 0 ; t2x < trans2->x->nX ; t2x++) { 967 967 for (psS32 t2y = 0 ; t2y < trans2->x->nY ; t2y++) { 968 ps DPolynomial2D *currPoly = psDPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);968 psPolynomial2D *currPoly = psPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD); 969 969 970 970 currPoly->coeff[0][0] = 1.0; 971 971 currPoly->mask[0][0] = 0; 972 ps DPolynomial2D *newPoly = NULL;972 psPolynomial2D *newPoly = NULL; 973 973 974 974 if (trans2->x->mask[t2x][t2y] == 0) { … … 1001 1001 for (psS32 t2x = 0 ; t2x < trans2->y->nX ; t2x++) { 1002 1002 for (psS32 t2y = 0 ; t2y < trans2->y->nY ; t2y++) { 1003 ps DPolynomial2D *currPoly = psDPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD);1003 psPolynomial2D *currPoly = psPolynomial2DAlloc(1, 1, PS_POLYNOMIAL_ORD); 1004 1004 currPoly->coeff[0][0] = 1.0; 1005 1005 currPoly->mask[0][0] = 0; 1006 ps DPolynomial2D *newPoly = NULL;1006 psPolynomial2D *newPoly = NULL; 1007 1007 1008 1008 if (trans2->y->mask[t2x][t2y] == 0) { … … 1062 1062 // Create fake polynomial to use in evaluation 1063 1063 // 1064 ps DPolynomial2D *fakePoly = psDPolynomial2DAlloc(order, order, PS_POLYNOMIAL_ORD);1064 psPolynomial2D *fakePoly = psPolynomial2DAlloc(order, order, PS_POLYNOMIAL_ORD); 1065 1065 for (int i = 0; i < order; i++) { 1066 1066 for (int j = 0; j < order; j++) { … … 1098 1098 psF64 xOut = ((psPlane *) dest->data[g])->x; 1099 1099 psF64 yOut = ((psPlane *) dest->data[g])->y; 1100 psF64 ijPoly = ps DPolynomial2DEval(fakePoly, xIn, yIn);1100 psF64 ijPoly = psPolynomial2DEval(fakePoly, xIn, yIn); 1101 1101 fakePoly->mask[i][j] = 1; 1102 1102 … … 1104 1104 for (psS32 n = 0; n < order - m; n++, mnIndex++) { 1105 1105 fakePoly->mask[m][n] = 0; 1106 psF64 mnPoly = ps DPolynomial2DEval(fakePoly, xIn, yIn);1106 psF64 mnPoly = psPolynomial2DEval(fakePoly, xIn, yIn); 1107 1107 fakePoly->mask[m][n] = 1; 1108 1108 -
trunk/psLib/src/astro/psCoord.h
r4401 r4581 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 6-27 20:38:11$12 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-20 01:21:13 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 typedef struct 72 72 { 73 ps DPolynomial2D* x; ///< 2D polynomial transform of X coordinates74 ps DPolynomial2D* y; ///< 2D polynomial transform of Y coordinates73 psPolynomial2D* x; ///< 2D polynomial transform of X coordinates 74 psPolynomial2D* y; ///< 2D polynomial transform of Y coordinates 75 75 } 76 76 psPlaneTransform; … … 90 90 typedef struct 91 91 { 92 ps DPolynomial4D* x; ///< 4D polynomial transform of X coordinates93 ps DPolynomial4D* y; ///< 4D polynomial transform of Y coordinates92 psPolynomial4D* x; ///< 4D polynomial transform of X coordinates 93 psPolynomial4D* y; ///< 4D polynomial transform of Y coordinates 94 94 } 95 95 psPlaneDistort;
Note:
See TracChangeset
for help on using the changeset viewer.
