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

Comparing ray/src/cv/mgflib/mgfdoc.tr (file contents):
Revision 1.1 by greg, Fri May 12 14:26:12 1995 UTC vs.
Revision 1.5 by greg, Thu Aug 24 12:28:13 1995 UTC

# Line 431 | Line 431 | Since the arguments are concise and self-explanatory,
431   sufficient.
432   The following transformation flags and
433   parameters are defined:
434 < .TS I
434 > .TS
435 > center;
436   l l.
437   -t dx dy dz     translate objects along the given vector
438   -rx degrees     rotate objects about the X-axis
# Line 546 | Line 547 | Detailed MGF Example
547   The following example of a simple room with a single door
548   and six file cabinets shows MGF in action, with copious comments to
549   help explain what's going on.
550 + .LP
551   .DS
552   # "ceiling_tile" is a diffuse white surface with 75% reflectance:
553   # Create new named material context and clear it
# Line 744 | Line 746 | o door
746          o
747   o
748  
747        i cubfurn.inc -mx -t 405 133.5 0
748 o
749
749   # Six file cabinets (36" wide each)
750   # ("filecab.inc" was given as an earlier example in Section 1.2)
751   o filecab.x
# Line 772 | Line 771 | There are currently 28 entities in the MGF specificati
771   For ease of reference we have broken these into five categories:
772   .IP 1.
773   General
774 < .TS I
774 > .TS
775   lw(.75i) lw(1.75i) lw(3i).
776   #       [anything ...]  a comment
777   o       [name]  begin/end object context
# Line 782 | Line 781 | ies    pathname [-m f][xform]  include IES luminaire (with
781   .TE
782   .IP 2.
783   Color
784 < .TS I
784 > .TS
785   lw(.75i) lw(1.75i) lw(3i).
786   c       [id [= [template]]]     get/set color context
787   cxy     x y     set CIE (x,y) chromaticity for current color
# Line 2226 | Line 2225 | o stylus
2225                  p 0 0 .005
2226          v vend =
2227                  p 0 0 .05
2228 <        cyl vtip1 .0015
2228 >        cyl vtip1 .0015 vend
2229          sph vend .0015
2230          cone vtip0 0 vtip1 .0015
2231   o
# Line 2695 | Line 2694 | Greg Ward
2694   SEE ALSO
2695   .LP
2696   ies2rad(1), mgf2meta(1), obj2rad(1), oconv(1), rad2mgf(1), xform(1)
2697 < .ds RH
2699 < RAD2MGF
2697 > .ds RH RAD2MGF
2698   .bp
2699   .SH
2700   NAME
# Line 2985 | Line 2983 | char   **av;
2983  
2984          if (ac < 4)                     /* check # arguments */
2985                  return(MG_EARGC);
2986 <        printf("face\n");               /* begin face output */
2986 >        printf("face\\\\n");            /* begin face output */
2987          for (i = 1; i < ac; i++) {
2988                  if ((vp = c_getvert(av[i])) == NULL)    /* vertex from name */
2989                          return(MG_EUNDEF);
2990                  xf_xfmpoint(vert, vp->p);                       /* apply transform */
2991 <                printf("%15.9f %15.9f %15.9f\n",
2991 >                printf("%15.9f %15.9f %15.9f\\\\n",
2992                          vert[0], vert[1], vert[2]);                     /* output vertex */
2993          }
2994 <        printf(";\\n");                 /* end of face output */
2994 >        printf(";\\\\n");                       /* end of face output */
2995          return(MG_OK);                  /* normal exit */
2996   }
2997  
# Line 3122 | Line 3120 | following:
3120   #define MG_E_CMIX               4               /* cmix */
3121   #define MG_E_CSPEC              5               /* cspec        */
3122   #define MG_E_CXY                6               /* cxy          */
3123 < #define MG_E_CYL                7               /* cyl  */
3123 > #define MG_E_CYL                7               /* cyl          */
3124   #define MG_E_ED         8               /* ed           */
3125   #define MG_E_FACE               9               /* f            */
3126   #define MG_E_INCLUDE    10              /* i            */
3127   #define MG_E_IES                11              /* ies          */
3128 < #define MG_E_IR         12              /* ir           */
3128 > #define MG_E_IR                 12              /* ir           */
3129   #define MG_E_MATERIAL   13              /* m            */
3130   #define MG_E_NORMAL     14              /* n            */
3131   #define MG_E_OBJECT     15              /* o            */
# Line 3267 | Line 3265 | and return one of the non-zero values from "parser.h"
3265   #define MG_EUNK         1               /* unknown entity */
3266   #define MG_EARGC                2               /* wrong number of arguments */
3267   #define MG_ETYPE                3               /* argument type error */
3268 < #define MG_EILL         4               /* illegal argument value */
3268 > #define MG_EILL                         4               /* illegal argument value */
3269   #define MG_EUNDEF               5               /* undefined reference */
3270   #define MG_ENOFILE              6               /* cannot open input file */
3271   #define MG_EINCL                7               /* error in included file */
# Line 3289 | Line 3287 | listed above in the native country's language.
3287   .SH
3288   SEE ALSO
3289   .LP
3290 < mg_fgetpos, mg_handle, mg_init
3290 > mg_fgetpos, mg_handle, mg_init, mg_open
3291   .ds RH MG_OPEN
3292   .bp
3293   .SH
# Line 4275 | Line 4273 | mg_init, mg_load, obj_handler, xf_xfmpoint
4273   .SH
4274   NAME
4275   .LP
4276 < xf_xfmpoint xf_xfmvect, xf_rotvect, xf_scale - apply current
4276 > xf_xfmpoint, xf_xfmvect, xf_rotvect, xf_scale - apply current
4277   transformation
4278   .SH
4279   SYNOPSIS
# Line 4304 | Line 4302 | to the point
4302   .I pold,
4303   scaling, rotating and moving it to its proper location, which is put in
4304   .I pnew.
4305 < (The two arguments may point to the same vector.)\0
4305 > (As for
4306 > .I xf_xfmvect
4307 > and
4308 > .I xf_rotvect,
4309 > the two arguments may point to the same vector.)\0
4310   .LP
4311   The
4312   .I xf_xfmvect
# Line 4312 | Line 4314 | routine applies the current transformation to the vect
4314   .I vold,
4315   scaling and rotating it to its proper location, which is put in
4316   .I vnew.
4315 (The two arguments may point to the same vector.)\0
4317   The only difference between
4318   .I xf_xfmpoint
4319   and
# Line 4325 | Line 4326 | routine rotates the vector
4326   .I nold
4327   using the current transformation, and stores the result in
4328   .I nnew.
4328 (The two arguments may point to the same vector.)\0
4329   No translation or scaling is applied, which is the appropriate
4330   action for surface normal vectors for example.
4331   .LP
# Line 4486 | Line 4486 | and adopt the following code to convert between CIE an
4486   #define  CIE_y_w                0.3333
4487   #endif
4488  
4489 < #define CIE_D           (       CIE_x_r*(CIE_y_g - CIE_y_b) + \\\\
4490 <                                CIE_x_g*(CIE_y_b - CIE_y_r) + \\\\
4489 > #define CIE_D           (       CIE_x_r*(CIE_y_g - CIE_y_b) + \\
4490 >                                CIE_x_g*(CIE_y_b - CIE_y_r) + \\
4491                                  CIE_x_b*(CIE_y_r - CIE_y_g)     )
4492 < #define CIE_C_rD        ( (1./CIE_y_w) * \\\\
4493 <                                ( CIE_x_w*(CIE_y_g - CIE_y_b) - \\\\
4494 <                                  CIE_y_w*(CIE_x_g - CIE_x_b) + \\\\
4492 > #define CIE_C_rD        ( (1./CIE_y_w) * \\
4493 >                                ( CIE_x_w*(CIE_y_g - CIE_y_b) - \\
4494 >                                  CIE_y_w*(CIE_x_g - CIE_x_b) + \\
4495                                    CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g     ) )
4496 < #define CIE_C_gD        ( (1./CIE_y_w) * \\\\
4497 <                                ( CIE_x_w*(CIE_y_b - CIE_y_r) - \\\\
4498 <                                  CIE_y_w*(CIE_x_b - CIE_x_r) - \\\\
4496 > #define CIE_C_gD        ( (1./CIE_y_w) * \\
4497 >                                ( CIE_x_w*(CIE_y_b - CIE_y_r) - \\
4498 >                                  CIE_y_w*(CIE_x_b - CIE_x_r) - \\
4499                                    CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r     ) )
4500 < #define CIE_C_bD        ( (1./CIE_y_w) * \\\\
4501 <                                ( CIE_x_w*(CIE_y_r - CIE_y_g) - \\\\
4502 <                                  CIE_y_w*(CIE_x_r - CIE_x_g) + \\\\
4500 > #define CIE_C_bD        ( (1./CIE_y_w) * \\
4501 >                                ( CIE_x_w*(CIE_y_r - CIE_y_g) - \\
4502 >                                  CIE_y_w*(CIE_x_r - CIE_x_g) + \\
4503                                    CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r     ) )
4504  
4505   #define CIE_rf          (CIE_y_r*CIE_C_rD/CIE_D)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines