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.30 by greg, Mon May 15 19:17:27 2017 UTC vs.
Revision 2.32 by greg, Thu Aug 3 19:50:12 2017 UTC

# Line 275 | Line 275 | put_mirror_arrow(const FVECT origin, const FVECT nrm)
275   {
276          const double    arrow_len = 1.2*bsdf_rad;
277          const double    tip_len = 0.2*bsdf_rad;
278 +        static int      cnt = 1;
279          FVECT           refl;
280          int             i;
281  
# Line 282 | Line 283 | put_mirror_arrow(const FVECT origin, const FVECT nrm)
283          refl[1] = 2.*nrm[2]*nrm[1];
284          refl[2] = 2.*nrm[2]*nrm[2] - 1.;
285  
286 <        printf("\n# Mirror arrow\n");
287 <        printf("\nshaft_mat cylinder inc_dir\n0\n0\n7");
286 >        printf("\n# Mirror arrow #%d\n", cnt);
287 >        printf("\nshaft_mat cylinder inc_dir%d\n0\n0\n7", cnt);
288          printf("\n\t%f %f %f\n\t%f %f %f\n\t%f\n",
289                          origin[0], origin[1], origin[2]+arrow_len,
290                          origin[0], origin[1], origin[2],
291                          arrow_rad);
292 <        printf("\nshaft_mat cylinder mir_dir\n0\n0\n7");
292 >        printf("\nshaft_mat cylinder mir_dir%d\n0\n0\n7", cnt);
293          printf("\n\t%f %f %f\n\t%f %f %f\n\t%f\n",
294                          origin[0], origin[1], origin[2],
295                          origin[0] + arrow_len*refl[0],
296                          origin[1] + arrow_len*refl[1],
297                          origin[2] + arrow_len*refl[2],
298                          arrow_rad);
299 <        printf("\ntip_mat cone mir_tip\n0\n0\n8");
299 >        printf("\ntip_mat cone mir_tip%d\n0\n0\n8", cnt);
300          printf("\n\t%f %f %f\n\t%f %f %f\n\t%f 0\n",
301                          origin[0] + (arrow_len-.5*tip_len)*refl[0],
302                          origin[1] + (arrow_len-.5*tip_len)*refl[1],
# Line 304 | Line 305 | put_mirror_arrow(const FVECT origin, const FVECT nrm)
305                          origin[1] + (arrow_len+.5*tip_len)*refl[1],
306                          origin[2] + (arrow_len+.5*tip_len)*refl[2],
307                          2.*arrow_rad);
308 +        ++cnt;
309   }
310  
311   /* Put out transmitted direction arrow for the given incident vector */
# Line 312 | Line 314 | put_trans_arrow(const FVECT origin)
314   {
315          const double    arrow_len = 1.2*bsdf_rad;
316          const double    tip_len = 0.2*bsdf_rad;
317 +        static int      cnt = 1;
318          int             i;
319  
320 <        printf("\n# Transmission arrow\n");
321 <        printf("\nshaft_mat cylinder trans_dir\n0\n0\n7");
320 >        printf("\n# Transmission arrow #%d\n", cnt);
321 >        printf("\nshaft_mat cylinder trans_dir%d\n0\n0\n7", cnt);
322          printf("\n\t%f %f %f\n\t%f %f %f\n\t%f\n",
323                          origin[0], origin[1], origin[2],
324                          origin[0], origin[1], origin[2]-arrow_len,
325                          arrow_rad);
326 <        printf("\ntip_mat cone trans_tip\n0\n0\n8");
326 >        printf("\ntip_mat cone trans_tip%d\n0\n0\n8", cnt);
327          printf("\n\t%f %f %f\n\t%f %f %f\n\t%f 0\n",
328                          origin[0], origin[1], origin[2]-arrow_len+.5*tip_len,
329                          origin[0], origin[1], origin[2]-arrow_len-.5*tip_len,
330 <                        2.*arrow_rad);  
330 >                        2.*arrow_rad);
331 >        ++cnt;
332   }
333  
334   /* Compute rotation (x,y,z) => (xp,yp,zp) */
# Line 513 | Line 517 | put_hemispheres(void)
517          if (front_comp) {
518                  printf(
519   "\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",
520 <                                sph_fmat, nsegs, sph_rad, 0.495*PI, sph_xoffset);
520 >                                sph_fmat, nsegs, sph_rad, 0.5*PI, sph_xoffset);
521                  printf("\nvoid brighttext front_text\n3 helvet.fnt . FRONT\n0\n");
522                  printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n",
523                                  -.22*sph_rad + sph_xoffset, -1.4*sph_rad,
# Line 529 | Line 533 | put_hemispheres(void)
533          if (back_comp) {
534                  printf(
535   "\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",
536 <                                sph_bmat, nsegs, sph_rad, 0.495*PI, -sph_xoffset);
536 >                                sph_bmat, nsegs, sph_rad, 0.5*PI, -sph_xoffset);
537                  printf("\nvoid brighttext back_text\n3 helvet.fnt . BACK\n0\n");
538                  printf("12\n\t%f %f 0\n\t%f 0 0\n\t0 %f 0\n\t.01 1 -.1\n",
539                                  -.22*sph_rad - sph_xoffset, -1.4*sph_rad,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines