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.3 by greg, Mon May 15 14:42:30 1995 UTC vs.
Revision 1.12 by greg, Mon Dec 4 12:27:04 1995 UTC

# Line 746 | Line 746 | o door
746          o
747   o
748  
749        i cubfurn.inc -mx -t 405 133.5 0
750 o
751
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 1269 | Line 1266 | corresponds to the measurement at
1266   Values in between are separated by
1267   .I "(l_max-l_min)/(N-1)"
1268   nanometers.
1269 < All values must be non-negative, and the spectrum outside of the
1269 > All values should be non-negative unless defining a component for
1270 > complementary color mixing, and the spectrum outside of the
1271   specified range is assumed to be zero.
1272   (The visible range is 380 to 780 nm.)\0
1273   The actual units and scale of the measurements do not matter,
# Line 2228 | Line 2226 | o stylus
2226                  p 0 0 .005
2227          v vend =
2228                  p 0 0 .05
2229 <        cyl vtip1 .0015
2229 >        cyl vtip1 .0015 vend
2230          sph vend .0015
2231          cone vtip0 0 vtip1 .0015
2232   o
# Line 2390 | Line 2388 | ring - create a circular ring with inner and outer rad
2388   .SH
2389   SYNOPSIS
2390   .LP
2391 < .B cyl
2391 > .B ring
2392   .I "vc rmin rmax"
2393   .SH
2394   DESCRIPTION
# Line 2503 | Line 2501 | SEE ALSO
2501   .NH
2502   MGF Translators
2503   .LP
2504 < Initially, there are four translators for MGF data, but only
2505 < one of these is distributed with the MGF parser itself,
2506 < .I mgfilt.
2504 > Initially, there are five translators for MGF data, but only
2505 > two of these are distributed with the MGF parser itself,
2506 > .I mgfilt
2507 > and
2508 > .I mgf2inv.
2509   Two of the other translators,
2510   .I mgf2rad
2511   and
# Line 2518 | Line 2518 | package\(dg.
2518   nestor.epfl.ch, or by WWW from
2519   "http://radsite.lbl.gov/radiance/HOME.html"
2520   .FE
2521 < A third translator,
2521 > The fifth translator,
2522   .I mgf2meta,
2523   converts to a 2-dimensional line plot, and is also
2524   distributed with Radiance.
# Line 2535 | Line 2535 | unwanted entities.
2535   In future releases of MGF, this utility will also be handy for
2536   taking new entities and producing older versions of MGF for
2537   translators that have not yet been updated properly.
2538 + .LP
2539 + Mgf2inv converts from MGF to Inventor or VRML format.
2540 + Some information is lost, because these formats do not support
2541 + physical light sources or materials.
2542   .ds LH Translators
2543   .ds RH MGFILT
2544   .bp
# Line 2569 | Line 2573 | In the first form, a single integer is given for the
2573   of MGF that is to be produced.
2574   Since MGF is in its first major release, this is not yet a useful
2575   form, but it will be when the second major release comes out.
2576 + This has the necessary side-effect of expanding all included files.
2577 + (See the
2578 + .UL i
2579 + entity.)\0
2580   .LP
2581   In the second form,
2582   .I mgfilt
# Line 2593 | Line 2601 | mgfilt f,v,p,xf input.mgf > flatpoly.mgf
2601   .SH
2602   SEE ALSO
2603   .LP
2604 < mgf2rad, rad2mgf
2604 > i, mgf2inv, mgf2rad, rad2mgf
2605 > .ds RH MGF2INV
2606 > .bp
2607 > .SH
2608 > NAME
2609 > .LP
2610 > mgf2inv - convert from MGF to Inventor or VRML format
2611 > .SH
2612 > SYNOPSIS
2613 > .LP
2614 > .B mgf2inv
2615 > [
2616 > .B "-1|-2|-vrml"
2617 > ]
2618 > [
2619 > .B input ..
2620 > ]
2621 > .SH
2622 > DESCRIPTION
2623 > .LP
2624 > .I Mgf2inv
2625 > takes one or more MGF input files and converts it to
2626 > Inventor or VRML format.
2627 > If the
2628 > .I \-1
2629 > option is used, then Inventor 1.0 ASCII output is produced.
2630 > If the
2631 > .I \-2
2632 > option is used, then Inventor 2.0 ASCII output is produced.
2633 > (This is the default.)\0
2634 > If the
2635 > .I \-vrml
2636 > option is used, then VRML 1.0 ASCII output is produced.
2637 > .LP
2638 > This converter does not work properly for light sources, since
2639 > the output formats do not support IES-type luminaires with recorded
2640 > distributions.
2641 > Also, some material information may be lost because Inventor lacks
2642 > a physically valid reflectance model.
2643 > .SH
2644 > EXAMPLES
2645 > .LP
2646 > To take an MGF file and convert it to VRML format:
2647 > .IP
2648 > mgf2inv -vrml myscene.mgf > myscene.iv
2649 > .SH
2650 > SEE ALSO
2651 > .LP
2652 > mgf2rad, mgfilt, rad2mgf
2653   .ds RH MGF2RAD
2654   .bp
2655   .SH
# Line 3123 | Line 3179 | following:
3179   #define MG_E_CMIX               4               /* cmix */
3180   #define MG_E_CSPEC              5               /* cspec        */
3181   #define MG_E_CXY                6               /* cxy          */
3182 < #define MG_E_CYL                7               /* cyl  */
3182 > #define MG_E_CYL                7               /* cyl          */
3183   #define MG_E_ED         8               /* ed           */
3184   #define MG_E_FACE               9               /* f            */
3185   #define MG_E_INCLUDE    10              /* i            */
# Line 3268 | Line 3324 | and return one of the non-zero values from "parser.h"
3324   #define MG_EUNK         1               /* unknown entity */
3325   #define MG_EARGC                2               /* wrong number of arguments */
3326   #define MG_ETYPE                3               /* argument type error */
3327 < #define MG_EILL                 4               /* illegal argument value */
3327 > #define MG_EILL                         4               /* illegal argument value */
3328   #define MG_EUNDEF               5               /* undefined reference */
3329   #define MG_ENOFILE              6               /* cannot open input file */
3330   #define MG_EINCL                7               /* error in included file */
3331   #define MG_EMEM         8               /* out of memory */
3332   #define MG_ESEEK                9               /* file seek error */
3333   #define MG_EBADMAT      10              /* bad material specification */
3334 + #define MG_ELINE                11              /* input line too long */
3335 + #define MG_ECNTXT               12              /* unmatched context close */
3336  
3337 < #define MG_NERRS        11
3337 > #define MG_NERRS        13
3338   .DE
3339   If it is inappropriate to send output to standard error, the calling
3340   program should use the routines listed under
# Line 3290 | Line 3348 | listed above in the native country's language.
3348   .SH
3349   SEE ALSO
3350   .LP
3351 < mg_fgetpos, mg_handle, mg_init
3351 > mg_fgetpos, mg_handle, mg_init, mg_open
3352   .ds RH MG_OPEN
3353   .bp
3354   .SH
# Line 3360 | Line 3418 | The
3418   function reads the next input line from the current file,
3419   returning the number of characters in the line, or zero if the
3420   end of file is reached or there is a file error.
3421 < The function skips over escaped newlines, and keeps track of the
3421 > If the value returned equals MG_MAXLINE-1,
3422 > then the input line was too long, and you
3423 > should return an MG_ELINE error.
3424 > The function keeps track of the
3425   line number in the current file context
3426   .I mg_file,
3427   which also contains the line that was read.
# Line 4489 | Line 4550 | and adopt the following code to convert between CIE an
4550   #define  CIE_y_w                0.3333
4551   #endif
4552  
4553 < #define CIE_D           (       CIE_x_r*(CIE_y_g - CIE_y_b) + \\\\
4554 <                                CIE_x_g*(CIE_y_b - CIE_y_r) + \\\\
4553 > #define CIE_D           (       CIE_x_r*(CIE_y_g - CIE_y_b) + \\
4554 >                                CIE_x_g*(CIE_y_b - CIE_y_r) + \\
4555                                  CIE_x_b*(CIE_y_r - CIE_y_g)     )
4556 < #define CIE_C_rD        ( (1./CIE_y_w) * \\\\
4557 <                                ( CIE_x_w*(CIE_y_g - CIE_y_b) - \\\\
4558 <                                  CIE_y_w*(CIE_x_g - CIE_x_b) + \\\\
4556 > #define CIE_C_rD        ( (1./CIE_y_w) * \\
4557 >                                ( CIE_x_w*(CIE_y_g - CIE_y_b) - \\
4558 >                                  CIE_y_w*(CIE_x_g - CIE_x_b) + \\
4559                                    CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g     ) )
4560 < #define CIE_C_gD        ( (1./CIE_y_w) * \\\\
4561 <                                ( CIE_x_w*(CIE_y_b - CIE_y_r) - \\\\
4562 <                                  CIE_y_w*(CIE_x_b - CIE_x_r) - \\\\
4560 > #define CIE_C_gD        ( (1./CIE_y_w) * \\
4561 >                                ( CIE_x_w*(CIE_y_b - CIE_y_r) - \\
4562 >                                  CIE_y_w*(CIE_x_b - CIE_x_r) - \\
4563                                    CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r     ) )
4564 < #define CIE_C_bD        ( (1./CIE_y_w) * \\\\
4565 <                                ( CIE_x_w*(CIE_y_r - CIE_y_g) - \\\\
4566 <                                  CIE_y_w*(CIE_x_r - CIE_x_g) + \\\\
4564 > #define CIE_C_bD        ( (1./CIE_y_w) * \\
4565 >                                ( CIE_x_w*(CIE_y_r - CIE_y_g) - \\
4566 >                                  CIE_y_w*(CIE_x_r - CIE_x_g) + \\
4567                                    CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r     ) )
4568  
4569   #define CIE_rf          (CIE_y_r*CIE_C_rD/CIE_D)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines