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

Comparing ray/src/cv/mgflib/spec.txt (file contents):
Revision 1.1 by greg, Sat Jun 25 09:46:58 1994 UTC vs.
Revision 1.6 by greg, Fri Sep 2 16:04:13 1994 UTC

# Line 37 | Line 37 | There are three contexts in effect at all times, curre
37   current color and current material.  Initially, these contexts are
38   unnamed, and have specific default values.  The unnamed vertex is the
39   origin.  The unnamed color is neutral gray.  The unnamed material is a
40 < perfect absorber.  The unnamed contexts may be modified, but those
41 < modifications will not be saved.  Thus, reestablishing an unnamed
42 < context always gets its initial default value.  To save a new context
43 < or modify an old one, it must first be named.  Entities associated with
44 < named contexts (i.e. "v", "c" and "m") may be followed by an identifier
45 < and an equals sign ('='), indicating a new context.  If there is no
46 < equals, then the context must already be defined, and the appearance of
47 < the entity merely reestablishes this context.  If the context id is
48 < followed by an equals, then a new context is defined, destroying any
49 < previous instance of that context name.  Redefining or changing values
50 < of a context does not affect earlier uses of the same name, however.
51 < Contexts are always associated with a name id, which is any non-blank
52 < sequence of printing ASCII characters.  An optional template may be
53 < given following the equals, which is a previously defined context to
54 < use as a source of default values for this definition.  If no template
55 < is given, then the unnamed context of that type is used to set initial
56 < values.  Named contexts continue until the next context definition of
57 < the same type.
40 > perfect (two-sided) absorber.  The unnamed contexts may be modified,
41 > but those modifications will not be saved.  Thus, reestablishing an
42 > unnamed context always gets its initial default value.  To save a new
43 > context or modify an old one, it must first be named.  Entities
44 > associated with named contexts (i.e. "v", "c" and "m") may be followed
45 > by an identifier and an equals sign ('='), indicating a new context.
46 > If there is no equals, then the context must already be defined, and
47 > the appearance of the entity merely reestablishes this context.  If the
48 > context id is followed by an equals, then a new context is defined,
49 > destroying any previous instance of that context name.  Redefining or
50 > changing values of a context does not affect earlier uses of the same
51 > name, however.  Contexts are always associated with a name id, which is
52 > any non-blank sequence of printing ASCII characters.  An optional
53 > template may be given following the equals, which is a previously
54 > defined context to use as a source of default values for this
55 > definition.  If no template is given, then the unnamed context of that
56 > type is used to set initial values.  Named contexts continue until the
57 > next context definition of the same type.
58  
59   Hierarchical Contexts
60   =====================
# Line 68 | Line 68 | can be thought of as parts and subparts of an enclosin
68   Note that this is strictly for ease of identification, and has no
69   real meaning as far as the geometric description goes.  In contrast,
70   the transform entity is very significant as it determines how enclosing
71 < objects are to be scaled and placed in the final description.
71 > objects are to be scaled and placed in the final description.  Hierarchical
72 > contexts may be nested in any way, but should not overlap.
73  
74   Without further ado, here are the proposed entities and their interpretations:
75  
# Line 85 | Line 86 | cxy    x y                     set CIE (x,y) chromaticity for current color
86   cspec   l_min l_max v1 v2 ..    set relative spectrum for current color
87   cmix    w1 c1 w2 c2 ..          mix named colors to make current color
88   m       [id [= [template]]]     get/set material context
89 + sides   {1|2}                   set number of sides for current material
90   rd      rho_d                   set diffuse reflectance for current material
91   td      tau_d                   set diffuse transmittance for current material
92   ed      epsilon_d               set diffuse emittance for current material
# Line 95 | Line 97 | f      v1 v2 v3 ..             polygon using current material, spec. v
97   sph     vc radius               sphere
98   cyl     v1 radius v2            truncated right cylinder (open-ended)
99   cone    v1 rad1 v2 rad2         truncated right cone (open-ended)
100 < prism   v1 v2 v3 .. length      right prism (closed solid)
100 > prism   v1 v2 v3 .. length      truncated right prism (closed solid)
101   ring    vc rmin rmax            circular ring with inner and outer radii
102   torus   vc rmin rmax            circular torus with inner and outer radii
103   xf      [xform]                 begin/end transformation context
# Line 106 | Line 108 | Entities                               Contexts
108   --------                                --------
109   p, n                                    vertex
110   cxy, cspec, cmix                        color
111 + sides                                   material
112   rd, td, ed, rs, ts                      color, material
113   f, sph, cyl, cone, ring, torus, prism   material, object, transformation
114  
# Line 142 | Line 145 | Rotations are given in degrees counter-clockwise about
145   That is, with the thumb of the right hand pointing in the direction
146   of the axis, rotation follows the curl of the fingers.
147  
148 < The transform command itself is also cumulative, and a transform
149 < command with no arguments is used to return to the previous
150 < condition.  It is best if transforms and their end statements
151 < ("xf" by itself) are balanced in a file, so that later or enclosing
152 < files are not affected.
148 > The transform command itself is also cumulative, but in the reverse
149 > order.  That is, later transformations (i.e. enclosed transformations)
150 > are prepended to existing (i.e. enclosing) ones.  A transform command
151 > with no arguments is used to return to the previous condition.  It is
152 > necessary that transforms and their end statements ("xf" by itself) be
153 > balanced in a file, so that later or enclosing files are not affected.
154  
155   Transformations apply only to geometric types, e.g. polygons, spheres, etc.
156   Vertices and the components that go into geometry are not directly affected.
# Line 157 | Line 161 | Arrays
161   ======
162   The -a N transform specification causes the following transform
163   arguments to be repeated along with the contents of the included
164 < file N times.  (Note that this option is supported only for included
165 < files.)  The first instance of the geometry will be in its initial
166 < location; the second instance will be repositioned according to the
163 < named transformation; the third instance will be repositioned by
164 > objects N times.  The first instance of the geometry will be in its
165 > initial location; the second instance will be repositioned according
166 > to the named transformation; the third instance will be repositioned by
167   applying this transformation twice, and so on up to N-1 applications.
168  
169   Multi-dimensional arrays may be specified with a single include
# Line 207 | Line 210 | saturation.  Intensity, such as reflectance or emittan
210   included in the other material parameters.  All colors are absolute,
211   e.g. spectral reflectance or transmittance under uniform white light.
212  
213 < A CIE xy chromaticity pair is the most basic color specification.
214 < A full spectrum is the most general specification, and the starting
215 < (i.e. minimum) and ending (i.e. maximum) wavelengths are given along
216 < with a set of evenly spaced values.  Wavelengths are given in nanometers,
217 < and must be within the range of 380-780.  The spectral values themselves
218 < are located starting at the first wavelength and proceeding at even
219 < increments to the ending wavelength.  The values in between will be
220 < interpolated as necessary, so there must be at least two specified points.
221 < The color mixing entity is intended not only for the mixing of named
222 < colors, but also for color specifications  using an arbitrary set
223 < of basis functions.  The actual totals for spectral and mixing
224 < coefficients is irrelevant, since the results will be normalized.
213 > A CIE xy chromaticity pair is the most basic color specification.  A
214 > full spectrum is the most general specification, and the starting (i.e.
215 > minimum) and ending (i.e. maximum) wavelengths are given along with a
216 > set of evenly spaced values.  Wavelengths are given in nanometers, and
217 > must be within the range of 380-780.  The spectral values themselves,
218 > which can be thought of as relative power density per nanometer, start
219 > at the first wavelength and proceed at even increments to the last
220 > wavelength.  The values in between will be interpolated as necessary,
221 > so there must be at least two specified points.  The color mixing
222 > entity is intended not only for the mixing of named colors, but also
223 > for color specifications  using an arbitrary set of basis functions.
224 > The mixing coefficients are in effect relative luminances for each
225 > color "primary."  The actual total of the mixing coefficients or
226 > spectral values is irrelevant, since the results will always be
227 > normalized.
228  
229   Diffuse emittance is always given in SI units of lumens/meter^2.  Note that
230   this is emittance, not exitance, and does not include light reflected or
# Line 237 | Line 243 | this identifier and all those preceding.  It has no re
243   to group the following surfaces up until an empty object statement
244   under a descriptive name for improved file readability.
245  
246 < Surfaces are one-sided, and appear invisible when viewed from the
247 < back side.  This means that a transmitting object will affect the
248 < light coming in through the front surface and ignore the characteristics
249 < of the back surface.  As long as the characteristics are the same,
250 < the results should be correct.  If the rendering technique does not
251 < allow for one-sided surfaces, an approximately correct result can
252 < be obtained for transmitting surfaces by using the square root of
253 < the given tau_s and half the given alpha_t.
246 > Surfaces are two-sided unless the "sides" entity is used to set the
247 > number of sides for a material to one.  If a surfaces is one-sided,
248 > then it appears invisible when viewed from the back side.  This means
249 > that a transmitting object will affect the light coming in through the
250 > front surface and ignore the characteristics of the back surface.  As
251 > long as the characteristics are the same, the results should be
252 > correct.  If the rendering technique does not allow for one-sided
253 > surfaces, an approximately correct result can be obtained for one-sided
254 > transmitting surfaces by using the square root of the given tau_s and
255 > half the given alpha_t.  If a rendering technique does not permit
256 > two-sided surfaces, then each surface must be made into two for
257 > full compliance if "sides" is set to 2 (the default).
258  
259   The surface normal of a face is oriented by the right-hand rule.
260   Specifically, the surface normal faces towards the viewer when the
# Line 256 | Line 266 | A prism consists of a set of coplanar vertices specify
266   and a length value.  The prism will be extruded so that the end-face
267   points outward, unless the length value is negative, in which case the
268   object is extruded in the opposite direction, resulting in inward-
269 < directed surface normals.
269 > directed surface normals.  If surface normals are specified for the
270 > vertices, they will be applied to the side faces but not the end
271 > faces, and they must generally point in the appropriate direction
272 > (i.e. in or out depending on whether extrusion is negative or positive).
273  
274   A sphere, cylinder or cone with negative radii is interpreted as having
275   an inward facing surface normal.  Otherwise, the normal is assumed

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines