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.13 by greg, Wed Feb 21 14:26:43 1996 UTC vs.
Revision 1.16 by greg, Tue Mar 18 11:43:22 1997 UTC

# Line 233 | Line 233 | p      x y z   set point position for current vertex
233   n       dx dy dz        set surface normal for current vertex
234   _       _       _
235   f       v1 v2 v3 ...    polygon using current material, spec. vertices
236 + fh      v1 v2 v3 - ...  face with explicit holes
237   sph     vc radius       sphere
238   cyl     v1 radius v2    truncated right cylinder (open-ended)
239   cone    v1 rad1 v2 rad2 truncated right cone (open-ended)
# Line 283 | Line 284 | ring, torus, prism
284   T}
285   Material        m       2-sided black   T{
286   sides, rd, td,
287 < ed, rs, ts
287 > ed, rs, ts, ir
288   T}      T{
289   f, sph, cyl, cone,
290   ring, torus, prism
# Line 1675 | Line 1676 | EXAMPLE
1676   # A 100-watt incandescent bulb (1600 lumens) modeled as a sphere
1677   m
1678          c
1679 <        cct 3000
1679 >                cct 3000
1680          ed 87712
1681   v cent =
1682          p 0 0 0
# Line 2069 | Line 2070 | when normals are used.
2070   Also, specified normals should point in the general direction of the
2071   surface for best results.
2072   .LP
2073 < There is no explicit representation of holes in MGF.  A hole must be
2074 < represented implicitly by connecting vertices to form "seams."  For
2073 > There is no explicit representation of holes in this entity, but see
2074 > the
2075 > .UL fh
2076 > entity for an alternative specification.
2077 > .LP
2078 > A hole may be represented implicitly in a face entity
2079 > by connecting vertices to form "seams."
2080 > For
2081   example, a wall with a window in it might look as shown in Figure 1.
2082   In many systems, the wall itself would be represented with the first
2083   list of vertices, (v1,v2,v3,v4) and the hole associated with that
2084 < wall as a second set of vertices (v5,v6,v7,v8).  In MGF, we must
2084 > wall as a second set of vertices (v5,v6,v7,v8).
2085 > Using the face entity, we must
2086   give the whole thing as a single polygon, connecting the vertices so
2087   as to create a "seam," as shown in Figure 2.
2088 < This could be written in MGF as "f v1 v2 v3 v4 v5 v6 v7 v8 v5 v4".
2088 > This could be written as "f v1 v2 v3 v4 v5 v6 v7 v8 v5 v4".
2089   .LP
2090   It is very important that the order of the hole be opposite to the
2091   order of the outer perimeter, otherwise the polygon will be
# Line 2126 | Line 2134 | SEE ALSO
2134   .LP
2135   .UL cone,
2136   .UL cyl,
2137 + .UL fh,
2138   .UL m,
2139   .UL prism,
2140   .UL ring,
2141   .UL sph,
2142   .UL torus,
2143   .UL v
2144 + .ds RH FH
2145 + .bp
2146 + .SH
2147 + NAME
2148 + .LP
2149 + fh - create a polygonal face with explicit holes
2150 + .SH
2151 + SYNOPSIS
2152 + .LP
2153 + .B fh
2154 + .I "p1 p2 ... - h1.1 h1.2 ... - h2.1 h2.2 ..."
2155 + .SH
2156 + DESCRIPTION
2157 + .LP
2158 + Create a polygonal face with optional holes made of the current material.
2159 + The first contour is the outer perimeter, with vertices given in
2160 + counter-clockwise order as seen from the front side (the same as the
2161 + .UL f
2162 + entity).
2163 + A hole is indicated by a hyphen ('-') followed by the hole's
2164 + vertices, given in clockwise order as seen from the front side.
2165 + Multiple hole contours are separated by additional hyphens.
2166 + There must be at least three vertices for each contour, and the
2167 + last vertex is implicitly connected to the first.
2168 + If any vertex is undefined, an error will result.
2169 + .LP
2170 + If any vertices have associated surface normals, they will be used
2171 + instead of the average plane normal, though it is safest to specify
2172 + either all normals or no normals, and to stick with triangles
2173 + when normals are used.
2174 + Also, specified normals should point in the general direction of the
2175 + surface for best results.
2176 + .SH
2177 + EXAMPLE
2178 + .DS
2179 + # Make a wall with a window using an explicit hole.
2180 + # (See Figures 1 and 2.)
2181 + fh v1 v2 v3 v4 - v5 v6 v7 v8
2182 + .DE
2183 + .SH
2184 + SEE ALSO
2185 + .LP
2186 + .UL cone,
2187 + .UL cyl,
2188 + .UL f,
2189 + .UL m,
2190 + .UL prism,
2191 + .UL ring,
2192 + .UL sph,
2193 + .UL torus,
2194 + .UL v
2195   .ds RH SPH
2196   .bp
2197   .SH
# Line 3434 | Line 3494 | and return one of the non-zero values from "parser.h"
3494   #define MG_EUNK         1               /* unknown entity */
3495   #define MG_EARGC                2               /* wrong number of arguments */
3496   #define MG_ETYPE                3               /* argument type error */
3497 < #define MG_EILL                         4               /* illegal argument value */
3497 > #define MG_EILL                 4               /* illegal argument value */
3498   #define MG_EUNDEF               5               /* undefined reference */
3499   #define MG_ENOFILE              6               /* cannot open input file */
3500   #define MG_EINCL                7               /* error in included file */
# Line 3444 | Line 3504 | and return one of the non-zero values from "parser.h"
3504   #define MG_ELINE                11              /* input line too long */
3505   #define MG_ECNTXT               12              /* unmatched context close */
3506  
3507 < #define MG_NERRS        13
3507 > #define MG_NERRS                13
3508   .DE
3509   If it is inappropriate to send output to standard error, the calling
3510   program should use the routines listed under
# Line 3867 | Line 3927 | To link identical vertices, one must also check that t
3927   transform has not changed, which is uniquely identified by the
3928   global
3929   .I xf_context->xid
3930 < variable, but only if one is using the parser libraries transform
3930 > variable, but only if one is using the parser library's transform
3931   handler.
3932   (See the
3933   .I xf_handler
# Line 4598 | Line 4658 | familiar Gaussian model of MGF.
4658   The hardest part is translating the specular power to a roughness value.
4659   For this, we recommend the following approximation:
4660   .IP
4661 < roughness = 0.6/sqrt(specular_power)
4661 > roughness = sqrt(2/specular_power)
4662   .LP
4663   It is not a perfect correlation, but it is about as close as one can get.
4664   .NH 3

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines