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.14 by greg, Wed Feb 21 15:46:44 1996 UTC vs.
Revision 1.18 by greg, Fri Mar 21 12:32:30 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, 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 1901 | Line 1903 | and
1903   require a normal direction.
1904   An
1905   .UL f
1906 + or
1907 + .UL fh
1908   entity will interpolate vertex normals if given, and
1909   use the polygon plane normal otherwise.
1910   See the
# Line 1940 | Line 1944 | SEE ALSO
1944   .UL cone,
1945   .UL cyl,
1946   .UL f,
1947 + .UL fh,
1948   .UL n,
1949   .UL p,
1950   .UL prism,
# Line 1984 | Line 1989 | SEE ALSO
1989   .UL cone,
1990   .UL cyl,
1991   .UL f,
1992 + .UL fh,
1993   .UL n,
1994   .UL prism,
1995   .UL ring,
# Line 2030 | Line 2036 | xf
2036   SEE ALSO
2037   .LP
2038   .UL f,
2039 + .UL fh,
2040   .UL p,
2041   .UL prism,
2042   .UL ring,
# Line 2069 | Line 2076 | when normals are used.
2076   Also, specified normals should point in the general direction of the
2077   surface for best results.
2078   .LP
2079 < There is no explicit representation of holes in MGF.  A hole must be
2080 < represented implicitly by connecting vertices to form "seams."  For
2079 > There is no explicit representation of holes in this entity, but see
2080 > the
2081 > .UL fh
2082 > entity for an alternative specification.
2083 > .LP
2084 > A hole may be represented implicitly in a face entity
2085 > by connecting vertices to form "seams."
2086 > For
2087   example, a wall with a window in it might look as shown in Figure 1.
2088   In many systems, the wall itself would be represented with the first
2089   list of vertices, (v1,v2,v3,v4) and the hole associated with that
2090 < wall as a second set of vertices (v5,v6,v7,v8).  In MGF, we must
2090 > wall as a second set of vertices (v5,v6,v7,v8).
2091 > Using the face entity, we must
2092   give the whole thing as a single polygon, connecting the vertices so
2093   as to create a "seam," as shown in Figure 2.
2094 < This could be written in MGF as "f v1 v2 v3 v4 v5 v6 v7 v8 v5 v4".
2094 > This could be written as "f v1 v2 v3 v4 v5 v6 v7 v8 v5 v4".
2095   .LP
2096   It is very important that the order of the hole be opposite to the
2097   order of the outer perimeter, otherwise the polygon will be
# Line 2126 | Line 2140 | SEE ALSO
2140   .LP
2141   .UL cone,
2142   .UL cyl,
2143 + .UL fh,
2144   .UL m,
2145   .UL prism,
2146   .UL ring,
2147   .UL sph,
2148   .UL torus,
2149   .UL v
2150 + .ds RH FH
2151 + .bp
2152 + .SH
2153 + NAME
2154 + .LP
2155 + fh - create a polygonal face with explicit holes
2156 + .SH
2157 + SYNOPSIS
2158 + .LP
2159 + .B fh
2160 + .I "p1 p2 ... - h1.1 h1.2 ... - h2.1 h2.2 ..."
2161 + .SH
2162 + DESCRIPTION
2163 + .LP
2164 + Create a polygonal face with optional holes made of the current material.
2165 + The first contour is the outer perimeter, with vertices given in
2166 + counter-clockwise order as seen from the front side (the same as the
2167 + .UL f
2168 + entity).
2169 + A hole is indicated by a hyphen ('-') followed by the hole's
2170 + vertices, given in clockwise order as seen from the front side.
2171 + Multiple hole contours are separated by additional hyphens.
2172 + There must be at least three vertices for each contour, and the
2173 + last vertex is implicitly connected to the first.
2174 + If any vertex is undefined, an error will result.
2175 + .LP
2176 + If any vertices have associated surface normals, they will be used
2177 + instead of the average plane normal, though it is safest to specify
2178 + either all normals or no normals, and to stick with triangles
2179 + when normals are used.
2180 + Also, specified normals should point in the general direction of the
2181 + surface for best results.
2182 + .LP
2183 + Vertices should not be shared between any two contours.
2184 + I.e., a hole should not share a vertex or edge with the perimeter or
2185 + another hole, or incorrect rendering may result.
2186 + .SH
2187 + EXAMPLE
2188 + .DS
2189 + # Make a wall with a window using an explicit hole.
2190 + # (See Figures 1 and 2.)
2191 + fh v1 v2 v3 v4 - v5 v6 v7 v8
2192 + .DE
2193 + .SH
2194 + SEE ALSO
2195 + .LP
2196 + .UL cone,
2197 + .UL cyl,
2198 + .UL f,
2199 + .UL m,
2200 + .UL prism,
2201 + .UL ring,
2202 + .UL sph,
2203 + .UL torus,
2204 + .UL v
2205   .ds RH SPH
2206   .bp
2207   .SH
# Line 2180 | Line 2250 | SEE ALSO
2250   .UL cone,
2251   .UL cyl,
2252   .UL f,
2253 + .UL fh,
2254   .UL m,
2255   .UL prism,
2256   .UL ring,
# Line 2237 | Line 2308 | SEE ALSO
2308   .LP
2309   .UL cone,
2310   .UL f,
2311 + .UL fh,
2312   .UL m,
2313   .UL prism,
2314   .UL ring,
# Line 2309 | Line 2381 | SEE ALSO
2381   .LP
2382   .UL cyl,
2383   .UL f,
2384 + .UL fh,
2385   .UL m,
2386   .UL prism,
2387   .UL ring,
# Line 2375 | Line 2448 | SEE ALSO
2448   .UL cyl,
2449   .UL cone,
2450   .UL f,
2451 + .UL fh,
2452   .UL m,
2453   .UL ring,
2454   .UL sph,
# Line 2431 | Line 2505 | SEE ALSO
2505   .UL cyl,
2506   .UL cone,
2507   .UL f,
2508 + .UL fh,
2509   .UL m,
2510   .UL prism,
2511   .UL sph,
# Line 2491 | Line 2566 | SEE ALSO
2566   .UL cyl,
2567   .UL cone,
2568   .UL f,
2569 + .UL fh,
2570   .UL m,
2571   .UL prism,
2572   .UL ring,
# Line 4598 | Line 4674 | familiar Gaussian model of MGF.
4674   The hardest part is translating the specular power to a roughness value.
4675   For this, we recommend the following approximation:
4676   .IP
4677 < roughness = 0.6/sqrt(specular_power)
4677 > roughness = sqrt(2/specular_power)
4678   .LP
4679   It is not a perfect correlation, but it is about as close as one can get.
4680   .NH 3

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines