ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/bsdf2rad.c
(Generate patch)

Comparing ray/src/cv/bsdf2rad.c (file contents):
Revision 2.17 by greg, Sun Apr 9 22:06:07 2017 UTC vs.
Revision 2.18 by greg, Sun Apr 9 22:51:19 2017 UTC

# Line 13 | Line 13 | static const char RCSid[] = "$Id$";
13   #include "resolu.h"
14   #include "bsdfrep.h"
15  
16 < #define NINCIDENT       25              /* number of samples/hemisphere */
16 > #define NINCIDENT       37              /* number of samples/hemisphere */
17  
18   #define GRIDSTEP        2               /* our grid step size */
19   #define SAMPRES         (GRIDRES/GRIDSTEP)
# Line 53 | Line 53 | char   *progname;
53   static void
54   get_ivector(FVECT iv, int i)
55   {
56        const double    zstep = 1./(2*NINCIDENT-1);
56          const double    phistep = PI*(3. - 2.236067978);
57          double          r;
58  
59 <        iv[2] = 1. - (i+.5)*zstep;
59 >        iv[2] = 1. - (i+.5)*(1./NINCIDENT);
60          r = sqrt(1. - iv[2]*iv[2]);
61          iv[0] = r * cos((i+1.)*phistep);
62          iv[1] = r * sin((i+1.)*phistep);
# Line 544 | Line 543 | put_hemispheres(void)
543                                  -1.01*sph_rad - sph_xoffset, -1.01*sph_rad, -1.01*sph_rad);
544                  printf("\nvoid brighttext front_text\n3 helvet.fnt . FRONT\n0\n");
545                  printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n",
546 <                                -.22*sph_rad - sph_xoffset, -1.2*sph_rad,
546 >                                -.22*sph_rad - sph_xoffset, -1.4*sph_rad,
547                                  .35/5.*sph_rad, -1.6*.35/5.*sph_rad);
548                  printf("\nfront_text alias front_label_mat vellum\n");
549                  printf("\nfront_label_mat polygon front_label\n0\n0\n12");
550                  printf("\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n",
551 <                                -.25*sph_rad - sph_xoffset, -1.1*sph_rad,
552 <                                -.25*sph_rad - sph_xoffset, (-1.2-1.6*.35/5.-.1)*sph_rad,
553 <                                .25*sph_rad - sph_xoffset, (-1.2-1.6*.35/5.-.1)*sph_rad,
554 <                                .25*sph_rad - sph_xoffset, -1.1*sph_rad );
551 >                                -.25*sph_rad - sph_xoffset, -1.3*sph_rad,
552 >                                -.25*sph_rad - sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad,
553 >                                .25*sph_rad - sph_xoffset, (-1.4-1.6*.35/5.-.1)*sph_rad,
554 >                                .25*sph_rad - sph_xoffset, -1.3*sph_rad );
555          }
556          if (back_comp) {
557                  printf("\n%s bubble Back\n0\n0\n4 %f 0 0 %f\n",
# Line 562 | Line 561 | put_hemispheres(void)
561                                  -1.01*sph_rad + sph_xoffset, -1.01*sph_rad, -1.01*sph_rad);
562                  printf("\nvoid brighttext back_text\n3 helvet.fnt . BACK\n0\n");
563                  printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n",
564 <                                -.22*sph_rad + sph_xoffset, -1.2*sph_rad,
564 >                                -.22*sph_rad + sph_xoffset, -1.4*sph_rad,
565                                  .35/4.*sph_rad, -1.6*.35/4.*sph_rad);
566                  printf("\nback_text alias back_label_mat vellum\n");
567                  printf("\nback_label_mat polygon back_label\n0\n0\n12");
568                  printf("\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n\t%f %f 0\n",
569 <                                -.25*sph_rad + sph_xoffset, -1.1*sph_rad,
570 <                                -.25*sph_rad + sph_xoffset, (-1.2-1.6*.35/4.-.1)*sph_rad,
571 <                                .25*sph_rad + sph_xoffset, (-1.2-1.6*.35/4.-.1)*sph_rad,
572 <                                .25*sph_rad + sph_xoffset, -1.1*sph_rad );
569 >                                -.25*sph_rad + sph_xoffset, -1.3*sph_rad,
570 >                                -.25*sph_rad + sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad,
571 >                                .25*sph_rad + sph_xoffset, (-1.4-1.6*.35/4.-.1)*sph_rad,
572 >                                .25*sph_rad + sph_xoffset, -1.3*sph_rad );
573          }
574   }
575  
# Line 623 | Line 622 | put_scale(void)
622                  return;
623          printf("\nvoid brighttext BSDFname\n3 helvet.fnt . \"%s\"\n0\n12\n", bsdf_name);
624          printf("\t%f %f 0\n", -.95*leg_width, -.6*leg_height);
625 <        printf("\t%f 0 0\n", .4/strlen(bsdf_name)*leg_width);
625 >        printf("\t%f 0 0\n", 1.8/strlen(bsdf_name)*leg_width);
626          printf("\t0 %f 0\n", -.1*leg_height);
627          printf("\t.01 1 -.1\n");
628          printf("\nBSDFname alias name_mat vellum\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines