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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines