--- ray/src/cv/bsdf2ttree.c 2012/11/10 19:47:42 2.7
+++ ray/src/cv/bsdf2ttree.c 2012/12/12 04:49:59 2.10
@@ -1,5 +1,5 @@
#ifndef lint
-static const char RCSid[] = "$Id: bsdf2ttree.c,v 2.7 2012/11/10 19:47:42 greg Exp $";
+static const char RCSid[] = "$Id: bsdf2ttree.c,v 2.10 2012/12/12 04:49:59 greg Exp $";
#endif
/*
* Load measured BSDF interpolant and write out as XML file with tensor tree.
@@ -32,7 +32,7 @@ interp_isotropic()
float bsdf;
#if DEBUG
fprintf(stderr, "Writing isotropic order %d ", samp_order);
- if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull);
+ if (pctcull >= 0) fprintf(stderr, "data with %.1f%% culling\n", pctcull);
else fputs("raw data\n", stderr);
#endif
if (pctcull >= 0) { /* begin output */
@@ -94,7 +94,7 @@ interp_anisotropic()
float bsdf;
#if DEBUG
fprintf(stderr, "Writing anisotropic order %d ", samp_order);
- if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull);
+ if (pctcull >= 0) fprintf(stderr, "data with %.1f%% culling\n", pctcull);
else fputs("raw data\n", stderr);
#endif
if (pctcull >= 0) { /* begin output */
@@ -112,8 +112,9 @@ interp_anisotropic()
/* run through directions */
for (ix = 0; ix < sqres; ix++)
for (iy = 0; iy < sqres; iy++) {
- RBFNODE *rbf;
+ RBFNODE *rbf; /* Klems reversal */
SDsquare2disk(ivec, (ix+.5)/sqres, (iy+.5)/sqres);
+ ivec[0] = -ivec[0]; ivec[1] = -ivec[1];
ivec[2] = input_orient *
sqrt(1. - ivec[0]*ivec[0] - ivec[1]*ivec[1]);
rbf = advect_rbf(ivec);
@@ -180,7 +181,7 @@ xml_prologue(int ac, char *av[])
puts("\t\tASTM E308 1931 Y.dsp");
puts("\t\t");
printf("\t\t\t%s\n",
- bsdf_type[(input_orient>0)<<1 | (output_orient>0)]);
+ bsdf_type[(input_orient>0)<<1 | (output_orient>0)]);
puts("\t\t\tLBNL/Shirley-Chiu");
puts("\t\t\tBTDF");
puts("\t\t\t");