32 |
|
const char btpref[] = "btrans"; |
33 |
|
const char dsuffix[] = ".txt"; |
34 |
|
|
35 |
< |
const char sph_mat[] = "BSDFmat"; |
35 |
> |
const char sph_fmat[] = "fBSDFmat"; |
36 |
> |
const char sph_bmat[] = "bBSDFmat"; |
37 |
|
const double sph_rad = 10.; |
38 |
|
const double sph_xoffset = 15.; |
39 |
|
|
516 |
|
printf("\nvoid brightfunc latlong\n2 latlong bsdf2rad.cal\n0\n0\n"); |
517 |
|
if ((front_comp|back_comp) & SDsampT) |
518 |
|
printf("\nlatlong trans %s\n0\n0\n7 .75 .75 .75 0 .04 .5 .8\n", |
519 |
< |
sph_mat); |
519 |
> |
sph_fmat); |
520 |
|
else |
521 |
|
printf("\nlatlong plastic %s\n0\n0\n5 .5 .5 .5 0 0\n", |
522 |
< |
sph_mat); |
522 |
> |
sph_fmat); |
523 |
> |
printf("\ninherit alias %s %s\n", sph_bmat, sph_fmat); |
524 |
|
return; |
525 |
|
} |
526 |
|
switch (XMLfile[0]) { /* avoid RAYPATH search */ |
533 |
|
exit(1); |
534 |
|
break; |
535 |
|
} |
536 |
< |
printf("\n# Actual BSDF material for rendering the hemispheres\n"); |
537 |
< |
printf("\nvoid BSDF BSDFmat\n6 0 \"%s%s\" upx upy upz bsdf2rad.cal\n0\n0\n", |
536 |
> |
printf("\n# Actual BSDF materials for rendering the hemispheres\n"); |
537 |
> |
printf("\nvoid BSDF BSDF_f\n6 0 \"%s%s\" upx upy upz bsdf2rad.cal\n0\n0\n", |
538 |
|
curdir, XMLfile); |
539 |
|
printf("\nvoid plastic black\n0\n0\n5 0 0 0 0 0\n"); |
540 |
< |
printf("\nvoid mixfunc %s\n4 BSDFmat black latlong bsdf2rad.cal\n0\n0\n", |
541 |
< |
sph_mat); |
540 |
> |
printf("\nvoid mixfunc %s\n4 BSDF_f black latlong bsdf2rad.cal\n0\n0\n", |
541 |
> |
sph_fmat); |
542 |
> |
printf("\nvoid BSDF BSDF_b\n8 0 \"%s%s\" upx upy upz bsdf2rad.cal -ry 180\n0\n0\n", |
543 |
> |
curdir, XMLfile); |
544 |
> |
printf("\nvoid mixfunc %s\n4 BSDF_b black latlong bsdf2rad.cal\n0\n0\n", |
545 |
> |
sph_bmat); |
546 |
|
} |
547 |
|
|
548 |
|
/* Put out overhead parallel light source */ |
566 |
|
if (front_comp) { |
567 |
|
printf( |
568 |
|
"\n!genrev %s Front \"R*sin(A*t)\" \"R*cos(A*t)\" %d -e \"R:%g;A:%f\" -s | xform -t %g 0 0\n", |
569 |
< |
sph_mat, nsegs, sph_rad, 0.495*PI, sph_xoffset); |
569 |
> |
sph_fmat, nsegs, sph_rad, 0.495*PI, sph_xoffset); |
570 |
|
printf("\nvoid brighttext front_text\n3 helvet.fnt . FRONT\n0\n"); |
571 |
|
printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n", |
572 |
|
-.22*sph_rad + sph_xoffset, -1.4*sph_rad, |
582 |
|
if (back_comp) { |
583 |
|
printf( |
584 |
|
"\n!genrev %s Back \"R*cos(A*t)\" \"R*sin(A*t)\" %d -e \"R:%g;A:%f\" -s | xform -t %g 0 0\n", |
585 |
< |
sph_mat, nsegs, sph_rad, 0.495*PI, -sph_xoffset); |
585 |
> |
sph_bmat, nsegs, sph_rad, 0.495*PI, -sph_xoffset); |
586 |
|
printf("\nvoid brighttext back_text\n3 helvet.fnt . BACK\n0\n"); |
587 |
|
printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n", |
588 |
|
-.22*sph_rad - sph_xoffset, -1.4*sph_rad, |