17 |
|
#include "calcomp.h" |
18 |
|
#include "bsdfrep.h" |
19 |
|
#include "bsdf_m.h" |
20 |
+ |
/* assumed maximum # Klems patches */ |
21 |
+ |
#define MAXPATCHES 145 |
22 |
|
/* global argv[0] */ |
23 |
|
char *progname; |
24 |
|
/* selected basis function name */ |
265 |
|
double sum; |
266 |
|
int i, j, n; |
267 |
|
|
268 |
+ |
initurand(npsamps); |
269 |
|
data_prologue(); /* begin output */ |
270 |
|
for (j = 0; j < abp->nangles; j++) { /* run through directions */ |
271 |
|
for (i = 0; i < abp->nangles; i++) { |
277 |
|
bo_getvec(iovec+3, j+(n+frandom())/npsamps, abp); |
278 |
|
|
279 |
|
if (input_orient > 0) |
280 |
< |
fi_getvec(iovec, i+(n+frandom())/npsamps, abp); |
280 |
> |
fi_getvec(iovec, i+urand(n), abp); |
281 |
|
else |
282 |
< |
bi_getvec(iovec, i+(n+frandom())/npsamps, abp); |
282 |
> |
bi_getvec(iovec, i+urand(n), abp); |
283 |
|
|
284 |
|
sum += funvalue(funame, 6, iovec); |
285 |
|
} |
294 |
|
static void |
295 |
|
eval_rbf(void) |
296 |
|
{ |
294 |
– |
#define MAXPATCHES 145 |
297 |
|
ANGLE_BASIS *abp = get_basis(kbasis); |
298 |
|
float bsdfarr[MAXPATCHES*MAXPATCHES]; |
299 |
|
FVECT vin, vout; |
334 |
|
putchar('\n'); |
335 |
|
} |
336 |
|
data_epilogue(); /* finish output */ |
335 |
– |
#undef MAXPATCHES |
337 |
|
} |
338 |
|
|
339 |
|
/* Read in BSDF and interpolate as Klems matrix representation */ |