Home » Archimedes archive » Archimedes World » AW-1991-09.adf » AWSept91 » !AWSep91/Goodies/PD/QRTinfo/Language
!AWSep91/Goodies/PD/QRTinfo/Language
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1991-09.adf » AWSept91 |
Filename: | !AWSep91/Goodies/PD/QRTinfo/Language |
Read OK: | ✔ |
File size: | 5991 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
QRT Language Reference INTRODUCTION This document is a reference guide to the QRT command language. One section is devoted to each QRT command. All parameters to commands are listed. More information on QRT can be found in the User's Manual and Technical Reference Manual. The following table shows the syntax used in this document: TEXT MEANING EXAMPLE RANGE (x,y,z) floating pt vector (10, -20, 30.56) all (r,g,b) color value triple (0, .5, 1.00) 0 to 1 i an integer 12 0 to 127 n floating pt number -123.4 all p positive float 123.4 >0 string text string FOO_BAR ASCII Each section of this document contains one or more of the following sub-sections: Command Type : OPTIONAL or REQUIRED Parameters (required) : Lists required parameters Parameters (optional) : Lists optional parameters Optional Forms : Alternatives for parameter names. Ex: 'horiz' = 'horizon' means either can be used as a parameter name. Example : An example of the command (with all required parameters, but not necessarily all optional ones. Restrictions : Things not to do See also : Similar commands QRT has a free format input language, and parameters can be given in any order. QRT Misc. Setup Commands SKY: Command type: OPTIONAL The SKY command is used to specify the color of all rays that don't hit any other object. The sky is black by default. The sky color at the zenith (up), and horizon can be specified, and QRT will blend the colors in between as smoothly as possible. In addition, dithering can be specified. Parameters (optional): zenith = (r,g,b) : the color of the zenith horiz = (r,g,b) : the color at the horizon dither = i : dithering Optional forms: 'horiz' = 'horizon' Example: SKY ( horiz = (0, 0, .6), zenith = (0, 0, .4), dither = 5 ) See also : GROUND GROUND: Command type: OPTIONAL QRT does not have a specific ground command. Instead, use a large parallelogram with an optional pattern. PARALLELOGRAM ( loc = (-10000, 0, -10000), v1 = ( 20000, 0, 0), v2 = ( 0, 0, 20000), pattern = PATTERN_OF_CHOICE ) It is also possible to use a VERY large sphere for the ground, which moves the horizon closer to the observer. This is advisable when rendering tall, reflecting objects. See also : PARALLELOGRAM, SPHERE FOC_LENGTH: Command type: OPTIONAL This sets the focal length of QRT's "camera". The default is 50, but it can be changed with this command. As with 35mm photography, larger numbers result in a 'telephoto' effect, and smaller numbers will result in wide angle (and distorted) views. As of QRT 1.5, focal length is no longer resolution dependent. Example: FOC_LENGTH = 70 Restrictions: 0 < FOC_LENGTH FIRST_SCAN: Command type: OPTIONAL This command is obsolete with QRT version 1.5. Use the X_RES and Y_RES options to the DEFAULT() command. See also : DEFAULT LAST_SCAN: Command type: OPTIONAL This command is also obsolete with QRT 1.5. See also : DEFAULT FILE_NAME: Command type: REQUIRED This is used to set the output file for QRT, which will be read by the post processor. The file name will be mapped to upper case. Some restrictions may arise from file naming conventions on specific computers. Example: FILE_NAME = QRT_IMAGE.RAW OBSERVER: Command type: REQUIRED OBSERVER tells QRT where the observer is located, and his direction of view. The view direction is specified by giving the coordinates he should look at. In addition, the observer UP vector may be given. This is, by default, (0,1,0). Parameters (required): loc = (x,y,z) : location of observer lookat = (x,y,z) : point of interest Parameters (optional): up = (x,y,z) : up vector Optional forms: 'loc' = 'pos' = 'location' = 'position' Example: OBSERVER ( loc = (0, 0, 0), lookat = (100, 0, 0) ) Restrictions: The observer cannot look in the direction of the up vector. 'lookat' cannot be equal to 'loc'. 'up' must have non-zero length. LAMP: Command type: OPTIONAL Lamps are sources of light in QRT. They can be placed anywhere, and emit any color and intensity of light. The ambient light value is the color of the lamp. The distance parameter is the minimum distance from the lamp that objects will be illuminated at full intensity. Most objects should be farther from the lamp than this value, or else they will be washed out. The radius parameter is ignored by this version of QRT, but may eventually be used to implement penumbral shadows. Parameters (required): loc = (x,y,z) : location of object dist = p : distance of max illumination Parameters (optional): amb = (r,g,b) : ambient light radius = p : radius Optional forms: 'loc' = 'pos' = 'location' = 'position' Example: LAMP ( loc = (12,34,56), radius = 123.4, ) QRT Primitive Types SPHERE: Command type: OPTIONAL SPHERE creates a sphere with a given location, radius, and surface characteristics. Parameters (required): loc = (x,y,z) : location of object radius = p : radius Parameters (optional): name = string : name for object pattern = string : pattern name to attach remove = string : pattern to cut out amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Optional forms: 'loc' = 'pos' = 'location' = 'position' Example: SPHERE ( loc = (100, 100, 50.234), radius = 123.4, diff = (1.00, .20, .20) ) PARALLELOGRAM: Command type: OPTIONAL This command creates a parallelogram with a given location, shape, and surface characteristics. Two vectors define the shape of the parallelogram (they need not be orthogonal). Parameters (required): loc = (x,y,z) : location of object v1 = (x,y,z) : vector for side one v2 = (x,y,z) : vector for side two Parameters (optional): name = string : name for object pattern = string : pattern name to attach remove = string : pattern to cut out amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Optional forms: 'loc' = 'pos' = 'location' = 'position' 'vect1' = 'v1' 'vect2' = 'v2' Example: PARALLELOGRAM ( loc = (10, 20, 50), vect1 = (20, 0, 0), vect2 = ( 0, 0, 50), diff = (0, .90, .20) ) TRIANGLE: Command type: OPTIONAL The TRIANGLE command (similar to PARALLELOGRAM) creates a triangle shape. Two vectors define the sides of the triangle. Parameters (required): loc = (x,y,z) : location of object v1 = (x,y,z) : vector for side one v2 = (x,y,z) : vector for side two Parameters (optional): name = string : name for object pattern = string : pattern name to attach remove = string : pattern to cut out amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Optional forms: 'loc' = 'pos' = 'location' = 'position' 'vect1' = 'v1' 'vect2' = 'v2' Example: TRIANGLE ( loc = (52, 21, 50), vect1 = (10, 5, 0), vect2 = ( 0, 8, 20), diff = ( 0, 0, 0), mirror = ( 1, 1, 1) ); RING: Command type: OPTIONAL RING creates a ring (annulus), which is a circle with a smaller circle cut out of it. If the inner radius is zero, the ring will be a simple circle. Two vectors define the plane of the annulus, as with RING and PARALLELOGRAM. Parameters (required): loc = (x,y,z) : location of object v1 = (x,y,z) : vector one v2 = (x,y,z) : vector two rad_1 = p : inner radius rad_2 = p : outer radius Parameters (optional): name = string : name for object pattern = string : pattern name to attach remove = string : pattern to cut out amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Optional forms: 'loc' = 'pos' = 'location' = 'position' 'vect1' = 'v1' 'vect2' = 'v2' Example: RING ( loc = (52, 21, 50), v1 = (10, 5, 0), v2 = ( 0, 8, 20), rad_1 = 10, rad_2 = 20, ) Restrictions: 0 < rad_1 < rad_2 QUADRATIC: Command type: OPTIONAL This command creates a quadratic surface given by the equation: 2 2 2 a x + b y + c z = d The coefficients a,b,c and d can be specified. This primitive can be used to create cylinders, cones, oblong spheroids, etc. Several min and max parameters specify the maximum extents of the surface. Parameters (required): loc = (x,y,z) : location of object a = n b = n c = n d = n xmax = n xmin = n ymax = n ymin = n zmax = n zmin = n Parameters (optional): name = string : name for object pattern = string : pattern name to attach remove = string : pattern to cut out amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Optional forms: 'loc' = 'pos' = 'location' = 'position' Example: { ** vertical cylinder ** } QUADRATIC ( loc = (57, 21.2, 0), a = 1, b = 0, c = 1, d = 100 ); Restrictions: a != 0 or b != 0 or c != 0 Patterned Surfaces PATTERN: Command type: OPTIONAL This command creates a pattern definition which can be attached to any primitive object. A pattern is a two dimensional array than can be mapped to the surface of any primitive. Patterns must be defined before they are used. The PATTERN keyword serves two functions: to create a pattern definition, and to attach this definition to a primitive. The correct meaning is found by context: if the PATTERN keyword appears in a primitive definition followed by a name, it is assumed to refer to a predefined pattern. However, if PATTERN occurs outside any primitive definition, it is assumed to be a pattern definition. If all the pattern definitions are grouped at the top of the file, they will always be defined before they are used. A pattern is defined by giving it a size, a name, and one or more sub-pattern definitions. There are currently three types of sub-patterns: CIRCLE, RECTANGLE, and POLYGON. The sub-pattern list can be of any length (although long lists will slow the ray tracer), and can use several of each type of sub-pattern primitive. The X and Y size parameters specify the size of the pattern; the pattern will be repeated over the surface of an object each X or Y units in the indicated direction. These size units are arbitrary, since the pattern can be given a new size when attached to an object. In each sub-pattern, any object surface characteristics can be specified. If a given ray hits this sub-pattern, the surface will be colored as indicated. If it does not hit any sub pattern in the list, the objects default surface characteristics will be used. The example below defines a red-checkered pattern. The background color of the object to which this pattern is attached will determine the color of the other checker box in the pattern. Parameters (required): name = string : name for pattern x_size = p : x size of pattern y_size = p : y size of pattern Parameters (optional): CIRCLE = circle_defn : CIRCLE sub-pattern - see reference for CIRCLE RECTANGLE = rect_defn : RECTANGLE sub-pattern - see reference for RECTANGLE POLYGON = poly_defn : POLYGON sub-pattern - see reference for POLYGON. Example: PATTERN ( x_size = 16, y_size = 16, name = CHECK, RECTANGLE ( start_x = 0, start_y = 0, end_x = 8, end_y = 8, diff = (1.00, .20, .20); ) RECTANGLE ( start_x = 8, start_y = 8, end_x = 16, end_y = 16, diff = (1.00, .20, .20); ) ) This pattern can now be attached to an object as follows: SPHERE ( { ** sphere definition here ** } pattern = CHECK, xmult = .5, ymult = .5 ) Where the xmult and ymult parameters specify a new size for the pattern. Restrictions: At least one sub-pattern must appear. If two sub-patterns overlap in a region, the last one defined will be used in this region. See also : RECTANGLE, CIRCLE, PARALLELOGRAM RECTANGLE: Command type: OPTIONAL RECTANGLE is a type of sub-pattern. Parameters (required): start_x = p : start position for rectangle start_y = p end_x = p : end position for rectangle end_y = p Parameters (optional): amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission mirror = (r,g,b) : mirror reflection density = (r,g,b) : light attenuation fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Example: RECTANGLE ( start_x = 10, start_y = 12, end_x = 15, end_y = 15, diff = (1.00, .20, .20); ) Restrictions: RECTANGLE should be used only within a pattern definition. start_x < end_x start_y < end_y See also : PATTERN CIRCLE: Command type: OPTIONAL CIRCLE is a type of sub-pattern. Parameters (required): radius = p : radius Parameters (optional): amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission mirror = (r,g,b) : mirror reflection density = (r,g,b) : light attenuation fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Example: CIRCLE ( radius = 5, diff = (1.00, .20, .20); ) Restrictions: CIRCLE should be used only within a pattern definition. See also : PATTERN POLYGON: Command type: OPTIONAL POLYGON is a type of sub-pattern. Parameters (required): point = (x,y) : a point of the polygon. Any number of points can be defined, but at least four must be defined, with the last the same as the first. Parameters (optional): amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission mirror = (r,g,b) : mirror reflection density = (r,g,b) : light attenuation fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Example: POLYGON ( point = (0,0), { triangle pattern } point = (10, 0), point = (0, 10), point = (0,0) ) Restrictions: POLYGON should be used only within a pattern definition. The last point defined must be the same as the first. At least 4 points must appear, with the last the same as the first. See also : PATTERN Bounding Boxes BEGIN_BBOX: Command type: OPTIONAL The BEGIN_BBOX, END_BBOX commands form an enclosing bounding box around a group of objects (which may include other bounding boxes). An optional name must precede the bounding box begin statement. Bounding boxes cannot be given surface characteristics, since they are conceptual objects. Parameters (optional): name = string : name for box Example: name = SAMPLE_BBOX BEGIN_BBOX SPHERE (); { ** sphere here ** } TRIANGLE (); { ** triangle here ** } END_BBOX Restrictions: Must be paired with an END_BBOX statement. END_BBOX: Command type: OPTIONAL Companion command to BEGIN_BBOX. Example: name = SAMPLE_BBOX BEGIN_BBOX SPHERE (); { ** sphere here ** } TRIANGLE (); { ** triangle here ** } END_BBOX Restrictions: Must be paired with a BEGIN_BBOX statement. Instances BEGIN_INSTANCES: Command type: OPTIONAL Several primitives may be grouped into an 'instance', and this group can easily be placed in several locations. In addition, it can be resized. All instance definitions must be placed within the BEGIN_INSTANCES and END_INSTANCES statements; only one set of these statements is allowed. A group of objects must be placed in a BBOX, and this BBOX must be given a name. In the following example, three objects are defined: OBJECT_1, SUB_OBJECT_1, and OBJECT_2. Any inclusion of OBJECT_1 will implicitly include SUB_OBJECT_1, but not OBJECT_2. Any arbitrary object tree can be included. Referring to a node will include the sub-tree rooted at that node. Example: BEGIN_INSTANCES NAME = OBJECT_1 BEGIN_BBOX { ** some primitives here ** } NAME = SUB_OBJECT_1 BEGIN_BBOX { ** some more primitives here ** } END_BBOX END_BBOX NAME = OBJECT_2 BEGIN_BBOX { ** more primitives ** } END_BBOX END_INSTANCES Restrictions: There can be only one BEGIN_INSTANCES statement. There must be a matching END_INSTANCES statement. See also: END_INSTANCES, INSTANCE_OF END_INSTANCES: Command type : OPTIONAL This command specifies the end of the instance tree. Any primitive after the END_INSTANCES statement are actually displayed as part of the image. Restrictions: There can be only one END_INSTANCES statement. See Also: BEGIN_INSTANCES, INSTANCE_OF INSTANCE_OF: Command type: OPTIONAL After an instance tree is defined with the BEGIN_INSTANCES, END_INSTANCES command pair, parts of the tree can be referred to with the INSTANCE_OF statement. This actually puts the sub-tree in the image. You must specify the name of the root of the sub-tree. The original instance should be defined relative to (0,0,0), and the location parameter specifies where the new copy will go. Parameters (required): name = string : name of sub-tree loc = (x,y,z) : location for instance Parameters (optional): scale = (x,y,z) : scale factor Example: INSTANCE_OF ( name = OBJECT_1, loc = (100.23, 20.23, 45.678), scale = (.5, .5, .5) ) Optional forms: 'loc' = 'pos' = 'location' = 'position' Restrictions: All scale factor entries should be greater than zero. If the scale factor entries are unequal, some primitives in the instance will not be affected correctly. For example, a SPHERE will remain round if scaled by (1,2,3), not change to a QUADRATIC spheroid. See also : BEGIN_INSTANCES, END_INSTANCES Setting Defaults DEFAULT: Command type: OPTIONAL QRT sets certain defaults for the color attributes of a surface. The standard default is for a white, non reflective, non shiny, non transparent surface with a medium amount of dithering. These defaults can be changed with the DEFAULT command. More than one DEFAULT command can be included, in which case each one affects all primitives after it and before the next DEFAULT or the end of the file. In addition to new surface characteristics, the NO_SHADOW keyword instructs QRT not to compute shadow information for the scene. This can decrease image generation time at the expense of image quality. X and Y resolution and image aspect ratio can be set in the DEFAULT command. If they are set more than once, the values from the last DEFAULT command are taken. The aspect ratio for any monitor can be determined as follows: aspect ratio = (XR/XD)/(YR/YD) where: XR = X resolution of monitor XD = width of monitor in arbitrary units YR = Y resolution of monitor YD = height length of monitor in arbitrary units Parameters (optional): no_shadow : QRT will not compute shadow information threshold = p : QRT will stop tracing reflected or transmitted rays when they reach this percent of their original intensity. x_res = p : X image resolution. Any command line arguments override this parameter. x_res = p : Y image resolution. Any command line arguments override this parameter. aspect = p : image aspect ratio. This is computer and resolution dependent. amb = (r,g,b) : ambient light diff = (r,g,b) : diffuse reflection trans = (r,g,b) : transmission density = (r,g,b) : light attenuation mirror = (r,g,b) : mirror reflection fuzz = i : currently unused index = p : index of refraction dither = i : dithering sreflect = p : Phong specular refl. coeff. reflect = p : percent specular reflection Example: DEFAULT ( no_shadow, { * no shadowing * } diff = (1, 0, 0) { * default = red objects * } x_res = 1280, { ** BIG image ** } y_res = 1024, aspect = .89 );
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 20 20 20 20 20 20 20 20 20 20 51 52 54 20 | QRT | 00000020 4c 61 6e 67 75 61 67 65 20 52 65 66 65 72 65 6e |Language Referen| 00000030 63 65 0a 0a 49 4e 54 52 4f 44 55 43 54 49 4f 4e |ce..INTRODUCTION| 00000040 0a 0a 20 54 68 69 73 20 64 6f 63 75 6d 65 6e 74 |.. This document| 00000050 20 69 73 20 61 20 72 65 66 65 72 65 6e 63 65 20 | is a reference | 00000060 67 75 69 64 65 20 74 6f 20 74 68 65 20 51 52 54 |guide to the QRT| 00000070 20 63 6f 6d 6d 61 6e 64 20 6c 61 6e 67 75 61 67 | command languag| 00000080 65 2e 20 4f 6e 65 20 73 65 63 74 69 6f 6e 0a 69 |e. One section.i| 00000090 73 20 64 65 76 6f 74 65 64 20 74 6f 20 65 61 63 |s devoted to eac| 000000a0 68 20 51 52 54 20 63 6f 6d 6d 61 6e 64 2e 20 41 |h QRT command. A| 000000b0 6c 6c 20 70 61 72 61 6d 65 74 65 72 73 20 74 6f |ll parameters to| 000000c0 20 63 6f 6d 6d 61 6e 64 73 20 61 72 65 20 6c 69 | commands are li| 000000d0 73 74 65 64 2e 0a 20 0a 20 4d 6f 72 65 20 69 6e |sted.. . More in| 000000e0 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 51 52 54 |formation on QRT| 000000f0 20 63 61 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e | can be found in| 00000100 20 74 68 65 20 55 73 65 72 27 73 20 4d 61 6e 75 | the User's Manu| 00000110 61 6c 20 61 6e 64 20 54 65 63 68 6e 69 63 61 6c |al and Technical| 00000120 0a 52 65 66 65 72 65 6e 63 65 20 4d 61 6e 75 61 |.Reference Manua| 00000130 6c 2e 0a 20 0a 20 54 68 65 20 66 6f 6c 6c 6f 77 |l.. . The follow| 00000140 69 6e 67 20 74 61 62 6c 65 20 73 68 6f 77 73 20 |ing table shows | 00000150 74 68 65 20 73 79 6e 74 61 78 20 75 73 65 64 20 |the syntax used | 00000160 69 6e 20 74 68 69 73 20 64 6f 63 75 6d 65 6e 74 |in this document| 00000170 3a 0a 20 0a 20 54 45 58 54 20 20 20 20 4d 45 41 |:. . TEXT MEA| 00000180 4e 49 4e 47 20 20 20 20 20 20 20 20 20 20 20 20 |NING | 00000190 45 58 41 4d 50 4c 45 20 20 20 20 20 20 20 20 20 |EXAMPLE | 000001a0 20 52 41 4e 47 45 0a 20 0a 20 28 78 2c 79 2c 7a | RANGE. . (x,y,z| 000001b0 29 20 66 6c 6f 61 74 69 6e 67 20 70 74 20 76 65 |) floating pt ve| 000001c0 63 74 6f 72 20 28 31 30 2c 20 2d 32 30 2c 20 33 |ctor (10, -20, 3| 000001d0 30 2e 35 36 29 20 61 6c 6c 0a 20 0a 20 28 72 2c |0.56) all. . (r,| 000001e0 67 2c 62 29 20 63 6f 6c 6f 72 20 76 61 6c 75 65 |g,b) color value| 000001f0 20 74 72 69 70 6c 65 20 28 30 2c 20 2e 35 2c 20 | triple (0, .5, | 00000200 31 2e 30 30 29 20 20 20 20 30 20 74 6f 20 31 0a |1.00) 0 to 1.| 00000210 20 0a 20 69 20 20 20 20 20 20 20 61 6e 20 69 6e | . i an in| 00000220 74 65 67 65 72 20 20 20 20 20 20 20 20 20 31 32 |teger 12| 00000230 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 | 0| 00000240 20 74 6f 20 31 32 37 0a 20 0a 20 6e 20 20 20 20 | to 127. . n | 00000250 20 20 20 66 6c 6f 61 74 69 6e 67 20 70 74 20 6e | floating pt n| 00000260 75 6d 62 65 72 20 2d 31 32 33 2e 34 20 20 20 20 |umber -123.4 | 00000270 20 20 20 20 20 20 20 61 6c 6c 0a 20 0a 20 70 20 | all. . p | 00000280 20 20 20 20 20 20 70 6f 73 69 74 69 76 65 20 66 | positive f| 00000290 6c 6f 61 74 20 20 20 20 20 31 32 33 2e 34 20 20 |loat 123.4 | 000002a0 20 20 20 20 20 20 20 20 20 20 3e 30 0a 20 0a 20 | >0. . | 000002b0 73 74 72 69 6e 67 20 20 74 65 78 74 20 73 74 72 |string text str| 000002c0 69 6e 67 20 20 20 20 20 20 20 20 46 4f 4f 5f 42 |ing FOO_B| 000002d0 41 52 20 20 20 20 20 20 20 20 20 20 41 53 43 49 |AR ASCI| 000002e0 49 0a 20 0a 20 45 61 63 68 20 73 65 63 74 69 6f |I. . Each sectio| 000002f0 6e 20 6f 66 20 74 68 69 73 20 64 6f 63 75 6d 65 |n of this docume| 00000300 6e 74 20 63 6f 6e 74 61 69 6e 73 20 6f 6e 65 20 |nt contains one | 00000310 6f 72 20 6d 6f 72 65 20 6f 66 20 74 68 65 20 66 |or more of the f| 00000320 6f 6c 6c 6f 77 69 6e 67 0a 73 75 62 2d 73 65 63 |ollowing.sub-sec| 00000330 74 69 6f 6e 73 3a 0a 20 0a 20 43 6f 6d 6d 61 6e |tions:. . Comman| 00000340 64 20 54 79 70 65 20 3a 20 4f 50 54 49 4f 4e 41 |d Type : OPTIONA| 00000350 4c 20 6f 72 20 52 45 51 55 49 52 45 44 0a 20 0a |L or REQUIRED. .| 00000360 20 50 61 72 61 6d 65 74 65 72 73 20 28 72 65 71 | Parameters (req| 00000370 75 69 72 65 64 29 20 3a 20 4c 69 73 74 73 20 72 |uired) : Lists r| 00000380 65 71 75 69 72 65 64 20 70 61 72 61 6d 65 74 65 |equired paramete| 00000390 72 73 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 |rs. Parameters (| 000003a0 6f 70 74 69 6f 6e 61 6c 29 20 3a 20 4c 69 73 74 |optional) : List| 000003b0 73 20 6f 70 74 69 6f 6e 61 6c 20 70 61 72 61 6d |s optional param| 000003c0 65 74 65 72 73 0a 20 0a 20 4f 70 74 69 6f 6e 61 |eters. . Optiona| 000003d0 6c 20 46 6f 72 6d 73 20 3a 20 41 6c 74 65 72 6e |l Forms : Altern| 000003e0 61 74 69 76 65 73 20 66 6f 72 20 70 61 72 61 6d |atives for param| 000003f0 65 74 65 72 20 6e 61 6d 65 73 2e 20 45 78 3a 20 |eter names. Ex: | 00000400 27 68 6f 72 69 7a 27 20 3d 20 27 68 6f 72 69 7a |'horiz' = 'horiz| 00000410 6f 6e 27 0a 6d 65 61 6e 73 20 65 69 74 68 65 72 |on'.means either| 00000420 20 63 61 6e 20 62 65 20 75 73 65 64 20 61 73 20 | can be used as | 00000430 61 20 70 61 72 61 6d 65 74 65 72 20 6e 61 6d 65 |a parameter name| 00000440 2e 0a 20 0a 20 45 78 61 6d 70 6c 65 20 3a 20 41 |.. . Example : A| 00000450 6e 20 65 78 61 6d 70 6c 65 20 6f 66 20 74 68 65 |n example of the| 00000460 20 63 6f 6d 6d 61 6e 64 20 28 77 69 74 68 20 61 | command (with a| 00000470 6c 6c 20 72 65 71 75 69 72 65 64 20 70 61 72 61 |ll required para| 00000480 6d 65 74 65 72 73 2c 20 62 75 74 20 6e 6f 74 0a |meters, but not.| 00000490 6e 65 63 65 73 73 61 72 69 6c 79 20 61 6c 6c 20 |necessarily all | 000004a0 6f 70 74 69 6f 6e 61 6c 20 6f 6e 65 73 2e 0a 20 |optional ones.. | 000004b0 0a 20 52 65 73 74 72 69 63 74 69 6f 6e 73 20 3a |. Restrictions :| 000004c0 20 54 68 69 6e 67 73 20 6e 6f 74 20 74 6f 20 64 | Things not to d| 000004d0 6f 0a 20 0a 20 53 65 65 20 61 6c 73 6f 20 3a 20 |o. . See also : | 000004e0 53 69 6d 69 6c 61 72 20 63 6f 6d 6d 61 6e 64 73 |Similar commands| 000004f0 0a 20 0a 20 51 52 54 20 68 61 73 20 61 20 66 72 |. . QRT has a fr| 00000500 65 65 20 66 6f 72 6d 61 74 20 69 6e 70 75 74 20 |ee format input | 00000510 6c 61 6e 67 75 61 67 65 2c 20 61 6e 64 20 70 61 |language, and pa| 00000520 72 61 6d 65 74 65 72 73 20 63 61 6e 20 62 65 20 |rameters can be | 00000530 67 69 76 65 6e 20 69 6e 20 61 6e 79 0a 6f 72 64 |given in any.ord| 00000540 65 72 2e 0a 20 0a 51 52 54 20 4d 69 73 63 2e 20 |er.. .QRT Misc. | 00000550 53 65 74 75 70 20 43 6f 6d 6d 61 6e 64 73 0a 0a |Setup Commands..| 00000560 20 0a 53 4b 59 3a 0a 20 0a 20 43 6f 6d 6d 61 6e | .SKY:. . Comman| 00000570 64 20 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c |d type: OPTIONAL| 00000580 0a 20 0a 20 54 68 65 20 53 4b 59 20 63 6f 6d 6d |. . The SKY comm| 00000590 61 6e 64 20 69 73 20 75 73 65 64 20 74 6f 20 73 |and is used to s| 000005a0 70 65 63 69 66 79 20 74 68 65 20 63 6f 6c 6f 72 |pecify the color| 000005b0 20 6f 66 20 61 6c 6c 20 72 61 79 73 20 74 68 61 | of all rays tha| 000005c0 74 20 64 6f 6e 27 74 20 68 69 74 20 61 6e 79 0a |t don't hit any.| 000005d0 6f 74 68 65 72 20 6f 62 6a 65 63 74 2e 20 54 68 |other object. Th| 000005e0 65 20 73 6b 79 20 69 73 20 62 6c 61 63 6b 20 62 |e sky is black b| 000005f0 79 20 64 65 66 61 75 6c 74 2e 20 54 68 65 20 73 |y default. The s| 00000600 6b 79 20 63 6f 6c 6f 72 20 61 74 20 74 68 65 20 |ky color at the | 00000610 7a 65 6e 69 74 68 20 28 75 70 29 2c 0a 61 6e 64 |zenith (up),.and| 00000620 20 68 6f 72 69 7a 6f 6e 20 63 61 6e 20 62 65 20 | horizon can be | 00000630 73 70 65 63 69 66 69 65 64 2c 20 61 6e 64 20 51 |specified, and Q| 00000640 52 54 20 77 69 6c 6c 20 62 6c 65 6e 64 20 74 68 |RT will blend th| 00000650 65 20 63 6f 6c 6f 72 73 20 69 6e 20 62 65 74 77 |e colors in betw| 00000660 65 65 6e 20 61 73 0a 73 6d 6f 6f 74 68 6c 79 20 |een as.smoothly | 00000670 61 73 20 70 6f 73 73 69 62 6c 65 2e 20 49 6e 20 |as possible. In | 00000680 61 64 64 69 74 69 6f 6e 2c 20 64 69 74 68 65 72 |addition, dither| 00000690 69 6e 67 20 63 61 6e 20 62 65 20 73 70 65 63 69 |ing can be speci| 000006a0 66 69 65 64 2e 0a 20 0a 20 50 61 72 61 6d 65 74 |fied.. . Paramet| 000006b0 65 72 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a |ers (optional):.| 000006c0 20 0a 20 7a 65 6e 69 74 68 20 3d 20 28 72 2c 67 | . zenith = (r,g| 000006d0 2c 62 29 20 3a 20 74 68 65 20 63 6f 6c 6f 72 20 |,b) : the color | 000006e0 6f 66 20 74 68 65 20 7a 65 6e 69 74 68 0a 20 68 |of the zenith. h| 000006f0 6f 72 69 7a 20 20 3d 20 28 72 2c 67 2c 62 29 20 |oriz = (r,g,b) | 00000700 3a 20 74 68 65 20 63 6f 6c 6f 72 20 61 74 20 74 |: the color at t| 00000710 68 65 20 68 6f 72 69 7a 6f 6e 0a 20 64 69 74 68 |he horizon. dith| 00000720 65 72 20 3d 20 69 20 20 20 20 20 20 20 3a 20 64 |er = i : d| 00000730 69 74 68 65 72 69 6e 67 0a 20 0a 20 4f 70 74 69 |ithering. . Opti| 00000740 6f 6e 61 6c 20 66 6f 72 6d 73 3a 0a 20 0a 20 27 |onal forms:. . '| 00000750 68 6f 72 69 7a 27 20 3d 20 27 68 6f 72 69 7a 6f |horiz' = 'horizo| 00000760 6e 27 0a 20 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 |n'. . Example:. | 00000770 0a 20 53 4b 59 20 28 20 68 6f 72 69 7a 20 20 3d |. SKY ( horiz =| 00000780 20 28 30 2c 20 30 2c 20 2e 36 29 2c 0a 20 20 20 | (0, 0, .6),. | 00000790 20 20 20 20 7a 65 6e 69 74 68 20 3d 20 28 30 2c | zenith = (0,| 000007a0 20 30 2c 20 2e 34 29 2c 0a 20 20 20 20 20 20 20 | 0, .4),. | 000007b0 64 69 74 68 65 72 20 3d 20 35 0a 20 20 20 20 20 |dither = 5. | 000007c0 29 0a 20 0a 20 53 65 65 20 61 6c 73 6f 20 3a 20 |). . See also : | 000007d0 47 52 4f 55 4e 44 0a 0a 0a 47 52 4f 55 4e 44 3a |GROUND...GROUND:| 000007e0 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 70 65 |. . Command type| 000007f0 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 51 52 |: OPTIONAL. . QR| 00000800 54 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 |T does not have | 00000810 61 20 73 70 65 63 69 66 69 63 20 67 72 6f 75 6e |a specific groun| 00000820 64 20 63 6f 6d 6d 61 6e 64 2e 20 49 6e 73 74 65 |d command. Inste| 00000830 61 64 2c 20 75 73 65 20 61 20 6c 61 72 67 65 0a |ad, use a large.| 00000840 70 61 72 61 6c 6c 65 6c 6f 67 72 61 6d 20 77 69 |parallelogram wi| 00000850 74 68 20 61 6e 20 6f 70 74 69 6f 6e 61 6c 20 70 |th an optional p| 00000860 61 74 74 65 72 6e 2e 0a 20 0a 20 50 41 52 41 4c |attern.. . PARAL| 00000870 4c 45 4c 4f 47 52 41 4d 20 28 20 6c 6f 63 20 3d |LELOGRAM ( loc =| 00000880 20 28 2d 31 30 30 30 30 2c 20 30 2c 20 2d 31 30 | (-10000, 0, -10| 00000890 30 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 |000),. | 000008a0 20 20 20 20 20 20 20 76 31 20 20 3d 20 28 20 32 | v1 = ( 2| 000008b0 30 30 30 30 2c 20 30 2c 20 30 29 2c 0a 20 20 20 |0000, 0, 0),. | 000008c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 32 | v2| 000008d0 20 20 3d 20 28 20 30 2c 20 30 2c 20 32 30 30 30 | = ( 0, 0, 2000| 000008e0 30 29 2c 0a 20 0a 20 20 20 20 20 20 20 20 20 20 |0),. . | 000008f0 20 20 20 20 20 20 20 70 61 74 74 65 72 6e 20 3d | pattern =| 00000900 20 50 41 54 54 45 52 4e 5f 4f 46 5f 43 48 4f 49 | PATTERN_OF_CHOI| 00000910 43 45 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |CE. | 00000920 20 20 29 0a 20 0a 20 49 74 20 69 73 20 61 6c 73 | ). . It is als| 00000930 6f 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 75 73 |o possible to us| 00000940 65 20 61 20 56 45 52 59 20 6c 61 72 67 65 20 73 |e a VERY large s| 00000950 70 68 65 72 65 20 66 6f 72 20 74 68 65 20 67 72 |phere for the gr| 00000960 6f 75 6e 64 2c 20 77 68 69 63 68 20 6d 6f 76 65 |ound, which move| 00000970 73 0a 74 68 65 20 68 6f 72 69 7a 6f 6e 20 63 6c |s.the horizon cl| 00000980 6f 73 65 72 20 74 6f 20 74 68 65 20 6f 62 73 65 |oser to the obse| 00000990 72 76 65 72 2e 20 54 68 69 73 20 69 73 20 61 64 |rver. This is ad| 000009a0 76 69 73 61 62 6c 65 20 77 68 65 6e 20 72 65 6e |visable when ren| 000009b0 64 65 72 69 6e 67 20 74 61 6c 6c 2c 0a 72 65 66 |dering tall,.ref| 000009c0 6c 65 63 74 69 6e 67 20 6f 62 6a 65 63 74 73 2e |lecting objects.| 000009d0 0a 20 0a 20 53 65 65 20 61 6c 73 6f 20 3a 20 50 |. . See also : P| 000009e0 41 52 41 4c 4c 45 4c 4f 47 52 41 4d 2c 20 53 50 |ARALLELOGRAM, SP| 000009f0 48 45 52 45 0a 0a 0a 46 4f 43 5f 4c 45 4e 47 54 |HERE...FOC_LENGT| 00000a00 48 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 |H:. . Command ty| 00000a10 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 |pe: OPTIONAL. . | 00000a20 54 68 69 73 20 73 65 74 73 20 74 68 65 20 66 6f |This sets the fo| 00000a30 63 61 6c 20 6c 65 6e 67 74 68 20 6f 66 20 51 52 |cal length of QR| 00000a40 54 27 73 20 22 63 61 6d 65 72 61 22 2e 20 54 68 |T's "camera". Th| 00000a50 65 20 64 65 66 61 75 6c 74 20 69 73 20 35 30 2c |e default is 50,| 00000a60 20 62 75 74 20 69 74 20 63 61 6e 0a 62 65 20 63 | but it can.be c| 00000a70 68 61 6e 67 65 64 20 77 69 74 68 20 74 68 69 73 |hanged with this| 00000a80 20 63 6f 6d 6d 61 6e 64 2e 20 41 73 20 77 69 74 | command. As wit| 00000a90 68 20 33 35 6d 6d 20 70 68 6f 74 6f 67 72 61 70 |h 35mm photograp| 00000aa0 68 79 2c 20 6c 61 72 67 65 72 20 6e 75 6d 62 65 |hy, larger numbe| 00000ab0 72 73 0a 72 65 73 75 6c 74 20 69 6e 20 61 20 27 |rs.result in a '| 00000ac0 74 65 6c 65 70 68 6f 74 6f 27 20 65 66 66 65 63 |telephoto' effec| 00000ad0 74 2c 20 61 6e 64 20 73 6d 61 6c 6c 65 72 20 6e |t, and smaller n| 00000ae0 75 6d 62 65 72 73 20 77 69 6c 6c 20 72 65 73 75 |umbers will resu| 00000af0 6c 74 20 69 6e 20 77 69 64 65 0a 61 6e 67 6c 65 |lt in wide.angle| 00000b00 20 28 61 6e 64 20 64 69 73 74 6f 72 74 65 64 29 | (and distorted)| 00000b10 20 76 69 65 77 73 2e 20 41 73 20 6f 66 20 51 52 | views. As of QR| 00000b20 54 20 31 2e 35 2c 20 66 6f 63 61 6c 20 6c 65 6e |T 1.5, focal len| 00000b30 67 74 68 20 69 73 20 6e 6f 20 6c 6f 6e 67 65 72 |gth is no longer| 00000b40 0a 72 65 73 6f 6c 75 74 69 6f 6e 20 64 65 70 65 |.resolution depe| 00000b50 6e 64 65 6e 74 2e 0a 20 0a 20 45 78 61 6d 70 6c |ndent.. . Exampl| 00000b60 65 3a 0a 20 0a 20 46 4f 43 5f 4c 45 4e 47 54 48 |e:. . FOC_LENGTH| 00000b70 20 3d 20 37 30 0a 20 0a 20 52 65 73 74 72 69 63 | = 70. . Restric| 00000b80 74 69 6f 6e 73 3a 0a 20 0a 20 30 20 3c 20 46 4f |tions:. . 0 < FO| 00000b90 43 5f 4c 45 4e 47 54 48 0a 20 0a 20 0a 46 49 52 |C_LENGTH. . .FIR| 00000ba0 53 54 5f 53 43 41 4e 3a 0a 20 0a 20 43 6f 6d 6d |ST_SCAN:. . Comm| 00000bb0 61 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 4f 4e |and type: OPTION| 00000bc0 41 4c 0a 20 0a 20 54 68 69 73 20 63 6f 6d 6d 61 |AL. . This comma| 00000bd0 6e 64 20 69 73 20 6f 62 73 6f 6c 65 74 65 20 77 |nd is obsolete w| 00000be0 69 74 68 20 51 52 54 20 76 65 72 73 69 6f 6e 20 |ith QRT version | 00000bf0 31 2e 35 2e 20 55 73 65 20 74 68 65 20 58 5f 52 |1.5. Use the X_R| 00000c00 45 53 0a 20 61 6e 64 20 59 5f 52 45 53 20 6f 70 |ES. and Y_RES op| 00000c10 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 44 45 46 |tions to the DEF| 00000c20 41 55 4c 54 28 29 20 63 6f 6d 6d 61 6e 64 2e 0a |AULT() command..| 00000c30 20 0a 20 53 65 65 20 61 6c 73 6f 20 3a 20 44 45 | . See also : DE| 00000c40 46 41 55 4c 54 0a 20 0a 20 0a 4c 41 53 54 5f 53 |FAULT. . .LAST_S| 00000c50 43 41 4e 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 |CAN:. . Command | 00000c60 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 |type: OPTIONAL. | 00000c70 0a 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 |. This command i| 00000c80 73 20 61 6c 73 6f 20 6f 62 73 6f 6c 65 74 65 20 |s also obsolete | 00000c90 77 69 74 68 20 51 52 54 20 31 2e 35 2e 0a 20 0a |with QRT 1.5.. .| 00000ca0 20 53 65 65 20 61 6c 73 6f 20 3a 20 44 45 46 41 | See also : DEFA| 00000cb0 55 4c 54 0a 20 0a 20 0a 46 49 4c 45 5f 4e 41 4d |ULT. . .FILE_NAM| 00000cc0 45 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 |E:. . Command ty| 00000cd0 70 65 3a 20 52 45 51 55 49 52 45 44 0a 20 0a 20 |pe: REQUIRED. . | 00000ce0 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20 |This is used to | 00000cf0 73 65 74 20 74 68 65 20 6f 75 74 70 75 74 20 66 |set the output f| 00000d00 69 6c 65 20 66 6f 72 20 51 52 54 2c 20 77 68 69 |ile for QRT, whi| 00000d10 63 68 20 77 69 6c 6c 20 62 65 20 72 65 61 64 20 |ch will be read | 00000d20 62 79 20 74 68 65 20 70 6f 73 74 0a 70 72 6f 63 |by the post.proc| 00000d30 65 73 73 6f 72 2e 20 54 68 65 20 66 69 6c 65 20 |essor. The file | 00000d40 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 6d 61 70 |name will be map| 00000d50 70 65 64 20 74 6f 20 75 70 70 65 72 20 63 61 73 |ped to upper cas| 00000d60 65 2e 20 53 6f 6d 65 20 72 65 73 74 72 69 63 74 |e. Some restrict| 00000d70 69 6f 6e 73 20 6d 61 79 0a 61 72 69 73 65 20 66 |ions may.arise f| 00000d80 72 6f 6d 20 66 69 6c 65 20 6e 61 6d 69 6e 67 20 |rom file naming | 00000d90 63 6f 6e 76 65 6e 74 69 6f 6e 73 20 6f 6e 20 73 |conventions on s| 00000da0 70 65 63 69 66 69 63 20 63 6f 6d 70 75 74 65 72 |pecific computer| 00000db0 73 2e 0a 20 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 |s.. . Example:. | 00000dc0 0a 20 46 49 4c 45 5f 4e 41 4d 45 20 3d 20 51 52 |. FILE_NAME = QR| 00000dd0 54 5f 49 4d 41 47 45 2e 52 41 57 0a 20 0a 20 0a |T_IMAGE.RAW. . .| 00000de0 4f 42 53 45 52 56 45 52 3a 0a 20 0a 20 43 6f 6d |OBSERVER:. . Com| 00000df0 6d 61 6e 64 20 74 79 70 65 3a 20 52 45 51 55 49 |mand type: REQUI| 00000e00 52 45 44 0a 20 0a 20 4f 42 53 45 52 56 45 52 20 |RED. . OBSERVER | 00000e10 74 65 6c 6c 73 20 51 52 54 20 77 68 65 72 65 20 |tells QRT where | 00000e20 74 68 65 20 6f 62 73 65 72 76 65 72 20 69 73 20 |the observer is | 00000e30 6c 6f 63 61 74 65 64 2c 20 61 6e 64 20 68 69 73 |located, and his| 00000e40 20 64 69 72 65 63 74 69 6f 6e 20 6f 66 0a 76 69 | direction of.vi| 00000e50 65 77 2e 20 54 68 65 20 76 69 65 77 20 64 69 72 |ew. The view dir| 00000e60 65 63 74 69 6f 6e 20 69 73 20 73 70 65 63 69 66 |ection is specif| 00000e70 69 65 64 20 62 79 20 67 69 76 69 6e 67 20 74 68 |ied by giving th| 00000e80 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 68 65 |e coordinates he| 00000e90 20 73 68 6f 75 6c 64 0a 6c 6f 6f 6b 20 61 74 2e | should.look at.| 00000ea0 20 49 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 | In addition, th| 00000eb0 65 20 6f 62 73 65 72 76 65 72 20 55 50 20 76 65 |e observer UP ve| 00000ec0 63 74 6f 72 20 6d 61 79 20 62 65 20 67 69 76 65 |ctor may be give| 00000ed0 6e 2e 20 54 68 69 73 20 69 73 2c 20 62 79 0a 64 |n. This is, by.d| 00000ee0 65 66 61 75 6c 74 2c 20 28 30 2c 31 2c 30 29 2e |efault, (0,1,0).| 00000ef0 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 |. . Parameters (| 00000f00 72 65 71 75 69 72 65 64 29 3a 0a 20 0a 20 6c 6f |required):. . lo| 00000f10 63 20 20 20 20 3d 20 28 78 2c 79 2c 7a 29 20 3a |c = (x,y,z) :| 00000f20 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 6f 62 73 | location of obs| 00000f30 65 72 76 65 72 0a 20 6c 6f 6f 6b 61 74 20 3d 20 |erver. lookat = | 00000f40 28 78 2c 79 2c 7a 29 20 3a 20 70 6f 69 6e 74 20 |(x,y,z) : point | 00000f50 6f 66 20 69 6e 74 65 72 65 73 74 0a 20 0a 20 50 |of interest. . P| 00000f60 61 72 61 6d 65 74 65 72 73 20 28 6f 70 74 69 6f |arameters (optio| 00000f70 6e 61 6c 29 3a 0a 20 0a 20 75 70 20 3d 20 28 78 |nal):. . up = (x| 00000f80 2c 79 2c 7a 29 20 3a 20 75 70 20 76 65 63 74 6f |,y,z) : up vecto| 00000f90 72 0a 20 0a 20 4f 70 74 69 6f 6e 61 6c 20 66 6f |r. . Optional fo| 00000fa0 72 6d 73 3a 0a 20 0a 20 27 6c 6f 63 27 20 3d 20 |rms:. . 'loc' = | 00000fb0 27 70 6f 73 27 20 3d 20 27 6c 6f 63 61 74 69 6f |'pos' = 'locatio| 00000fc0 6e 27 20 3d 20 27 70 6f 73 69 74 69 6f 6e 27 0a |n' = 'position'.| 00000fd0 20 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 4f | . Example:. . O| 00000fe0 42 53 45 52 56 45 52 20 28 20 6c 6f 63 20 20 20 |BSERVER ( loc | 00000ff0 20 3d 20 28 30 2c 20 30 2c 20 30 29 2c 0a 20 20 | = (0, 0, 0),. | 00001000 20 20 20 20 20 20 20 20 20 20 6c 6f 6f 6b 61 74 | lookat| 00001010 20 3d 20 28 31 30 30 2c 20 30 2c 20 30 29 0a 20 | = (100, 0, 0). | 00001020 20 20 20 20 20 20 20 20 20 29 0a 20 0a 20 52 65 | ). . Re| 00001030 73 74 72 69 63 74 69 6f 6e 73 3a 0a 20 0a 20 54 |strictions:. . T| 00001040 68 65 20 6f 62 73 65 72 76 65 72 20 63 61 6e 6e |he observer cann| 00001050 6f 74 20 6c 6f 6f 6b 20 69 6e 20 74 68 65 20 64 |ot look in the d| 00001060 69 72 65 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 |irection of the | 00001070 75 70 20 76 65 63 74 6f 72 2e 0a 20 27 6c 6f 6f |up vector.. 'loo| 00001080 6b 61 74 27 20 63 61 6e 6e 6f 74 20 62 65 20 65 |kat' cannot be e| 00001090 71 75 61 6c 20 74 6f 20 27 6c 6f 63 27 2e 0a 20 |qual to 'loc'.. | 000010a0 27 75 70 27 20 6d 75 73 74 20 68 61 76 65 20 6e |'up' must have n| 000010b0 6f 6e 2d 7a 65 72 6f 20 6c 65 6e 67 74 68 2e 0a |on-zero length..| 000010c0 20 0a 0a 4c 41 4d 50 3a 0a 20 0a 20 43 6f 6d 6d | ..LAMP:. . Comm| 000010d0 61 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 4f 4e |and type: OPTION| 000010e0 41 4c 0a 20 0a 20 4c 61 6d 70 73 20 61 72 65 20 |AL. . Lamps are | 000010f0 73 6f 75 72 63 65 73 20 6f 66 20 6c 69 67 68 74 |sources of light| 00001100 20 69 6e 20 51 52 54 2e 20 54 68 65 79 20 63 61 | in QRT. They ca| 00001110 6e 20 62 65 20 70 6c 61 63 65 64 20 61 6e 79 77 |n be placed anyw| 00001120 68 65 72 65 2c 20 61 6e 64 20 65 6d 69 74 0a 61 |here, and emit.a| 00001130 6e 79 20 63 6f 6c 6f 72 20 61 6e 64 20 69 6e 74 |ny color and int| 00001140 65 6e 73 69 74 79 20 6f 66 20 6c 69 67 68 74 2e |ensity of light.| 00001150 20 54 68 65 20 61 6d 62 69 65 6e 74 20 6c 69 67 | The ambient lig| 00001160 68 74 20 76 61 6c 75 65 20 69 73 20 74 68 65 20 |ht value is the | 00001170 63 6f 6c 6f 72 20 6f 66 0a 74 68 65 20 6c 61 6d |color of.the lam| 00001180 70 2e 20 54 68 65 20 64 69 73 74 61 6e 63 65 20 |p. The distance | 00001190 70 61 72 61 6d 65 74 65 72 20 69 73 20 74 68 65 |parameter is the| 000011a0 20 6d 69 6e 69 6d 75 6d 20 64 69 73 74 61 6e 63 | minimum distanc| 000011b0 65 20 66 72 6f 6d 20 74 68 65 20 6c 61 6d 70 20 |e from the lamp | 000011c0 74 68 61 74 0a 6f 62 6a 65 63 74 73 20 77 69 6c |that.objects wil| 000011d0 6c 20 62 65 20 69 6c 6c 75 6d 69 6e 61 74 65 64 |l be illuminated| 000011e0 20 61 74 20 66 75 6c 6c 20 69 6e 74 65 6e 73 69 | at full intensi| 000011f0 74 79 2e 20 4d 6f 73 74 20 6f 62 6a 65 63 74 73 |ty. Most objects| 00001200 20 73 68 6f 75 6c 64 20 62 65 0a 66 61 72 74 68 | should be.farth| 00001210 65 72 20 66 72 6f 6d 20 74 68 65 20 6c 61 6d 70 |er from the lamp| 00001220 20 74 68 61 6e 20 74 68 69 73 20 76 61 6c 75 65 | than this value| 00001230 2c 20 6f 72 20 65 6c 73 65 20 74 68 65 79 20 77 |, or else they w| 00001240 69 6c 6c 20 62 65 20 77 61 73 68 65 64 20 6f 75 |ill be washed ou| 00001250 74 2e 20 54 68 65 0a 72 61 64 69 75 73 20 70 61 |t. The.radius pa| 00001260 72 61 6d 65 74 65 72 20 69 73 20 69 67 6e 6f 72 |rameter is ignor| 00001270 65 64 20 62 79 20 74 68 69 73 20 76 65 72 73 69 |ed by this versi| 00001280 6f 6e 20 6f 66 20 51 52 54 2c 20 62 75 74 20 6d |on of QRT, but m| 00001290 61 79 20 65 76 65 6e 74 75 61 6c 6c 79 20 62 65 |ay eventually be| 000012a0 0a 75 73 65 64 20 74 6f 20 69 6d 70 6c 65 6d 65 |.used to impleme| 000012b0 6e 74 20 70 65 6e 75 6d 62 72 61 6c 20 73 68 61 |nt penumbral sha| 000012c0 64 6f 77 73 2e 0a 20 0a 20 50 61 72 61 6d 65 74 |dows.. . Paramet| 000012d0 65 72 73 20 28 72 65 71 75 69 72 65 64 29 3a 0a |ers (required):.| 000012e0 20 0a 20 6c 6f 63 20 20 3d 20 28 78 2c 79 2c 7a | . loc = (x,y,z| 000012f0 29 20 3a 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 |) : location of | 00001300 6f 62 6a 65 63 74 0a 20 64 69 73 74 20 3d 20 70 |object. dist = p| 00001310 20 20 20 20 20 20 20 3a 20 64 69 73 74 61 6e 63 | : distanc| 00001320 65 20 6f 66 20 6d 61 78 20 69 6c 6c 75 6d 69 6e |e of max illumin| 00001330 61 74 69 6f 6e 0a 20 0a 20 50 61 72 61 6d 65 74 |ation. . Paramet| 00001340 65 72 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a |ers (optional):.| 00001350 20 0a 20 61 6d 62 20 20 20 20 3d 20 28 72 2c 67 | . amb = (r,g| 00001360 2c 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 6c 69 |,b) : ambient li| 00001370 67 68 74 0a 20 72 61 64 69 75 73 20 3d 20 70 20 |ght. radius = p | 00001380 20 20 20 20 20 20 3a 20 72 61 64 69 75 73 0a 20 | : radius. | 00001390 0a 20 4f 70 74 69 6f 6e 61 6c 20 66 6f 72 6d 73 |. Optional forms| 000013a0 3a 0a 20 0a 20 27 6c 6f 63 27 20 3d 20 27 70 6f |:. . 'loc' = 'po| 000013b0 73 27 20 3d 20 27 6c 6f 63 61 74 69 6f 6e 27 20 |s' = 'location' | 000013c0 3d 20 27 70 6f 73 69 74 69 6f 6e 27 0a 20 0a 20 |= 'position'. . | 000013d0 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 4c 41 4d 50 |Example:. . LAMP| 000013e0 20 28 20 6c 6f 63 20 20 20 20 3d 20 28 31 32 2c | ( loc = (12,| 000013f0 33 34 2c 35 36 29 2c 0a 20 20 20 20 20 20 20 20 |34,56),. | 00001400 72 61 64 69 75 73 20 3d 20 31 32 33 2e 34 2c 0a |radius = 123.4,.| 00001410 20 20 20 20 20 20 29 0a 20 0a 0a 51 52 54 20 50 | ). ..QRT P| 00001420 72 69 6d 69 74 69 76 65 20 54 79 70 65 73 0a 20 |rimitive Types. | 00001430 0a 20 0a 53 50 48 45 52 45 3a 0a 20 0a 20 43 6f |. .SPHERE:. . Co| 00001440 6d 6d 61 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 |mmand type: OPTI| 00001450 4f 4e 41 4c 0a 20 0a 20 53 50 48 45 52 45 20 63 |ONAL. . SPHERE c| 00001460 72 65 61 74 65 73 20 61 20 73 70 68 65 72 65 20 |reates a sphere | 00001470 77 69 74 68 20 61 20 67 69 76 65 6e 20 6c 6f 63 |with a given loc| 00001480 61 74 69 6f 6e 2c 20 72 61 64 69 75 73 2c 20 61 |ation, radius, a| 00001490 6e 64 20 73 75 72 66 61 63 65 0a 63 68 61 72 61 |nd surface.chara| 000014a0 63 74 65 72 69 73 74 69 63 73 2e 0a 20 0a 20 50 |cteristics.. . P| 000014b0 61 72 61 6d 65 74 65 72 73 20 28 72 65 71 75 69 |arameters (requi| 000014c0 72 65 64 29 3a 0a 20 0a 20 6c 6f 63 20 20 20 20 |red):. . loc | 000014d0 3d 20 28 78 2c 79 2c 7a 29 20 3a 20 6c 6f 63 61 |= (x,y,z) : loca| 000014e0 74 69 6f 6e 20 6f 66 20 6f 62 6a 65 63 74 0a 20 |tion of object. | 000014f0 72 61 64 69 75 73 20 3d 20 70 20 20 20 20 20 20 |radius = p | 00001500 20 3a 20 72 61 64 69 75 73 0a 20 0a 20 50 61 72 | : radius. . Par| 00001510 61 6d 65 74 65 72 73 20 28 6f 70 74 69 6f 6e 61 |ameters (optiona| 00001520 6c 29 3a 0a 20 0a 20 6e 61 6d 65 20 20 20 20 20 |l):. . name | 00001530 3d 20 73 74 72 69 6e 67 20 20 3a 20 6e 61 6d 65 |= string : name| 00001540 20 66 6f 72 20 6f 62 6a 65 63 74 0a 20 70 61 74 | for object. pat| 00001550 74 65 72 6e 20 20 3d 20 73 74 72 69 6e 67 20 20 |tern = string | 00001560 3a 20 70 61 74 74 65 72 6e 20 6e 61 6d 65 20 74 |: pattern name t| 00001570 6f 20 61 74 74 61 63 68 0a 20 72 65 6d 6f 76 65 |o attach. remove| 00001580 20 20 20 3d 20 73 74 72 69 6e 67 20 20 3a 20 70 | = string : p| 00001590 61 74 74 65 72 6e 20 74 6f 20 63 75 74 20 6f 75 |attern to cut ou| 000015a0 74 0a 20 61 6d 62 20 20 20 20 20 20 3d 20 28 72 |t. amb = (r| 000015b0 2c 67 2c 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 |,g,b) : ambient | 000015c0 6c 69 67 68 74 0a 20 64 69 66 66 20 20 20 20 20 |light. diff | 000015d0 3d 20 28 72 2c 67 2c 62 29 20 3a 20 64 69 66 66 |= (r,g,b) : diff| 000015e0 75 73 65 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 |use reflection. | 000015f0 74 72 61 6e 73 20 20 20 20 3d 20 28 72 2c 67 2c |trans = (r,g,| 00001600 62 29 20 3a 20 74 72 61 6e 73 6d 69 73 73 69 6f |b) : transmissio| 00001610 6e 0a 20 64 65 6e 73 69 74 79 20 20 3d 20 28 72 |n. density = (r| 00001620 2c 67 2c 62 29 20 3a 20 6c 69 67 68 74 20 61 74 |,g,b) : light at| 00001630 74 65 6e 75 61 74 69 6f 6e 0a 20 6d 69 72 72 6f |tenuation. mirro| 00001640 72 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 |r = (r,g,b) : | 00001650 6d 69 72 72 6f 72 20 72 65 66 6c 65 63 74 69 6f |mirror reflectio| 00001660 6e 0a 20 66 75 7a 7a 20 20 20 20 20 3d 20 69 20 |n. fuzz = i | 00001670 20 20 20 20 20 20 3a 20 63 75 72 72 65 6e 74 6c | : currentl| 00001680 79 20 75 6e 75 73 65 64 0a 20 69 6e 64 65 78 20 |y unused. index | 00001690 20 20 20 3d 20 70 20 20 20 20 20 20 20 3a 20 69 | = p : i| 000016a0 6e 64 65 78 20 6f 66 20 72 65 66 72 61 63 74 69 |ndex of refracti| 000016b0 6f 6e 0a 20 64 69 74 68 65 72 20 20 20 3d 20 69 |on. dither = i| 000016c0 20 20 20 20 20 20 20 3a 20 64 69 74 68 65 72 69 | : ditheri| 000016d0 6e 67 0a 20 73 72 65 66 6c 65 63 74 20 3d 20 70 |ng. sreflect = p| 000016e0 20 20 20 20 20 20 20 3a 20 50 68 6f 6e 67 20 73 | : Phong s| 000016f0 70 65 63 75 6c 61 72 20 72 65 66 6c 2e 20 63 6f |pecular refl. co| 00001700 65 66 66 2e 0a 20 72 65 66 6c 65 63 74 20 20 3d |eff.. reflect =| 00001710 20 70 20 20 20 20 20 20 20 3a 20 70 65 72 63 65 | p : perce| 00001720 6e 74 20 73 70 65 63 75 6c 61 72 20 72 65 66 6c |nt specular refl| 00001730 65 63 74 69 6f 6e 0a 20 0a 20 4f 70 74 69 6f 6e |ection. . Option| 00001740 61 6c 20 66 6f 72 6d 73 3a 0a 20 0a 20 27 6c 6f |al forms:. . 'lo| 00001750 63 27 20 3d 20 27 70 6f 73 27 20 3d 20 27 6c 6f |c' = 'pos' = 'lo| 00001760 63 61 74 69 6f 6e 27 20 3d 20 27 70 6f 73 69 74 |cation' = 'posit| 00001770 69 6f 6e 27 0a 20 0a 20 45 78 61 6d 70 6c 65 3a |ion'. . Example:| 00001780 0a 20 0a 20 53 50 48 45 52 45 20 28 20 6c 6f 63 |. . SPHERE ( loc| 00001790 20 3d 20 28 31 30 30 2c 20 31 30 30 2c 20 35 30 | = (100, 100, 50| 000017a0 2e 32 33 34 29 2c 0a 20 20 20 20 20 20 20 20 20 |.234),. | 000017b0 20 72 61 64 69 75 73 20 3d 20 31 32 33 2e 34 2c | radius = 123.4,| 000017c0 0a 20 20 20 20 20 20 20 20 20 20 64 69 66 66 20 |. diff | 000017d0 3d 20 28 31 2e 30 30 2c 20 2e 32 30 2c 20 2e 32 |= (1.00, .20, .2| 000017e0 30 29 0a 20 20 20 20 20 20 20 20 29 0a 20 0a 20 |0). ). . | 000017f0 0a 50 41 52 41 4c 4c 45 4c 4f 47 52 41 4d 3a 0a |.PARALLELOGRAM:.| 00001800 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 70 65 3a | . Command type:| 00001810 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 54 68 69 | OPTIONAL. . Thi| 00001820 73 20 63 6f 6d 6d 61 6e 64 20 63 72 65 61 74 65 |s command create| 00001830 73 20 61 20 70 61 72 61 6c 6c 65 6c 6f 67 72 61 |s a parallelogra| 00001840 6d 20 77 69 74 68 20 61 20 67 69 76 65 6e 20 6c |m with a given l| 00001850 6f 63 61 74 69 6f 6e 2c 20 73 68 61 70 65 2c 20 |ocation, shape, | 00001860 61 6e 64 0a 73 75 72 66 61 63 65 20 63 68 61 72 |and.surface char| 00001870 61 63 74 65 72 69 73 74 69 63 73 2e 20 54 77 6f |acteristics. Two| 00001880 20 76 65 63 74 6f 72 73 20 64 65 66 69 6e 65 20 | vectors define | 00001890 74 68 65 20 73 68 61 70 65 20 6f 66 20 74 68 65 |the shape of the| 000018a0 20 70 61 72 61 6c 6c 65 6c 6f 67 72 61 6d 0a 28 | parallelogram.(| 000018b0 74 68 65 79 20 6e 65 65 64 20 6e 6f 74 20 62 65 |they need not be| 000018c0 20 6f 72 74 68 6f 67 6f 6e 61 6c 29 2e 0a 20 0a | orthogonal).. .| 000018d0 20 50 61 72 61 6d 65 74 65 72 73 20 28 72 65 71 | Parameters (req| 000018e0 75 69 72 65 64 29 3a 0a 20 0a 20 6c 6f 63 20 3d |uired):. . loc =| 000018f0 20 28 78 2c 79 2c 7a 29 20 3a 20 6c 6f 63 61 74 | (x,y,z) : locat| 00001900 69 6f 6e 20 6f 66 20 6f 62 6a 65 63 74 0a 20 76 |ion of object. v| 00001910 31 20 20 3d 20 28 78 2c 79 2c 7a 29 20 3a 20 76 |1 = (x,y,z) : v| 00001920 65 63 74 6f 72 20 66 6f 72 20 73 69 64 65 20 6f |ector for side o| 00001930 6e 65 0a 20 76 32 20 20 3d 20 28 78 2c 79 2c 7a |ne. v2 = (x,y,z| 00001940 29 20 3a 20 76 65 63 74 6f 72 20 66 6f 72 20 73 |) : vector for s| 00001950 69 64 65 20 74 77 6f 0a 20 0a 20 50 61 72 61 6d |ide two. . Param| 00001960 65 74 65 72 73 20 28 6f 70 74 69 6f 6e 61 6c 29 |eters (optional)| 00001970 3a 0a 0a 20 6e 61 6d 65 20 20 20 20 20 3d 20 73 |:.. name = s| 00001980 74 72 69 6e 67 20 20 3a 20 6e 61 6d 65 20 66 6f |tring : name fo| 00001990 72 20 6f 62 6a 65 63 74 0a 20 70 61 74 74 65 72 |r object. patter| 000019a0 6e 20 20 3d 20 73 74 72 69 6e 67 20 20 3a 20 70 |n = string : p| 000019b0 61 74 74 65 72 6e 20 6e 61 6d 65 20 74 6f 20 61 |attern name to a| 000019c0 74 74 61 63 68 0a 20 72 65 6d 6f 76 65 20 20 20 |ttach. remove | 000019d0 3d 20 73 74 72 69 6e 67 20 20 3a 20 70 61 74 74 |= string : patt| 000019e0 65 72 6e 20 74 6f 20 63 75 74 20 6f 75 74 0a 20 |ern to cut out. | 000019f0 61 6d 62 20 20 20 20 20 20 3d 20 28 72 2c 67 2c |amb = (r,g,| 00001a00 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 6c 69 67 |b) : ambient lig| 00001a10 68 74 0a 20 64 69 66 66 20 20 20 20 20 3d 20 28 |ht. diff = (| 00001a20 72 2c 67 2c 62 29 20 3a 20 64 69 66 66 75 73 65 |r,g,b) : diffuse| 00001a30 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 74 72 61 | reflection. tra| 00001a40 6e 73 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 |ns = (r,g,b) | 00001a50 3a 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 0a 20 |: transmission. | 00001a60 64 65 6e 73 69 74 79 20 20 3d 20 28 72 2c 67 2c |density = (r,g,| 00001a70 62 29 20 3a 20 6c 69 67 68 74 20 61 74 74 65 6e |b) : light atten| 00001a80 75 61 74 69 6f 6e 0a 20 6d 69 72 72 6f 72 20 20 |uation. mirror | 00001a90 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6d 69 72 | = (r,g,b) : mir| 00001aa0 72 6f 72 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 |ror reflection. | 00001ab0 66 75 7a 7a 20 20 20 20 20 3d 20 69 20 20 20 20 |fuzz = i | 00001ac0 20 20 20 3a 20 63 75 72 72 65 6e 74 6c 79 20 75 | : currently u| 00001ad0 6e 75 73 65 64 0a 20 69 6e 64 65 78 20 20 20 20 |nused. index | 00001ae0 3d 20 70 20 20 20 20 20 20 20 3a 20 69 6e 64 65 |= p : inde| 00001af0 78 20 6f 66 20 72 65 66 72 61 63 74 69 6f 6e 0a |x of refraction.| 00001b00 20 64 69 74 68 65 72 20 20 20 3d 20 69 20 20 20 | dither = i | 00001b10 20 20 20 20 3a 20 64 69 74 68 65 72 69 6e 67 0a | : dithering.| 00001b20 20 73 72 65 66 6c 65 63 74 20 3d 20 70 20 20 20 | sreflect = p | 00001b30 20 20 20 20 3a 20 50 68 6f 6e 67 20 73 70 65 63 | : Phong spec| 00001b40 75 6c 61 72 20 72 65 66 6c 2e 20 63 6f 65 66 66 |ular refl. coeff| 00001b50 2e 0a 20 72 65 66 6c 65 63 74 20 20 3d 20 70 20 |.. reflect = p | 00001b60 20 20 20 20 20 20 3a 20 70 65 72 63 65 6e 74 20 | : percent | 00001b70 73 70 65 63 75 6c 61 72 20 72 65 66 6c 65 63 74 |specular reflect| 00001b80 69 6f 6e 0a 20 0a 20 4f 70 74 69 6f 6e 61 6c 20 |ion. . Optional | 00001b90 66 6f 72 6d 73 3a 0a 20 0a 20 27 6c 6f 63 27 20 |forms:. . 'loc' | 00001ba0 3d 20 27 70 6f 73 27 20 3d 20 27 6c 6f 63 61 74 |= 'pos' = 'locat| 00001bb0 69 6f 6e 27 20 3d 20 27 70 6f 73 69 74 69 6f 6e |ion' = 'position| 00001bc0 27 0a 20 27 76 65 63 74 31 27 20 3d 20 27 76 31 |'. 'vect1' = 'v1| 00001bd0 27 0a 20 27 76 65 63 74 32 27 20 3d 20 27 76 32 |'. 'vect2' = 'v2| 00001be0 27 0a 20 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 0a |'. . Example:. .| 00001bf0 20 50 41 52 41 4c 4c 45 4c 4f 47 52 41 4d 20 28 | PARALLELOGRAM (| 00001c00 20 6c 6f 63 20 3d 20 28 31 30 2c 20 32 30 2c 20 | loc = (10, 20, | 00001c10 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 |50),. | 00001c20 20 20 20 20 20 20 76 65 63 74 31 20 3d 20 28 32 | vect1 = (2| 00001c30 30 2c 20 30 2c 20 30 29 2c 0a 20 20 20 20 20 20 |0, 0, 0),. | 00001c40 20 20 20 20 20 20 20 20 20 20 20 76 65 63 74 32 | vect2| 00001c50 20 3d 20 28 20 30 2c 20 30 2c 20 35 30 29 2c 0a | = ( 0, 0, 50),.| 00001c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c70 20 64 69 66 66 20 3d 20 28 30 2c 20 2e 39 30 2c | diff = (0, .90,| 00001c80 20 2e 32 30 29 0a 20 20 20 20 20 20 20 20 20 20 | .20). | 00001c90 20 20 20 20 20 29 0a 20 0a 20 0a 54 52 49 41 4e | ). . .TRIAN| 00001ca0 47 4c 45 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 |GLE:. . Command | 00001cb0 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 |type: OPTIONAL. | 00001cc0 0a 20 54 68 65 20 54 52 49 41 4e 47 4c 45 20 63 |. The TRIANGLE c| 00001cd0 6f 6d 6d 61 6e 64 20 28 73 69 6d 69 6c 61 72 20 |ommand (similar | 00001ce0 74 6f 20 50 41 52 41 4c 4c 45 4c 4f 47 52 41 4d |to PARALLELOGRAM| 00001cf0 29 20 63 72 65 61 74 65 73 20 61 20 74 72 69 61 |) creates a tria| 00001d00 6e 67 6c 65 20 73 68 61 70 65 2e 0a 54 77 6f 20 |ngle shape..Two | 00001d10 76 65 63 74 6f 72 73 20 64 65 66 69 6e 65 20 74 |vectors define t| 00001d20 68 65 20 73 69 64 65 73 20 6f 66 20 74 68 65 20 |he sides of the | 00001d30 74 72 69 61 6e 67 6c 65 2e 0a 20 0a 20 50 61 72 |triangle.. . Par| 00001d40 61 6d 65 74 65 72 73 20 28 72 65 71 75 69 72 65 |ameters (require| 00001d50 64 29 3a 0a 20 0a 20 6c 6f 63 20 3d 20 28 78 2c |d):. . loc = (x,| 00001d60 79 2c 7a 29 20 3a 20 6c 6f 63 61 74 69 6f 6e 20 |y,z) : location | 00001d70 6f 66 20 6f 62 6a 65 63 74 0a 20 76 31 20 20 3d |of object. v1 =| 00001d80 20 28 78 2c 79 2c 7a 29 20 3a 20 76 65 63 74 6f | (x,y,z) : vecto| 00001d90 72 20 66 6f 72 20 73 69 64 65 20 6f 6e 65 0a 20 |r for side one. | 00001da0 76 32 20 20 3d 20 28 78 2c 79 2c 7a 29 20 3a 20 |v2 = (x,y,z) : | 00001db0 76 65 63 74 6f 72 20 66 6f 72 20 73 69 64 65 20 |vector for side | 00001dc0 74 77 6f 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 |two. . Parameter| 00001dd0 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a |s (optional):. .| 00001de0 20 6e 61 6d 65 20 20 20 20 20 3d 20 73 74 72 69 | name = stri| 00001df0 6e 67 20 20 3a 20 6e 61 6d 65 20 66 6f 72 20 6f |ng : name for o| 00001e00 62 6a 65 63 74 0a 20 70 61 74 74 65 72 6e 20 20 |bject. pattern | 00001e10 3d 20 73 74 72 69 6e 67 20 20 3a 20 70 61 74 74 |= string : patt| 00001e20 65 72 6e 20 6e 61 6d 65 20 74 6f 20 61 74 74 61 |ern name to atta| 00001e30 63 68 0a 20 72 65 6d 6f 76 65 20 20 20 3d 20 73 |ch. remove = s| 00001e40 74 72 69 6e 67 20 20 3a 20 70 61 74 74 65 72 6e |tring : pattern| 00001e50 20 74 6f 20 63 75 74 20 6f 75 74 0a 20 61 6d 62 | to cut out. amb| 00001e60 20 20 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 | = (r,g,b) | 00001e70 3a 20 61 6d 62 69 65 6e 74 20 6c 69 67 68 74 0a |: ambient light.| 00001e80 20 64 69 66 66 20 20 20 20 20 3d 20 28 72 2c 67 | diff = (r,g| 00001e90 2c 62 29 20 3a 20 64 69 66 66 75 73 65 20 72 65 |,b) : diffuse re| 00001ea0 66 6c 65 63 74 69 6f 6e 0a 20 74 72 61 6e 73 20 |flection. trans | 00001eb0 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 74 | = (r,g,b) : t| 00001ec0 72 61 6e 73 6d 69 73 73 69 6f 6e 0a 20 64 65 6e |ransmission. den| 00001ed0 73 69 74 79 20 20 3d 20 28 72 2c 67 2c 62 29 20 |sity = (r,g,b) | 00001ee0 3a 20 6c 69 67 68 74 20 61 74 74 65 6e 75 61 74 |: light attenuat| 00001ef0 69 6f 6e 0a 20 6d 69 72 72 6f 72 20 20 20 3d 20 |ion. mirror = | 00001f00 28 72 2c 67 2c 62 29 20 3a 20 6d 69 72 72 6f 72 |(r,g,b) : mirror| 00001f10 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 66 75 7a | reflection. fuz| 00001f20 7a 20 20 20 20 20 3d 20 69 20 20 20 20 20 20 20 |z = i | 00001f30 3a 20 63 75 72 72 65 6e 74 6c 79 20 75 6e 75 73 |: currently unus| 00001f40 65 64 0a 20 69 6e 64 65 78 20 20 20 20 3d 20 70 |ed. index = p| 00001f50 20 20 20 20 20 20 20 3a 20 69 6e 64 65 78 20 6f | : index o| 00001f60 66 20 72 65 66 72 61 63 74 69 6f 6e 0a 20 64 69 |f refraction. di| 00001f70 74 68 65 72 20 20 20 3d 20 69 20 20 20 20 20 20 |ther = i | 00001f80 20 3a 20 64 69 74 68 65 72 69 6e 67 0a 20 73 72 | : dithering. sr| 00001f90 65 66 6c 65 63 74 20 3d 20 70 20 20 20 20 20 20 |eflect = p | 00001fa0 20 3a 20 50 68 6f 6e 67 20 73 70 65 63 75 6c 61 | : Phong specula| 00001fb0 72 20 72 65 66 6c 2e 20 63 6f 65 66 66 2e 0a 20 |r refl. coeff.. | 00001fc0 72 65 66 6c 65 63 74 20 20 3d 20 70 20 20 20 20 |reflect = p | 00001fd0 20 20 20 3a 20 70 65 72 63 65 6e 74 20 73 70 65 | : percent spe| 00001fe0 63 75 6c 61 72 20 72 65 66 6c 65 63 74 69 6f 6e |cular reflection| 00001ff0 0a 20 0a 20 4f 70 74 69 6f 6e 61 6c 20 66 6f 72 |. . Optional for| 00002000 6d 73 3a 0a 20 0a 20 27 6c 6f 63 27 20 3d 20 27 |ms:. . 'loc' = '| 00002010 70 6f 73 27 20 3d 20 27 6c 6f 63 61 74 69 6f 6e |pos' = 'location| 00002020 27 20 3d 20 27 70 6f 73 69 74 69 6f 6e 27 0a 20 |' = 'position'. | 00002030 27 76 65 63 74 31 27 20 3d 20 27 76 31 27 0a 20 |'vect1' = 'v1'. | 00002040 27 76 65 63 74 32 27 20 3d 20 27 76 32 27 0a 20 |'vect2' = 'v2'. | 00002050 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 54 52 |. Example:. . TR| 00002060 49 41 4e 47 4c 45 20 28 20 6c 6f 63 20 3d 20 28 |IANGLE ( loc = (| 00002070 35 32 2c 20 32 31 2c 20 35 30 29 2c 0a 20 20 20 |52, 21, 50),. | 00002080 20 20 20 20 20 20 20 20 20 76 65 63 74 31 20 3d | vect1 =| 00002090 20 28 31 30 2c 20 35 2c 20 30 29 2c 0a 20 20 20 | (10, 5, 0),. | 000020a0 20 20 20 20 20 20 20 20 20 76 65 63 74 32 20 3d | vect2 =| 000020b0 20 28 20 30 2c 20 38 2c 20 32 30 29 2c 0a 20 20 | ( 0, 8, 20),. | 000020c0 20 20 20 20 20 20 20 20 20 20 64 69 66 66 20 3d | diff =| 000020d0 20 28 20 30 2c 20 30 2c 20 30 29 2c 0a 20 20 20 | ( 0, 0, 0),. | 000020e0 20 20 20 20 20 20 20 20 20 6d 69 72 72 6f 72 20 | mirror | 000020f0 3d 20 28 20 31 2c 20 31 2c 20 31 29 0a 20 20 20 |= ( 1, 1, 1). | 00002100 20 20 20 20 20 20 20 29 3b 0a 20 0a 0a 52 49 4e | );. ..RIN| 00002110 47 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 |G:. . Command ty| 00002120 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 |pe: OPTIONAL. . | 00002130 52 49 4e 47 20 63 72 65 61 74 65 73 20 61 20 72 |RING creates a r| 00002140 69 6e 67 20 28 61 6e 6e 75 6c 75 73 29 2c 20 77 |ing (annulus), w| 00002150 68 69 63 68 20 69 73 20 61 20 63 69 72 63 6c 65 |hich is a circle| 00002160 20 77 69 74 68 20 61 20 73 6d 61 6c 6c 65 72 20 | with a smaller | 00002170 63 69 72 63 6c 65 20 63 75 74 0a 6f 75 74 20 6f |circle cut.out o| 00002180 66 20 69 74 2e 20 49 66 20 74 68 65 20 69 6e 6e |f it. If the inn| 00002190 65 72 20 72 61 64 69 75 73 20 69 73 20 7a 65 72 |er radius is zer| 000021a0 6f 2c 20 74 68 65 20 72 69 6e 67 20 77 69 6c 6c |o, the ring will| 000021b0 20 62 65 20 61 20 73 69 6d 70 6c 65 20 63 69 72 | be a simple cir| 000021c0 63 6c 65 2e 0a 54 77 6f 20 76 65 63 74 6f 72 73 |cle..Two vectors| 000021d0 20 64 65 66 69 6e 65 20 74 68 65 20 70 6c 61 6e | define the plan| 000021e0 65 20 6f 66 20 74 68 65 20 61 6e 6e 75 6c 75 73 |e of the annulus| 000021f0 2c 20 61 73 20 77 69 74 68 20 52 49 4e 47 20 61 |, as with RING a| 00002200 6e 64 20 50 41 52 41 4c 4c 45 4c 4f 47 52 41 4d |nd PARALLELOGRAM| 00002210 2e 0a 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 |... Parameters (| 00002220 72 65 71 75 69 72 65 64 29 3a 0a 20 0a 20 6c 6f |required):. . lo| 00002230 63 20 20 20 3d 20 28 78 2c 79 2c 7a 29 20 3a 20 |c = (x,y,z) : | 00002240 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 6f 62 6a 65 |location of obje| 00002250 63 74 0a 20 76 31 20 20 20 20 3d 20 28 78 2c 79 |ct. v1 = (x,y| 00002260 2c 7a 29 20 3a 20 76 65 63 74 6f 72 20 6f 6e 65 |,z) : vector one| 00002270 0a 20 76 32 20 20 20 20 3d 20 28 78 2c 79 2c 7a |. v2 = (x,y,z| 00002280 29 20 3a 20 76 65 63 74 6f 72 20 74 77 6f 0a 20 |) : vector two. | 00002290 72 61 64 5f 31 20 3d 20 70 20 20 20 20 20 20 20 |rad_1 = p | 000022a0 3a 20 69 6e 6e 65 72 20 72 61 64 69 75 73 0a 20 |: inner radius. | 000022b0 72 61 64 5f 32 20 3d 20 70 20 20 20 20 20 20 20 |rad_2 = p | 000022c0 3a 20 6f 75 74 65 72 20 72 61 64 69 75 73 0a 20 |: outer radius. | 000022d0 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 6f 70 |. Parameters (op| 000022e0 74 69 6f 6e 61 6c 29 3a 0a 20 0a 20 6e 61 6d 65 |tional):. . name| 000022f0 20 20 20 20 20 3d 20 73 74 72 69 6e 67 20 20 3a | = string :| 00002300 20 6e 61 6d 65 20 66 6f 72 20 6f 62 6a 65 63 74 | name for object| 00002310 0a 20 70 61 74 74 65 72 6e 20 20 3d 20 73 74 72 |. pattern = str| 00002320 69 6e 67 20 20 3a 20 70 61 74 74 65 72 6e 20 6e |ing : pattern n| 00002330 61 6d 65 20 74 6f 20 61 74 74 61 63 68 0a 20 72 |ame to attach. r| 00002340 65 6d 6f 76 65 20 20 20 3d 20 73 74 72 69 6e 67 |emove = string| 00002350 20 20 3a 20 70 61 74 74 65 72 6e 20 74 6f 20 63 | : pattern to c| 00002360 75 74 20 6f 75 74 0a 20 61 6d 62 20 20 20 20 20 |ut out. amb | 00002370 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 61 6d 62 | = (r,g,b) : amb| 00002380 69 65 6e 74 20 6c 69 67 68 74 0a 20 64 69 66 66 |ient light. diff| 00002390 20 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a | = (r,g,b) :| 000023a0 20 64 69 66 66 75 73 65 20 72 65 66 6c 65 63 74 | diffuse reflect| 000023b0 69 6f 6e 0a 20 74 72 61 6e 73 20 20 20 20 3d 20 |ion. trans = | 000023c0 28 72 2c 67 2c 62 29 20 3a 20 74 72 61 6e 73 6d |(r,g,b) : transm| 000023d0 69 73 73 69 6f 6e 0a 20 64 65 6e 73 69 74 79 20 |ission. density | 000023e0 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6c 69 67 | = (r,g,b) : lig| 000023f0 68 74 20 61 74 74 65 6e 75 61 74 69 6f 6e 0a 20 |ht attenuation. | 00002400 6d 69 72 72 6f 72 20 20 20 3d 20 28 72 2c 67 2c |mirror = (r,g,| 00002410 62 29 20 3a 20 6d 69 72 72 6f 72 20 72 65 66 6c |b) : mirror refl| 00002420 65 63 74 69 6f 6e 0a 20 66 75 7a 7a 20 20 20 20 |ection. fuzz | 00002430 20 3d 20 69 20 20 20 20 20 20 20 3a 20 63 75 72 | = i : cur| 00002440 72 65 6e 74 6c 79 20 75 6e 75 73 65 64 0a 20 69 |rently unused. i| 00002450 6e 64 65 78 20 20 20 20 3d 20 70 20 20 20 20 20 |ndex = p | 00002460 20 20 3a 20 69 6e 64 65 78 20 6f 66 20 72 65 66 | : index of ref| 00002470 72 61 63 74 69 6f 6e 0a 20 64 69 74 68 65 72 20 |raction. dither | 00002480 20 20 3d 20 69 20 20 20 20 20 20 20 3a 20 64 69 | = i : di| 00002490 74 68 65 72 69 6e 67 0a 20 73 72 65 66 6c 65 63 |thering. sreflec| 000024a0 74 20 3d 20 70 20 20 20 20 20 20 20 3a 20 50 68 |t = p : Ph| 000024b0 6f 6e 67 20 73 70 65 63 75 6c 61 72 20 72 65 66 |ong specular ref| 000024c0 6c 2e 20 63 6f 65 66 66 2e 0a 20 72 65 66 6c 65 |l. coeff.. refle| 000024d0 63 74 20 20 3d 20 70 20 20 20 20 20 20 20 3a 20 |ct = p : | 000024e0 70 65 72 63 65 6e 74 20 73 70 65 63 75 6c 61 72 |percent specular| 000024f0 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 0a 20 4f | reflection. . O| 00002500 70 74 69 6f 6e 61 6c 20 66 6f 72 6d 73 3a 0a 20 |ptional forms:. | 00002510 0a 20 27 6c 6f 63 27 20 3d 20 27 70 6f 73 27 20 |. 'loc' = 'pos' | 00002520 3d 20 27 6c 6f 63 61 74 69 6f 6e 27 20 3d 20 27 |= 'location' = '| 00002530 70 6f 73 69 74 69 6f 6e 27 0a 20 27 76 65 63 74 |position'. 'vect| 00002540 31 27 20 3d 20 27 76 31 27 0a 20 27 76 65 63 74 |1' = 'v1'. 'vect| 00002550 32 27 20 3d 20 27 76 32 27 0a 20 0a 20 45 78 61 |2' = 'v2'. . Exa| 00002560 6d 70 6c 65 3a 0a 20 0a 20 52 49 4e 47 20 28 20 |mple:. . RING ( | 00002570 6c 6f 63 20 3d 20 28 35 32 2c 20 32 31 2c 20 35 |loc = (52, 21, 5| 00002580 30 29 2c 0a 20 20 20 20 20 20 20 20 76 31 20 3d |0),. v1 =| 00002590 20 28 31 30 2c 20 35 2c 20 30 29 2c 0a 20 20 20 | (10, 5, 0),. | 000025a0 20 20 20 20 20 76 32 20 3d 20 28 20 30 2c 20 38 | v2 = ( 0, 8| 000025b0 2c 20 32 30 29 2c 0a 20 20 20 20 20 20 20 20 72 |, 20),. r| 000025c0 61 64 5f 31 20 3d 20 31 30 2c 0a 20 20 20 20 20 |ad_1 = 10,. | 000025d0 20 20 20 72 61 64 5f 32 20 3d 20 32 30 2c 0a 20 | rad_2 = 20,. | 000025e0 20 20 20 20 20 29 0a 20 0a 20 52 65 73 74 72 69 | ). . Restri| 000025f0 63 74 69 6f 6e 73 3a 0a 20 0a 20 30 20 3c 20 72 |ctions:. . 0 < r| 00002600 61 64 5f 31 20 3c 20 72 61 64 5f 32 0a 0a 0a 51 |ad_1 < rad_2...Q| 00002610 55 41 44 52 41 54 49 43 3a 0a 20 0a 20 43 6f 6d |UADRATIC:. . Com| 00002620 6d 61 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 4f |mand type: OPTIO| 00002630 4e 41 4c 0a 20 0a 20 54 68 69 73 20 63 6f 6d 6d |NAL. . This comm| 00002640 61 6e 64 20 63 72 65 61 74 65 73 20 61 20 71 75 |and creates a qu| 00002650 61 64 72 61 74 69 63 20 73 75 72 66 61 63 65 20 |adratic surface | 00002660 67 69 76 65 6e 20 62 79 20 74 68 65 20 65 71 75 |given by the equ| 00002670 61 74 69 6f 6e 3a 0a 20 0a 20 20 20 20 32 20 20 |ation:. . 2 | 00002680 20 20 20 32 20 20 20 20 20 32 0a 20 61 20 78 20 | 2 2. a x | 00002690 2b 20 62 20 79 20 2b 20 63 20 7a 20 3d 20 64 0a |+ b y + c z = d.| 000026a0 20 0a 20 54 68 65 20 63 6f 65 66 66 69 63 69 65 | . The coefficie| 000026b0 6e 74 73 20 61 2c 62 2c 63 20 61 6e 64 20 64 20 |nts a,b,c and d | 000026c0 63 61 6e 20 62 65 20 73 70 65 63 69 66 69 65 64 |can be specified| 000026d0 2e 20 54 68 69 73 20 70 72 69 6d 69 74 69 76 65 |. This primitive| 000026e0 20 63 61 6e 20 62 65 20 75 73 65 64 0a 74 6f 20 | can be used.to | 000026f0 63 72 65 61 74 65 20 63 79 6c 69 6e 64 65 72 73 |create cylinders| 00002700 2c 20 63 6f 6e 65 73 2c 20 6f 62 6c 6f 6e 67 20 |, cones, oblong | 00002710 73 70 68 65 72 6f 69 64 73 2c 20 65 74 63 2e 20 |spheroids, etc. | 00002720 53 65 76 65 72 61 6c 20 6d 69 6e 20 61 6e 64 20 |Several min and | 00002730 6d 61 78 0a 70 61 72 61 6d 65 74 65 72 73 20 73 |max.parameters s| 00002740 70 65 63 69 66 79 20 74 68 65 20 6d 61 78 69 6d |pecify the maxim| 00002750 75 6d 20 65 78 74 65 6e 74 73 20 6f 66 20 74 68 |um extents of th| 00002760 65 20 73 75 72 66 61 63 65 2e 0a 20 0a 20 50 61 |e surface.. . Pa| 00002770 72 61 6d 65 74 65 72 73 20 28 72 65 71 75 69 72 |rameters (requir| 00002780 65 64 29 3a 0a 20 0a 20 6c 6f 63 20 20 3d 20 28 |ed):. . loc = (| 00002790 78 2c 79 2c 7a 29 20 3a 20 6c 6f 63 61 74 69 6f |x,y,z) : locatio| 000027a0 6e 20 6f 66 20 6f 62 6a 65 63 74 0a 20 61 20 20 |n of object. a | 000027b0 20 20 3d 20 6e 0a 20 62 20 20 20 20 3d 20 6e 0a | = n. b = n.| 000027c0 20 63 20 20 20 20 3d 20 6e 0a 20 64 20 20 20 20 | c = n. d | 000027d0 3d 20 6e 0a 20 78 6d 61 78 20 3d 20 6e 0a 20 78 |= n. xmax = n. x| 000027e0 6d 69 6e 20 3d 20 6e 0a 20 79 6d 61 78 20 3d 20 |min = n. ymax = | 000027f0 6e 0a 20 79 6d 69 6e 20 3d 20 6e 0a 20 7a 6d 61 |n. ymin = n. zma| 00002800 78 20 3d 20 6e 0a 20 7a 6d 69 6e 20 3d 20 6e 0a |x = n. zmin = n.| 00002810 20 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 6f | . Parameters (o| 00002820 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a 20 6e 61 6d |ptional):. . nam| 00002830 65 20 20 20 20 20 3d 20 73 74 72 69 6e 67 20 20 |e = string | 00002840 3a 20 6e 61 6d 65 20 66 6f 72 20 6f 62 6a 65 63 |: name for objec| 00002850 74 0a 20 70 61 74 74 65 72 6e 20 20 3d 20 73 74 |t. pattern = st| 00002860 72 69 6e 67 20 20 3a 20 70 61 74 74 65 72 6e 20 |ring : pattern | 00002870 6e 61 6d 65 20 74 6f 20 61 74 74 61 63 68 0a 20 |name to attach. | 00002880 72 65 6d 6f 76 65 20 20 20 3d 20 73 74 72 69 6e |remove = strin| 00002890 67 20 20 3a 20 70 61 74 74 65 72 6e 20 74 6f 20 |g : pattern to | 000028a0 63 75 74 20 6f 75 74 0a 20 61 6d 62 20 20 20 20 |cut out. amb | 000028b0 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 61 6d | = (r,g,b) : am| 000028c0 62 69 65 6e 74 20 6c 69 67 68 74 0a 20 64 69 66 |bient light. dif| 000028d0 66 20 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 |f = (r,g,b) | 000028e0 3a 20 64 69 66 66 75 73 65 20 72 65 66 6c 65 63 |: diffuse reflec| 000028f0 74 69 6f 6e 0a 20 74 72 61 6e 73 20 20 20 20 3d |tion. trans =| 00002900 20 28 72 2c 67 2c 62 29 20 3a 20 74 72 61 6e 73 | (r,g,b) : trans| 00002910 6d 69 73 73 69 6f 6e 0a 20 64 65 6e 73 69 74 79 |mission. density| 00002920 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6c 69 | = (r,g,b) : li| 00002930 67 68 74 20 61 74 74 65 6e 75 61 74 69 6f 6e 0a |ght attenuation.| 00002940 20 6d 69 72 72 6f 72 20 20 20 3d 20 28 72 2c 67 | mirror = (r,g| 00002950 2c 62 29 20 3a 20 6d 69 72 72 6f 72 20 72 65 66 |,b) : mirror ref| 00002960 6c 65 63 74 69 6f 6e 0a 20 66 75 7a 7a 20 20 20 |lection. fuzz | 00002970 20 20 3d 20 69 20 20 20 20 20 20 20 3a 20 63 75 | = i : cu| 00002980 72 72 65 6e 74 6c 79 20 75 6e 75 73 65 64 0a 20 |rrently unused. | 00002990 69 6e 64 65 78 20 20 20 20 3d 20 70 20 20 20 20 |index = p | 000029a0 20 20 20 3a 20 69 6e 64 65 78 20 6f 66 20 72 65 | : index of re| 000029b0 66 72 61 63 74 69 6f 6e 0a 20 64 69 74 68 65 72 |fraction. dither| 000029c0 20 20 20 3d 20 69 20 20 20 20 20 20 20 3a 20 64 | = i : d| 000029d0 69 74 68 65 72 69 6e 67 0a 20 73 72 65 66 6c 65 |ithering. srefle| 000029e0 63 74 20 3d 20 70 20 20 20 20 20 20 20 3a 20 50 |ct = p : P| 000029f0 68 6f 6e 67 20 73 70 65 63 75 6c 61 72 20 72 65 |hong specular re| 00002a00 66 6c 2e 20 63 6f 65 66 66 2e 0a 20 72 65 66 6c |fl. coeff.. refl| 00002a10 65 63 74 20 20 3d 20 70 20 20 20 20 20 20 20 3a |ect = p :| 00002a20 20 70 65 72 63 65 6e 74 20 73 70 65 63 75 6c 61 | percent specula| 00002a30 72 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 0a 20 |r reflection. . | 00002a40 4f 70 74 69 6f 6e 61 6c 20 66 6f 72 6d 73 3a 0a |Optional forms:.| 00002a50 20 0a 20 27 6c 6f 63 27 20 3d 20 27 70 6f 73 27 | . 'loc' = 'pos'| 00002a60 20 3d 20 27 6c 6f 63 61 74 69 6f 6e 27 20 3d 20 | = 'location' = | 00002a70 27 70 6f 73 69 74 69 6f 6e 27 0a 0a 20 45 78 61 |'position'.. Exa| 00002a80 6d 70 6c 65 3a 0a 20 0a 20 7b 20 2a 2a 20 76 65 |mple:. . { ** ve| 00002a90 72 74 69 63 61 6c 20 63 79 6c 69 6e 64 65 72 20 |rtical cylinder | 00002aa0 2a 2a 20 7d 0a 20 0a 20 51 55 41 44 52 41 54 49 |** }. . QUADRATI| 00002ab0 43 20 28 20 6c 6f 63 20 3d 20 28 35 37 2c 20 32 |C ( loc = (57, 2| 00002ac0 31 2e 32 2c 20 30 29 2c 0a 20 20 20 20 20 20 20 |1.2, 0),. | 00002ad0 20 20 20 20 20 20 61 20 3d 20 31 2c 0a 20 20 20 | a = 1,. | 00002ae0 20 20 20 20 20 20 20 20 20 20 62 20 3d 20 30 2c | b = 0,| 00002af0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 63 20 |. c | 00002b00 3d 20 31 2c 0a 20 20 20 20 20 20 20 20 20 20 20 |= 1,. | 00002b10 20 20 64 20 3d 20 31 30 30 0a 20 20 20 20 20 20 | d = 100. | 00002b20 20 20 20 20 20 29 3b 0a 20 0a 20 52 65 73 74 72 | );. . Restr| 00002b30 69 63 74 69 6f 6e 73 3a 0a 20 0a 20 61 20 21 3d |ictions:. . a !=| 00002b40 20 30 20 6f 72 20 62 20 21 3d 20 30 20 6f 72 20 | 0 or b != 0 or | 00002b50 63 20 21 3d 20 30 0a 20 0a 0a 50 61 74 74 65 72 |c != 0. ..Patter| 00002b60 6e 65 64 20 53 75 72 66 61 63 65 73 0a 20 0a 20 |ned Surfaces. . | 00002b70 0a 50 41 54 54 45 52 4e 3a 0a 20 0a 20 43 6f 6d |.PATTERN:. . Com| 00002b80 6d 61 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 4f |mand type: OPTIO| 00002b90 4e 41 4c 0a 20 0a 20 54 68 69 73 20 63 6f 6d 6d |NAL. . This comm| 00002ba0 61 6e 64 20 63 72 65 61 74 65 73 20 61 20 70 61 |and creates a pa| 00002bb0 74 74 65 72 6e 20 64 65 66 69 6e 69 74 69 6f 6e |ttern definition| 00002bc0 20 77 68 69 63 68 20 63 61 6e 20 62 65 20 61 74 | which can be at| 00002bd0 74 61 63 68 65 64 20 74 6f 20 61 6e 79 0a 70 72 |tached to any.pr| 00002be0 69 6d 69 74 69 76 65 20 6f 62 6a 65 63 74 2e 20 |imitive object. | 00002bf0 41 20 70 61 74 74 65 72 6e 20 69 73 20 61 20 74 |A pattern is a t| 00002c00 77 6f 20 64 69 6d 65 6e 73 69 6f 6e 61 6c 20 61 |wo dimensional a| 00002c10 72 72 61 79 20 74 68 61 6e 20 63 61 6e 20 62 65 |rray than can be| 00002c20 20 6d 61 70 70 65 64 20 74 6f 0a 74 68 65 20 73 | mapped to.the s| 00002c30 75 72 66 61 63 65 20 6f 66 20 61 6e 79 20 70 72 |urface of any pr| 00002c40 69 6d 69 74 69 76 65 2e 20 50 61 74 74 65 72 6e |imitive. Pattern| 00002c50 73 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 |s must be define| 00002c60 64 20 62 65 66 6f 72 65 20 74 68 65 79 20 61 72 |d before they ar| 00002c70 65 20 75 73 65 64 2e 0a 54 68 65 20 50 41 54 54 |e used..The PATT| 00002c80 45 52 4e 20 6b 65 79 77 6f 72 64 20 73 65 72 76 |ERN keyword serv| 00002c90 65 73 20 74 77 6f 20 66 75 6e 63 74 69 6f 6e 73 |es two functions| 00002ca0 3a 20 74 6f 20 63 72 65 61 74 65 20 61 20 70 61 |: to create a pa| 00002cb0 74 74 65 72 6e 20 64 65 66 69 6e 69 74 69 6f 6e |ttern definition| 00002cc0 2c 0a 61 6e 64 20 74 6f 20 61 74 74 61 63 68 20 |,.and to attach | 00002cd0 74 68 69 73 20 64 65 66 69 6e 69 74 69 6f 6e 20 |this definition | 00002ce0 74 6f 20 61 20 70 72 69 6d 69 74 69 76 65 2e 20 |to a primitive. | 00002cf0 54 68 65 20 63 6f 72 72 65 63 74 20 6d 65 61 6e |The correct mean| 00002d00 69 6e 67 20 69 73 20 66 6f 75 6e 64 0a 62 79 20 |ing is found.by | 00002d10 63 6f 6e 74 65 78 74 3a 20 69 66 20 74 68 65 20 |context: if the | 00002d20 50 41 54 54 45 52 4e 20 6b 65 79 77 6f 72 64 20 |PATTERN keyword | 00002d30 61 70 70 65 61 72 73 20 69 6e 20 61 20 70 72 69 |appears in a pri| 00002d40 6d 69 74 69 76 65 20 64 65 66 69 6e 69 74 69 6f |mitive definitio| 00002d50 6e 0a 66 6f 6c 6c 6f 77 65 64 20 62 79 20 61 20 |n.followed by a | 00002d60 6e 61 6d 65 2c 20 69 74 20 69 73 20 61 73 73 75 |name, it is assu| 00002d70 6d 65 64 20 74 6f 20 72 65 66 65 72 20 74 6f 20 |med to refer to | 00002d80 61 20 70 72 65 64 65 66 69 6e 65 64 20 70 61 74 |a predefined pat| 00002d90 74 65 72 6e 2e 20 48 6f 77 65 76 65 72 2c 0a 69 |tern. However,.i| 00002da0 66 20 50 41 54 54 45 52 4e 20 6f 63 63 75 72 73 |f PATTERN occurs| 00002db0 20 6f 75 74 73 69 64 65 20 61 6e 79 20 70 72 69 | outside any pri| 00002dc0 6d 69 74 69 76 65 20 64 65 66 69 6e 69 74 69 6f |mitive definitio| 00002dd0 6e 2c 20 69 74 20 69 73 20 61 73 73 75 6d 65 64 |n, it is assumed| 00002de0 20 74 6f 20 62 65 20 61 0a 70 61 74 74 65 72 6e | to be a.pattern| 00002df0 20 64 65 66 69 6e 69 74 69 6f 6e 2e 20 49 66 20 | definition. If | 00002e00 61 6c 6c 20 74 68 65 20 70 61 74 74 65 72 6e 20 |all the pattern | 00002e10 64 65 66 69 6e 69 74 69 6f 6e 73 20 61 72 65 20 |definitions are | 00002e20 67 72 6f 75 70 65 64 20 61 74 20 74 68 65 20 74 |grouped at the t| 00002e30 6f 70 20 6f 66 0a 74 68 65 20 66 69 6c 65 2c 20 |op of.the file, | 00002e40 74 68 65 79 20 77 69 6c 6c 20 61 6c 77 61 79 73 |they will always| 00002e50 20 62 65 20 64 65 66 69 6e 65 64 20 62 65 66 6f | be defined befo| 00002e60 72 65 20 74 68 65 79 20 61 72 65 20 75 73 65 64 |re they are used| 00002e70 2e 0a 20 0a 20 41 20 70 61 74 74 65 72 6e 20 69 |.. . A pattern i| 00002e80 73 20 64 65 66 69 6e 65 64 20 62 79 20 67 69 76 |s defined by giv| 00002e90 69 6e 67 20 69 74 20 61 20 73 69 7a 65 2c 20 61 |ing it a size, a| 00002ea0 20 6e 61 6d 65 2c 20 61 6e 64 20 6f 6e 65 20 6f | name, and one o| 00002eb0 72 20 6d 6f 72 65 0a 73 75 62 2d 70 61 74 74 65 |r more.sub-patte| 00002ec0 72 6e 20 64 65 66 69 6e 69 74 69 6f 6e 73 2e 20 |rn definitions. | 00002ed0 54 68 65 72 65 20 61 72 65 20 63 75 72 72 65 6e |There are curren| 00002ee0 74 6c 79 20 74 68 72 65 65 20 74 79 70 65 73 20 |tly three types | 00002ef0 6f 66 20 73 75 62 2d 70 61 74 74 65 72 6e 73 3a |of sub-patterns:| 00002f00 0a 43 49 52 43 4c 45 2c 20 52 45 43 54 41 4e 47 |.CIRCLE, RECTANG| 00002f10 4c 45 2c 20 61 6e 64 20 50 4f 4c 59 47 4f 4e 2e |LE, and POLYGON.| 00002f20 20 54 68 65 20 73 75 62 2d 70 61 74 74 65 72 6e | The sub-pattern| 00002f30 20 6c 69 73 74 20 63 61 6e 20 62 65 20 6f 66 20 | list can be of | 00002f40 61 6e 79 20 6c 65 6e 67 74 68 0a 28 61 6c 74 68 |any length.(alth| 00002f50 6f 75 67 68 20 6c 6f 6e 67 20 6c 69 73 74 73 20 |ough long lists | 00002f60 77 69 6c 6c 20 73 6c 6f 77 20 74 68 65 20 72 61 |will slow the ra| 00002f70 79 20 74 72 61 63 65 72 29 2c 20 61 6e 64 20 63 |y tracer), and c| 00002f80 61 6e 20 75 73 65 20 73 65 76 65 72 61 6c 20 6f |an use several o| 00002f90 66 20 65 61 63 68 0a 74 79 70 65 20 6f 66 20 73 |f each.type of s| 00002fa0 75 62 2d 70 61 74 74 65 72 6e 20 70 72 69 6d 69 |ub-pattern primi| 00002fb0 74 69 76 65 2e 0a 20 0a 20 54 68 65 20 58 20 61 |tive.. . The X a| 00002fc0 6e 64 20 59 20 73 69 7a 65 20 70 61 72 61 6d 65 |nd Y size parame| 00002fd0 74 65 72 73 20 73 70 65 63 69 66 79 20 74 68 65 |ters specify the| 00002fe0 20 73 69 7a 65 20 6f 66 20 74 68 65 20 70 61 74 | size of the pat| 00002ff0 74 65 72 6e 3b 20 74 68 65 20 70 61 74 74 65 72 |tern; the patter| 00003000 6e 0a 77 69 6c 6c 20 62 65 20 72 65 70 65 61 74 |n.will be repeat| 00003010 65 64 20 6f 76 65 72 20 74 68 65 20 73 75 72 66 |ed over the surf| 00003020 61 63 65 20 6f 66 20 61 6e 20 6f 62 6a 65 63 74 |ace of an object| 00003030 20 65 61 63 68 20 58 20 6f 72 20 59 20 75 6e 69 | each X or Y uni| 00003040 74 73 20 69 6e 20 74 68 65 0a 69 6e 64 69 63 61 |ts in the.indica| 00003050 74 65 64 20 64 69 72 65 63 74 69 6f 6e 2e 20 54 |ted direction. T| 00003060 68 65 73 65 20 73 69 7a 65 20 75 6e 69 74 73 20 |hese size units | 00003070 61 72 65 20 61 72 62 69 74 72 61 72 79 2c 20 73 |are arbitrary, s| 00003080 69 6e 63 65 20 74 68 65 20 70 61 74 74 65 72 6e |ince the pattern| 00003090 20 63 61 6e 0a 62 65 20 67 69 76 65 6e 20 61 20 | can.be given a | 000030a0 6e 65 77 20 73 69 7a 65 20 77 68 65 6e 20 61 74 |new size when at| 000030b0 74 61 63 68 65 64 20 74 6f 20 61 6e 20 6f 62 6a |tached to an obj| 000030c0 65 63 74 2e 0a 20 0a 20 49 6e 20 65 61 63 68 20 |ect.. . In each | 000030d0 73 75 62 2d 70 61 74 74 65 72 6e 2c 20 61 6e 79 |sub-pattern, any| 000030e0 20 6f 62 6a 65 63 74 20 73 75 72 66 61 63 65 20 | object surface | 000030f0 63 68 61 72 61 63 74 65 72 69 73 74 69 63 73 20 |characteristics | 00003100 63 61 6e 20 62 65 20 73 70 65 63 69 66 69 65 64 |can be specified| 00003110 2e 0a 49 66 20 61 20 67 69 76 65 6e 20 72 61 79 |..If a given ray| 00003120 20 68 69 74 73 20 74 68 69 73 20 73 75 62 2d 70 | hits this sub-p| 00003130 61 74 74 65 72 6e 2c 20 74 68 65 20 73 75 72 66 |attern, the surf| 00003140 61 63 65 20 77 69 6c 6c 20 62 65 20 63 6f 6c 6f |ace will be colo| 00003150 72 65 64 20 61 73 0a 69 6e 64 69 63 61 74 65 64 |red as.indicated| 00003160 2e 20 49 66 20 69 74 20 64 6f 65 73 20 6e 6f 74 |. If it does not| 00003170 20 68 69 74 20 61 6e 79 20 73 75 62 20 70 61 74 | hit any sub pat| 00003180 74 65 72 6e 20 69 6e 20 74 68 65 20 6c 69 73 74 |tern in the list| 00003190 2c 20 74 68 65 20 6f 62 6a 65 63 74 73 0a 64 65 |, the objects.de| 000031a0 66 61 75 6c 74 20 73 75 72 66 61 63 65 20 63 68 |fault surface ch| 000031b0 61 72 61 63 74 65 72 69 73 74 69 63 73 20 77 69 |aracteristics wi| 000031c0 6c 6c 20 62 65 20 75 73 65 64 2e 20 54 68 65 20 |ll be used. The | 000031d0 65 78 61 6d 70 6c 65 20 62 65 6c 6f 77 20 64 65 |example below de| 000031e0 66 69 6e 65 73 20 61 0a 72 65 64 2d 63 68 65 63 |fines a.red-chec| 000031f0 6b 65 72 65 64 20 70 61 74 74 65 72 6e 2e 20 54 |kered pattern. T| 00003200 68 65 20 62 61 63 6b 67 72 6f 75 6e 64 20 63 6f |he background co| 00003210 6c 6f 72 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 |lor of the objec| 00003220 74 20 74 6f 20 77 68 69 63 68 20 74 68 69 73 0a |t to which this.| 00003230 70 61 74 74 65 72 6e 20 69 73 20 61 74 74 61 63 |pattern is attac| 00003240 68 65 64 20 77 69 6c 6c 20 64 65 74 65 72 6d 69 |hed will determi| 00003250 6e 65 20 74 68 65 20 63 6f 6c 6f 72 20 6f 66 20 |ne the color of | 00003260 74 68 65 20 6f 74 68 65 72 20 63 68 65 63 6b 65 |the other checke| 00003270 72 20 62 6f 78 20 69 6e 20 74 68 65 0a 70 61 74 |r box in the.pat| 00003280 74 65 72 6e 2e 0a 20 0a 20 50 61 72 61 6d 65 74 |tern.. . Paramet| 00003290 65 72 73 20 28 72 65 71 75 69 72 65 64 29 3a 0a |ers (required):.| 000032a0 20 0a 20 6e 61 6d 65 20 20 20 3d 20 73 74 72 69 | . name = stri| 000032b0 6e 67 20 3a 20 6e 61 6d 65 20 66 6f 72 20 70 61 |ng : name for pa| 000032c0 74 74 65 72 6e 0a 20 78 5f 73 69 7a 65 20 3d 20 |ttern. x_size = | 000032d0 70 20 20 20 20 20 20 3a 20 78 20 73 69 7a 65 20 |p : x size | 000032e0 6f 66 20 70 61 74 74 65 72 6e 0a 20 79 5f 73 69 |of pattern. y_si| 000032f0 7a 65 20 3d 20 70 20 20 20 20 20 20 3a 20 79 20 |ze = p : y | 00003300 73 69 7a 65 20 6f 66 20 70 61 74 74 65 72 6e 0a |size of pattern.| 00003310 0a 20 50 61 72 61 6d 65 74 65 72 73 20 28 6f 70 |. Parameters (op| 00003320 74 69 6f 6e 61 6c 29 3a 0a 20 0a 20 43 49 52 43 |tional):. . CIRC| 00003330 4c 45 20 20 3d 20 63 69 72 63 6c 65 5f 64 65 66 |LE = circle_def| 00003340 6e 20 3a 20 43 49 52 43 4c 45 20 73 75 62 2d 70 |n : CIRCLE sub-p| 00003350 61 74 74 65 72 6e 20 2d 20 73 65 65 20 72 65 66 |attern - see ref| 00003360 65 72 65 6e 63 65 20 66 6f 72 20 43 49 52 43 4c |erence for CIRCL| 00003370 45 0a 20 0a 20 52 45 43 54 41 4e 47 4c 45 20 3d |E. . RECTANGLE =| 00003380 20 72 65 63 74 5f 64 65 66 6e 20 3a 20 52 45 43 | rect_defn : REC| 00003390 54 41 4e 47 4c 45 20 73 75 62 2d 70 61 74 74 65 |TANGLE sub-patte| 000033a0 72 6e 20 2d 20 73 65 65 20 72 65 66 65 72 65 6e |rn - see referen| 000033b0 63 65 20 66 6f 72 20 52 45 43 54 41 4e 47 4c 45 |ce for RECTANGLE| 000033c0 0a 20 0a 20 50 4f 4c 59 47 4f 4e 20 20 20 3d 20 |. . POLYGON = | 000033d0 70 6f 6c 79 5f 64 65 66 6e 20 3a 20 50 4f 4c 59 |poly_defn : POLY| 000033e0 47 4f 4e 20 73 75 62 2d 70 61 74 74 65 72 6e 20 |GON sub-pattern | 000033f0 2d 20 73 65 65 20 72 65 66 65 72 65 6e 63 65 20 |- see reference | 00003400 66 6f 72 20 50 4f 4c 59 47 4f 4e 2e 0a 20 0a 20 |for POLYGON.. . | 00003410 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 50 41 54 54 |Example:. . PATT| 00003420 45 52 4e 20 28 20 78 5f 73 69 7a 65 20 3d 20 31 |ERN ( x_size = 1| 00003430 36 2c 0a 20 20 20 20 20 20 20 20 20 20 20 79 5f |6,. y_| 00003440 73 69 7a 65 20 3d 20 31 36 2c 0a 20 20 20 20 20 |size = 16,. | 00003450 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 43 48 45 | name = CHE| 00003460 43 4b 2c 0a 20 0a 20 20 20 20 20 20 20 20 20 20 |CK,. . | 00003470 20 52 45 43 54 41 4e 47 4c 45 20 28 0a 20 20 20 | RECTANGLE (. | 00003480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003490 20 20 20 20 73 74 61 72 74 5f 78 20 3d 20 30 2c | start_x = 0,| 000034a0 20 73 74 61 72 74 5f 79 20 3d 20 30 2c 0a 20 20 | start_y = 0,. | 000034b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000034c0 20 20 20 20 20 65 6e 64 5f 78 20 3d 20 38 2c 20 | end_x = 8, | 000034d0 65 6e 64 5f 79 20 3d 20 38 2c 0a 20 20 20 20 20 |end_y = 8,. | 000034e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000034f0 20 20 64 69 66 66 20 3d 20 28 31 2e 30 30 2c 20 | diff = (1.00, | 00003500 2e 32 30 2c 20 2e 32 30 29 3b 0a 20 20 20 20 20 |.20, .20);. | 00003510 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003520 29 0a 20 0a 20 20 20 20 20 20 20 20 20 20 20 52 |). . R| 00003530 45 43 54 41 4e 47 4c 45 20 28 0a 20 20 20 20 20 |ECTANGLE (. | 00003540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003550 20 20 73 74 61 72 74 5f 78 20 3d 20 38 2c 20 73 | start_x = 8, s| 00003560 74 61 72 74 5f 79 20 3d 20 38 2c 0a 20 20 20 20 |tart_y = 8,. | 00003570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003580 20 20 20 65 6e 64 5f 78 20 3d 20 31 36 2c 20 65 | end_x = 16, e| 00003590 6e 64 5f 79 20 3d 20 31 36 2c 0a 20 20 20 20 20 |nd_y = 16,. | 000035a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000035b0 20 20 64 69 66 66 20 3d 20 28 31 2e 30 30 2c 20 | diff = (1.00, | 000035c0 2e 32 30 2c 20 2e 32 30 29 3b 0a 20 20 20 20 20 |.20, .20);. | 000035d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000035e0 29 0a 20 20 20 20 20 20 20 20 20 29 0a 20 0a 20 |). ). . | 000035f0 54 68 69 73 20 70 61 74 74 65 72 6e 20 63 61 6e |This pattern can| 00003600 20 6e 6f 77 20 62 65 20 61 74 74 61 63 68 65 64 | now be attached| 00003610 20 74 6f 20 61 6e 20 6f 62 6a 65 63 74 20 61 73 | to an object as| 00003620 20 66 6f 6c 6c 6f 77 73 3a 0a 20 0a 20 53 50 48 | follows:. . SPH| 00003630 45 52 45 20 28 20 7b 20 2a 2a 20 73 70 68 65 72 |ERE ( { ** spher| 00003640 65 20 64 65 66 69 6e 69 74 69 6f 6e 20 68 65 72 |e definition her| 00003650 65 20 2a 2a 20 7d 0a 20 20 20 20 20 20 20 20 20 |e ** }. | 00003660 20 70 61 74 74 65 72 6e 20 3d 20 43 48 45 43 4b | pattern = CHECK| 00003670 2c 0a 20 20 20 20 20 20 20 20 20 20 78 6d 75 6c |,. xmul| 00003680 74 20 3d 20 2e 35 2c 0a 20 20 20 20 20 20 20 20 |t = .5,. | 00003690 20 20 79 6d 75 6c 74 20 3d 20 2e 35 0a 20 20 20 | ymult = .5. | 000036a0 20 20 20 20 20 29 0a 20 0a 20 57 68 65 72 65 20 | ). . Where | 000036b0 74 68 65 20 78 6d 75 6c 74 20 61 6e 64 20 79 6d |the xmult and ym| 000036c0 75 6c 74 20 70 61 72 61 6d 65 74 65 72 73 20 73 |ult parameters s| 000036d0 70 65 63 69 66 79 20 61 20 6e 65 77 20 73 69 7a |pecify a new siz| 000036e0 65 20 66 6f 72 20 74 68 65 20 70 61 74 74 65 72 |e for the patter| 000036f0 6e 2e 0a 20 0a 20 52 65 73 74 72 69 63 74 69 6f |n.. . Restrictio| 00003700 6e 73 3a 0a 20 0a 20 41 74 20 6c 65 61 73 74 20 |ns:. . At least | 00003710 6f 6e 65 20 73 75 62 2d 70 61 74 74 65 72 6e 20 |one sub-pattern | 00003720 6d 75 73 74 20 61 70 70 65 61 72 2e 0a 20 0a 20 |must appear.. . | 00003730 49 66 20 74 77 6f 20 73 75 62 2d 70 61 74 74 65 |If two sub-patte| 00003740 72 6e 73 20 6f 76 65 72 6c 61 70 20 69 6e 20 61 |rns overlap in a| 00003750 20 72 65 67 69 6f 6e 2c 20 74 68 65 20 6c 61 73 | region, the las| 00003760 74 20 6f 6e 65 20 64 65 66 69 6e 65 64 20 77 69 |t one defined wi| 00003770 6c 6c 20 62 65 20 75 73 65 64 0a 69 6e 20 74 68 |ll be used.in th| 00003780 69 73 20 72 65 67 69 6f 6e 2e 0a 20 0a 20 53 65 |is region.. . Se| 00003790 65 20 61 6c 73 6f 20 3a 20 52 45 43 54 41 4e 47 |e also : RECTANG| 000037a0 4c 45 2c 20 43 49 52 43 4c 45 2c 20 50 41 52 41 |LE, CIRCLE, PARA| 000037b0 4c 4c 45 4c 4f 47 52 41 4d 0a 0a 0a 52 45 43 54 |LLELOGRAM...RECT| 000037c0 41 4e 47 4c 45 3a 0a 20 0a 20 43 6f 6d 6d 61 6e |ANGLE:. . Comman| 000037d0 64 20 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c |d type: OPTIONAL| 000037e0 0a 20 0a 20 52 45 43 54 41 4e 47 4c 45 20 69 73 |. . RECTANGLE is| 000037f0 20 61 20 74 79 70 65 20 6f 66 20 73 75 62 2d 70 | a type of sub-p| 00003800 61 74 74 65 72 6e 2e 0a 20 0a 20 50 61 72 61 6d |attern.. . Param| 00003810 65 74 65 72 73 20 28 72 65 71 75 69 72 65 64 29 |eters (required)| 00003820 3a 0a 20 0a 20 73 74 61 72 74 5f 78 20 3d 20 70 |:. . start_x = p| 00003830 20 3a 20 73 74 61 72 74 20 70 6f 73 69 74 69 6f | : start positio| 00003840 6e 20 66 6f 72 20 72 65 63 74 61 6e 67 6c 65 0a |n for rectangle.| 00003850 20 73 74 61 72 74 5f 79 20 3d 20 70 0a 20 65 6e | start_y = p. en| 00003860 64 5f 78 20 20 20 3d 20 70 20 3a 20 65 6e 64 20 |d_x = p : end | 00003870 70 6f 73 69 74 69 6f 6e 20 66 6f 72 20 72 65 63 |position for rec| 00003880 74 61 6e 67 6c 65 0a 20 65 6e 64 5f 79 20 20 20 |tangle. end_y | 00003890 3d 20 70 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 |= p. . Parameter| 000038a0 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a |s (optional):. .| 000038b0 20 61 6d 62 20 20 20 20 20 20 3d 20 28 72 2c 67 | amb = (r,g| 000038c0 2c 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 6c 69 |,b) : ambient li| 000038d0 67 68 74 0a 20 64 69 66 66 20 20 20 20 20 3d 20 |ght. diff = | 000038e0 28 72 2c 67 2c 62 29 20 3a 20 64 69 66 66 75 73 |(r,g,b) : diffus| 000038f0 65 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 74 72 |e reflection. tr| 00003900 61 6e 73 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 |ans = (r,g,b)| 00003910 20 3a 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 0a | : transmission.| 00003920 20 6d 69 72 72 6f 72 20 20 20 3d 20 28 72 2c 67 | mirror = (r,g| 00003930 2c 62 29 20 3a 20 6d 69 72 72 6f 72 20 72 65 66 |,b) : mirror ref| 00003940 6c 65 63 74 69 6f 6e 0a 20 64 65 6e 73 69 74 79 |lection. density| 00003950 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6c 69 | = (r,g,b) : li| 00003960 67 68 74 20 61 74 74 65 6e 75 61 74 69 6f 6e 0a |ght attenuation.| 00003970 20 66 75 7a 7a 20 20 20 20 20 3d 20 69 20 20 20 | fuzz = i | 00003980 20 20 20 20 3a 20 63 75 72 72 65 6e 74 6c 79 20 | : currently | 00003990 75 6e 75 73 65 64 0a 20 69 6e 64 65 78 20 20 20 |unused. index | 000039a0 20 3d 20 70 20 20 20 20 20 20 20 3a 20 69 6e 64 | = p : ind| 000039b0 65 78 20 6f 66 20 72 65 66 72 61 63 74 69 6f 6e |ex of refraction| 000039c0 0a 20 64 69 74 68 65 72 20 20 20 3d 20 69 20 20 |. dither = i | 000039d0 20 20 20 20 20 3a 20 64 69 74 68 65 72 69 6e 67 | : dithering| 000039e0 0a 20 73 72 65 66 6c 65 63 74 20 3d 20 70 20 20 |. sreflect = p | 000039f0 20 20 20 20 20 3a 20 50 68 6f 6e 67 20 73 70 65 | : Phong spe| 00003a00 63 75 6c 61 72 20 72 65 66 6c 2e 20 63 6f 65 66 |cular refl. coef| 00003a10 66 2e 0a 20 72 65 66 6c 65 63 74 20 20 3d 20 70 |f.. reflect = p| 00003a20 20 20 20 20 20 20 20 3a 20 70 65 72 63 65 6e 74 | : percent| 00003a30 20 73 70 65 63 75 6c 61 72 20 72 65 66 6c 65 63 | specular reflec| 00003a40 74 69 6f 6e 0a 20 0a 20 45 78 61 6d 70 6c 65 3a |tion. . Example:| 00003a50 0a 20 0a 20 52 45 43 54 41 4e 47 4c 45 20 28 0a |. . RECTANGLE (.| 00003a60 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 | sta| 00003a70 72 74 5f 78 20 3d 20 31 30 2c 20 73 74 61 72 74 |rt_x = 10, start| 00003a80 5f 79 20 3d 20 31 32 2c 0a 20 20 20 20 20 20 20 |_y = 12,. | 00003a90 20 20 20 20 20 20 65 6e 64 5f 78 20 3d 20 31 35 | end_x = 15| 00003aa0 2c 20 65 6e 64 5f 79 20 3d 20 31 35 2c 0a 20 0a |, end_y = 15,. .| 00003ab0 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 66 | dif| 00003ac0 66 20 3d 20 28 31 2e 30 30 2c 20 2e 32 30 2c 20 |f = (1.00, .20, | 00003ad0 2e 32 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 |.20);. | 00003ae0 20 29 0a 20 0a 20 52 65 73 74 72 69 63 74 69 6f | ). . Restrictio| 00003af0 6e 73 3a 0a 20 0a 20 52 45 43 54 41 4e 47 4c 45 |ns:. . RECTANGLE| 00003b00 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 64 20 | should be used | 00003b10 6f 6e 6c 79 20 77 69 74 68 69 6e 20 61 20 70 61 |only within a pa| 00003b20 74 74 65 72 6e 20 64 65 66 69 6e 69 74 69 6f 6e |ttern definition| 00003b30 2e 0a 20 73 74 61 72 74 5f 78 20 3c 20 65 6e 64 |.. start_x < end| 00003b40 5f 78 0a 20 73 74 61 72 74 5f 79 20 3c 20 65 6e |_x. start_y < en| 00003b50 64 5f 79 0a 20 0a 20 53 65 65 20 61 6c 73 6f 20 |d_y. . See also | 00003b60 3a 20 50 41 54 54 45 52 4e 0a 20 0a 0a 43 49 52 |: PATTERN. ..CIR| 00003b70 43 4c 45 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 |CLE:. . Command | 00003b80 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 |type: OPTIONAL. | 00003b90 0a 20 43 49 52 43 4c 45 20 69 73 20 61 20 74 79 |. CIRCLE is a ty| 00003ba0 70 65 20 6f 66 20 73 75 62 2d 70 61 74 74 65 72 |pe of sub-patter| 00003bb0 6e 2e 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 73 |n.. . Parameters| 00003bc0 20 28 72 65 71 75 69 72 65 64 29 3a 0a 20 0a 20 | (required):. . | 00003bd0 72 61 64 69 75 73 20 3d 20 70 20 3a 20 72 61 64 |radius = p : rad| 00003be0 69 75 73 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 |ius. . Parameter| 00003bf0 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a |s (optional):. .| 00003c00 20 61 6d 62 20 20 20 20 20 20 3d 20 28 72 2c 67 | amb = (r,g| 00003c10 2c 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 6c 69 |,b) : ambient li| 00003c20 67 68 74 0a 20 64 69 66 66 20 20 20 20 20 3d 20 |ght. diff = | 00003c30 28 72 2c 67 2c 62 29 20 3a 20 64 69 66 66 75 73 |(r,g,b) : diffus| 00003c40 65 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 74 72 |e reflection. tr| 00003c50 61 6e 73 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 |ans = (r,g,b)| 00003c60 20 3a 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 0a | : transmission.| 00003c70 20 6d 69 72 72 6f 72 20 20 20 3d 20 28 72 2c 67 | mirror = (r,g| 00003c80 2c 62 29 20 3a 20 6d 69 72 72 6f 72 20 72 65 66 |,b) : mirror ref| 00003c90 6c 65 63 74 69 6f 6e 0a 20 64 65 6e 73 69 74 79 |lection. density| 00003ca0 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6c 69 | = (r,g,b) : li| 00003cb0 67 68 74 20 61 74 74 65 6e 75 61 74 69 6f 6e 0a |ght attenuation.| 00003cc0 20 66 75 7a 7a 20 20 20 20 20 3d 20 69 20 20 20 | fuzz = i | 00003cd0 20 20 20 20 3a 20 63 75 72 72 65 6e 74 6c 79 20 | : currently | 00003ce0 75 6e 75 73 65 64 0a 20 69 6e 64 65 78 20 20 20 |unused. index | 00003cf0 20 3d 20 70 20 20 20 20 20 20 20 3a 20 69 6e 64 | = p : ind| 00003d00 65 78 20 6f 66 20 72 65 66 72 61 63 74 69 6f 6e |ex of refraction| 00003d10 0a 20 64 69 74 68 65 72 20 20 20 3d 20 69 20 20 |. dither = i | 00003d20 20 20 20 20 20 3a 20 64 69 74 68 65 72 69 6e 67 | : dithering| 00003d30 0a 20 73 72 65 66 6c 65 63 74 20 3d 20 70 20 20 |. sreflect = p | 00003d40 20 20 20 20 20 3a 20 50 68 6f 6e 67 20 73 70 65 | : Phong spe| 00003d50 63 75 6c 61 72 20 72 65 66 6c 2e 20 63 6f 65 66 |cular refl. coef| 00003d60 66 2e 0a 20 72 65 66 6c 65 63 74 20 20 3d 20 70 |f.. reflect = p| 00003d70 20 20 20 20 20 20 20 3a 20 70 65 72 63 65 6e 74 | : percent| 00003d80 20 73 70 65 63 75 6c 61 72 20 72 65 66 6c 65 63 | specular reflec| 00003d90 74 69 6f 6e 0a 20 0a 20 45 78 61 6d 70 6c 65 3a |tion. . Example:| 00003da0 0a 20 0a 20 43 49 52 43 4c 45 20 28 0a 20 20 20 |. . CIRCLE (. | 00003db0 20 20 20 20 20 20 20 72 61 64 69 75 73 20 3d 20 | radius = | 00003dc0 35 2c 0a 20 20 20 20 20 20 20 20 20 20 64 69 66 |5,. dif| 00003dd0 66 20 3d 20 28 31 2e 30 30 2c 20 2e 32 30 2c 20 |f = (1.00, .20, | 00003de0 2e 32 30 29 3b 0a 20 20 20 20 20 20 20 20 29 0a |.20);. ).| 00003df0 20 0a 20 52 65 73 74 72 69 63 74 69 6f 6e 73 3a | . Restrictions:| 00003e00 0a 20 0a 20 43 49 52 43 4c 45 20 73 68 6f 75 6c |. . CIRCLE shoul| 00003e10 64 20 62 65 20 75 73 65 64 20 6f 6e 6c 79 20 77 |d be used only w| 00003e20 69 74 68 69 6e 20 61 20 70 61 74 74 65 72 6e 20 |ithin a pattern | 00003e30 64 65 66 69 6e 69 74 69 6f 6e 2e 0a 20 0a 20 53 |definition.. . S| 00003e40 65 65 20 61 6c 73 6f 20 3a 20 50 41 54 54 45 52 |ee also : PATTER| 00003e50 4e 0a 20 0a 0a 50 4f 4c 59 47 4f 4e 3a 0a 20 0a |N. ..POLYGON:. .| 00003e60 20 43 6f 6d 6d 61 6e 64 20 74 79 70 65 3a 20 4f | Command type: O| 00003e70 50 54 49 4f 4e 41 4c 0a 20 0a 20 50 4f 4c 59 47 |PTIONAL. . POLYG| 00003e80 4f 4e 20 69 73 20 61 20 74 79 70 65 20 6f 66 20 |ON is a type of | 00003e90 73 75 62 2d 70 61 74 74 65 72 6e 2e 0a 20 0a 20 |sub-pattern.. . | 00003ea0 50 61 72 61 6d 65 74 65 72 73 20 28 72 65 71 75 |Parameters (requ| 00003eb0 69 72 65 64 29 3a 0a 20 0a 20 70 6f 69 6e 74 20 |ired):. . point | 00003ec0 3d 20 28 78 2c 79 29 20 3a 20 61 20 70 6f 69 6e |= (x,y) : a poin| 00003ed0 74 20 6f 66 20 74 68 65 20 70 6f 6c 79 67 6f 6e |t of the polygon| 00003ee0 2e 20 41 6e 79 0a 20 20 20 20 20 20 20 20 20 20 |. Any. | 00003ef0 20 20 20 20 20 20 20 6e 75 6d 62 65 72 20 6f 66 | number of| 00003f00 20 70 6f 69 6e 74 73 20 63 61 6e 20 62 65 0a 20 | points can be. | 00003f10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003f20 64 65 66 69 6e 65 64 2c 20 62 75 74 20 61 74 20 |defined, but at | 00003f30 6c 65 61 73 74 20 66 6f 75 72 0a 20 20 20 20 20 |least four. | 00003f40 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 73 74 | must| 00003f50 20 62 65 20 64 65 66 69 6e 65 64 2c 20 77 69 74 | be defined, wit| 00003f60 68 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 |h the. | 00003f70 20 20 20 20 20 20 20 6c 61 73 74 20 74 68 65 20 | last the | 00003f80 73 61 6d 65 20 61 73 20 74 68 65 20 66 69 72 73 |same as the firs| 00003f90 74 2e 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 73 |t.. . Parameters| 00003fa0 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a 20 | (optional):. . | 00003fb0 61 6d 62 20 20 20 20 20 20 3d 20 28 72 2c 67 2c |amb = (r,g,| 00003fc0 62 29 20 3a 20 61 6d 62 69 65 6e 74 20 6c 69 67 |b) : ambient lig| 00003fd0 68 74 0a 20 64 69 66 66 20 20 20 20 20 3d 20 28 |ht. diff = (| 00003fe0 72 2c 67 2c 62 29 20 3a 20 64 69 66 66 75 73 65 |r,g,b) : diffuse| 00003ff0 20 72 65 66 6c 65 63 74 69 6f 6e 0a 20 74 72 61 | reflection. tra| 00004000 6e 73 20 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 |ns = (r,g,b) | 00004010 3a 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 0a 20 |: transmission. | 00004020 6d 69 72 72 6f 72 20 20 20 3d 20 28 72 2c 67 2c |mirror = (r,g,| 00004030 62 29 20 3a 20 6d 69 72 72 6f 72 20 72 65 66 6c |b) : mirror refl| 00004040 65 63 74 69 6f 6e 0a 20 64 65 6e 73 69 74 79 20 |ection. density | 00004050 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 6c 69 67 | = (r,g,b) : lig| 00004060 68 74 20 61 74 74 65 6e 75 61 74 69 6f 6e 0a 20 |ht attenuation. | 00004070 66 75 7a 7a 20 20 20 20 20 3d 20 69 20 20 20 20 |fuzz = i | 00004080 20 20 20 3a 20 63 75 72 72 65 6e 74 6c 79 20 75 | : currently u| 00004090 6e 75 73 65 64 0a 20 69 6e 64 65 78 20 20 20 20 |nused. index | 000040a0 3d 20 70 20 20 20 20 20 20 20 3a 20 69 6e 64 65 |= p : inde| 000040b0 78 20 6f 66 20 72 65 66 72 61 63 74 69 6f 6e 0a |x of refraction.| 000040c0 20 64 69 74 68 65 72 20 20 20 3d 20 69 20 20 20 | dither = i | 000040d0 20 20 20 20 3a 20 64 69 74 68 65 72 69 6e 67 0a | : dithering.| 000040e0 20 73 72 65 66 6c 65 63 74 20 3d 20 70 20 20 20 | sreflect = p | 000040f0 20 20 20 20 3a 20 50 68 6f 6e 67 20 73 70 65 63 | : Phong spec| 00004100 75 6c 61 72 20 72 65 66 6c 2e 20 63 6f 65 66 66 |ular refl. coeff| 00004110 2e 0a 20 72 65 66 6c 65 63 74 20 20 3d 20 70 20 |.. reflect = p | 00004120 20 20 20 20 20 20 3a 20 70 65 72 63 65 6e 74 20 | : percent | 00004130 73 70 65 63 75 6c 61 72 20 72 65 66 6c 65 63 74 |specular reflect| 00004140 69 6f 6e 0a 20 0a 20 45 78 61 6d 70 6c 65 3a 0a |ion. . Example:.| 00004150 20 0a 20 50 4f 4c 59 47 4f 4e 20 28 0a 20 20 20 | . POLYGON (. | 00004160 20 20 20 20 20 20 20 20 70 6f 69 6e 74 20 3d 20 | point = | 00004170 28 30 2c 30 29 2c 20 7b 20 74 72 69 61 6e 67 6c |(0,0), { triangl| 00004180 65 20 70 61 74 74 65 72 6e 20 7d 0a 20 20 20 20 |e pattern }. | 00004190 20 20 20 20 20 20 20 70 6f 69 6e 74 20 3d 20 28 | point = (| 000041a0 31 30 2c 20 30 29 2c 0a 20 20 20 20 20 20 20 20 |10, 0),. | 000041b0 20 20 20 70 6f 69 6e 74 20 3d 20 28 30 2c 20 31 | point = (0, 1| 000041c0 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 70 |0),. p| 000041d0 6f 69 6e 74 20 3d 20 28 30 2c 30 29 0a 20 20 20 |oint = (0,0). | 000041e0 20 20 20 20 20 20 29 0a 20 0a 20 52 65 73 74 72 | ). . Restr| 000041f0 69 63 74 69 6f 6e 73 3a 0a 20 0a 20 50 4f 4c 59 |ictions:. . POLY| 00004200 47 4f 4e 20 73 68 6f 75 6c 64 20 62 65 20 75 73 |GON should be us| 00004210 65 64 20 6f 6e 6c 79 20 77 69 74 68 69 6e 20 61 |ed only within a| 00004220 20 70 61 74 74 65 72 6e 20 64 65 66 69 6e 69 74 | pattern definit| 00004230 69 6f 6e 2e 20 54 68 65 20 6c 61 73 74 20 70 6f |ion. The last po| 00004240 69 6e 74 0a 64 65 66 69 6e 65 64 20 6d 75 73 74 |int.defined must| 00004250 20 62 65 20 74 68 65 20 73 61 6d 65 20 61 73 20 | be the same as | 00004260 74 68 65 20 66 69 72 73 74 2e 20 41 74 20 6c 65 |the first. At le| 00004270 61 73 74 20 34 20 70 6f 69 6e 74 73 20 6d 75 73 |ast 4 points mus| 00004280 74 20 61 70 70 65 61 72 2c 20 77 69 74 68 0a 74 |t appear, with.t| 00004290 68 65 20 6c 61 73 74 20 74 68 65 20 73 61 6d 65 |he last the same| 000042a0 20 61 73 20 74 68 65 20 66 69 72 73 74 2e 0a 20 | as the first.. | 000042b0 0a 20 53 65 65 20 61 6c 73 6f 20 3a 20 50 41 54 |. See also : PAT| 000042c0 54 45 52 4e 0a 20 0a 20 0a 42 6f 75 6e 64 69 6e |TERN. . .Boundin| 000042d0 67 20 42 6f 78 65 73 0a 20 0a 20 0a 42 45 47 49 |g Boxes. . .BEGI| 000042e0 4e 5f 42 42 4f 58 3a 0a 20 0a 20 43 6f 6d 6d 61 |N_BBOX:. . Comma| 000042f0 6e 64 20 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 |nd type: OPTIONA| 00004300 4c 0a 20 0a 20 54 68 65 20 42 45 47 49 4e 5f 42 |L. . The BEGIN_B| 00004310 42 4f 58 2c 20 45 4e 44 5f 42 42 4f 58 20 63 6f |BOX, END_BBOX co| 00004320 6d 6d 61 6e 64 73 20 66 6f 72 6d 20 61 6e 20 65 |mmands form an e| 00004330 6e 63 6c 6f 73 69 6e 67 20 62 6f 75 6e 64 69 6e |nclosing boundin| 00004340 67 20 62 6f 78 20 61 72 6f 75 6e 64 20 61 0a 67 |g box around a.g| 00004350 72 6f 75 70 20 6f 66 20 6f 62 6a 65 63 74 73 20 |roup of objects | 00004360 28 77 68 69 63 68 20 6d 61 79 20 69 6e 63 6c 75 |(which may inclu| 00004370 64 65 20 6f 74 68 65 72 20 62 6f 75 6e 64 69 6e |de other boundin| 00004380 67 20 62 6f 78 65 73 29 2e 20 41 6e 20 6f 70 74 |g boxes). An opt| 00004390 69 6f 6e 61 6c 20 6e 61 6d 65 0a 6d 75 73 74 20 |ional name.must | 000043a0 70 72 65 63 65 64 65 20 74 68 65 20 62 6f 75 6e |precede the boun| 000043b0 64 69 6e 67 20 62 6f 78 20 62 65 67 69 6e 20 73 |ding box begin s| 000043c0 74 61 74 65 6d 65 6e 74 2e 20 42 6f 75 6e 64 69 |tatement. Boundi| 000043d0 6e 67 20 62 6f 78 65 73 20 63 61 6e 6e 6f 74 20 |ng boxes cannot | 000043e0 62 65 0a 67 69 76 65 6e 20 73 75 72 66 61 63 65 |be.given surface| 000043f0 20 63 68 61 72 61 63 74 65 72 69 73 74 69 63 73 | characteristics| 00004400 2c 20 73 69 6e 63 65 20 74 68 65 79 20 61 72 65 |, since they are| 00004410 20 63 6f 6e 63 65 70 74 75 61 6c 20 6f 62 6a 65 | conceptual obje| 00004420 63 74 73 2e 0a 20 0a 20 50 61 72 61 6d 65 74 65 |cts.. . Paramete| 00004430 72 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 |rs (optional):. | 00004440 0a 20 6e 61 6d 65 20 3d 20 73 74 72 69 6e 67 20 |. name = string | 00004450 3a 20 6e 61 6d 65 20 66 6f 72 20 62 6f 78 0a 20 |: name for box. | 00004460 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 6e 61 |. Example:. . na| 00004470 6d 65 20 3d 20 53 41 4d 50 4c 45 5f 42 42 4f 58 |me = SAMPLE_BBOX| 00004480 0a 20 42 45 47 49 4e 5f 42 42 4f 58 0a 20 20 20 |. BEGIN_BBOX. | 00004490 53 50 48 45 52 45 20 28 29 3b 20 7b 20 2a 2a 20 |SPHERE (); { ** | 000044a0 73 70 68 65 72 65 20 68 65 72 65 20 2a 2a 20 7d |sphere here ** }| 000044b0 0a 20 20 20 54 52 49 41 4e 47 4c 45 20 28 29 3b |. TRIANGLE ();| 000044c0 20 7b 20 2a 2a 20 74 72 69 61 6e 67 6c 65 20 68 | { ** triangle h| 000044d0 65 72 65 20 2a 2a 20 7d 0a 20 45 4e 44 5f 42 42 |ere ** }. END_BB| 000044e0 4f 58 0a 20 0a 20 52 65 73 74 72 69 63 74 69 6f |OX. . Restrictio| 000044f0 6e 73 3a 0a 20 0a 20 4d 75 73 74 20 62 65 20 70 |ns:. . Must be p| 00004500 61 69 72 65 64 20 77 69 74 68 20 61 6e 20 45 4e |aired with an EN| 00004510 44 5f 42 42 4f 58 20 73 74 61 74 65 6d 65 6e 74 |D_BBOX statement| 00004520 2e 0a 20 0a 20 0a 45 4e 44 5f 42 42 4f 58 3a 0a |.. . .END_BBOX:.| 00004530 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 70 65 3a | . Command type:| 00004540 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 43 6f 6d | OPTIONAL. . Com| 00004550 70 61 6e 69 6f 6e 20 63 6f 6d 6d 61 6e 64 20 74 |panion command t| 00004560 6f 20 42 45 47 49 4e 5f 42 42 4f 58 2e 0a 20 0a |o BEGIN_BBOX.. .| 00004570 20 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 6e 61 6d | Example:. . nam| 00004580 65 20 3d 20 53 41 4d 50 4c 45 5f 42 42 4f 58 0a |e = SAMPLE_BBOX.| 00004590 20 42 45 47 49 4e 5f 42 42 4f 58 0a 20 20 20 53 | BEGIN_BBOX. S| 000045a0 50 48 45 52 45 20 28 29 3b 20 7b 20 2a 2a 20 73 |PHERE (); { ** s| 000045b0 70 68 65 72 65 20 68 65 72 65 20 2a 2a 20 7d 0a |phere here ** }.| 000045c0 20 20 20 54 52 49 41 4e 47 4c 45 20 28 29 3b 20 | TRIANGLE (); | 000045d0 7b 20 2a 2a 20 74 72 69 61 6e 67 6c 65 20 68 65 |{ ** triangle he| 000045e0 72 65 20 2a 2a 20 7d 0a 20 45 4e 44 5f 42 42 4f |re ** }. END_BBO| 000045f0 58 0a 20 0a 20 52 65 73 74 72 69 63 74 69 6f 6e |X. . Restriction| 00004600 73 3a 0a 20 0a 20 4d 75 73 74 20 62 65 20 70 61 |s:. . Must be pa| 00004610 69 72 65 64 20 77 69 74 68 20 61 20 42 45 47 49 |ired with a BEGI| 00004620 4e 5f 42 42 4f 58 20 73 74 61 74 65 6d 65 6e 74 |N_BBOX statement| 00004630 2e 0a 20 0a 20 0a 49 6e 73 74 61 6e 63 65 73 0a |.. . .Instances.| 00004640 20 0a 20 0a 42 45 47 49 4e 5f 49 4e 53 54 41 4e | . .BEGIN_INSTAN| 00004650 43 45 53 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 |CES:. . Command | 00004660 74 79 70 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 |type: OPTIONAL. | 00004670 0a 20 53 65 76 65 72 61 6c 20 70 72 69 6d 69 74 |. Several primit| 00004680 69 76 65 73 20 6d 61 79 20 62 65 20 67 72 6f 75 |ives may be grou| 00004690 70 65 64 20 69 6e 74 6f 20 61 6e 20 27 69 6e 73 |ped into an 'ins| 000046a0 74 61 6e 63 65 27 2c 20 61 6e 64 20 74 68 69 73 |tance', and this| 000046b0 20 67 72 6f 75 70 20 63 61 6e 0a 65 61 73 69 6c | group can.easil| 000046c0 79 20 62 65 20 70 6c 61 63 65 64 20 69 6e 20 73 |y be placed in s| 000046d0 65 76 65 72 61 6c 20 6c 6f 63 61 74 69 6f 6e 73 |everal locations| 000046e0 2e 20 49 6e 20 61 64 64 69 74 69 6f 6e 2c 20 69 |. In addition, i| 000046f0 74 20 63 61 6e 20 62 65 20 72 65 73 69 7a 65 64 |t can be resized| 00004700 2e 20 41 6c 6c 0a 69 6e 73 74 61 6e 63 65 20 64 |. All.instance d| 00004710 65 66 69 6e 69 74 69 6f 6e 73 20 6d 75 73 74 20 |efinitions must | 00004720 62 65 20 70 6c 61 63 65 64 20 77 69 74 68 69 6e |be placed within| 00004730 20 74 68 65 20 42 45 47 49 4e 5f 49 4e 53 54 41 | the BEGIN_INSTA| 00004740 4e 43 45 53 20 61 6e 64 0a 45 4e 44 5f 49 4e 53 |NCES and.END_INS| 00004750 54 41 4e 43 45 53 20 73 74 61 74 65 6d 65 6e 74 |TANCES statement| 00004760 73 3b 20 6f 6e 6c 79 20 6f 6e 65 20 73 65 74 20 |s; only one set | 00004770 6f 66 20 74 68 65 73 65 20 73 74 61 74 65 6d 65 |of these stateme| 00004780 6e 74 73 20 69 73 20 61 6c 6c 6f 77 65 64 2e 20 |nts is allowed. | 00004790 41 0a 67 72 6f 75 70 20 6f 66 20 6f 62 6a 65 63 |A.group of objec| 000047a0 74 73 20 6d 75 73 74 20 62 65 20 70 6c 61 63 65 |ts must be place| 000047b0 64 20 69 6e 20 61 20 42 42 4f 58 2c 20 61 6e 64 |d in a BBOX, and| 000047c0 20 74 68 69 73 20 42 42 4f 58 20 6d 75 73 74 20 | this BBOX must | 000047d0 62 65 20 67 69 76 65 6e 20 61 0a 6e 61 6d 65 2e |be given a.name.| 000047e0 20 49 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e | In the followin| 000047f0 67 20 65 78 61 6d 70 6c 65 2c 20 74 68 72 65 65 |g example, three| 00004800 20 6f 62 6a 65 63 74 73 20 61 72 65 20 64 65 66 | objects are def| 00004810 69 6e 65 64 3a 20 4f 42 4a 45 43 54 5f 31 2c 0a |ined: OBJECT_1,.| 00004820 53 55 42 5f 4f 42 4a 45 43 54 5f 31 2c 20 61 6e |SUB_OBJECT_1, an| 00004830 64 20 4f 42 4a 45 43 54 5f 32 2e 20 41 6e 79 20 |d OBJECT_2. Any | 00004840 69 6e 63 6c 75 73 69 6f 6e 20 6f 66 20 4f 42 4a |inclusion of OBJ| 00004850 45 43 54 5f 31 20 77 69 6c 6c 20 69 6d 70 6c 69 |ECT_1 will impli| 00004860 63 69 74 6c 79 0a 69 6e 63 6c 75 64 65 20 53 55 |citly.include SU| 00004870 42 5f 4f 42 4a 45 43 54 5f 31 2c 20 62 75 74 20 |B_OBJECT_1, but | 00004880 6e 6f 74 20 4f 42 4a 45 43 54 5f 32 2e 20 41 6e |not OBJECT_2. An| 00004890 79 20 61 72 62 69 74 72 61 72 79 20 6f 62 6a 65 |y arbitrary obje| 000048a0 63 74 20 74 72 65 65 20 63 61 6e 20 62 65 0a 69 |ct tree can be.i| 000048b0 6e 63 6c 75 64 65 64 2e 20 52 65 66 65 72 72 69 |ncluded. Referri| 000048c0 6e 67 20 74 6f 20 61 20 6e 6f 64 65 20 77 69 6c |ng to a node wil| 000048d0 6c 20 69 6e 63 6c 75 64 65 20 74 68 65 20 73 75 |l include the su| 000048e0 62 2d 74 72 65 65 20 72 6f 6f 74 65 64 20 61 74 |b-tree rooted at| 000048f0 20 74 68 61 74 20 6e 6f 64 65 2e 0a 20 0a 20 45 | that node.. . E| 00004900 78 61 6d 70 6c 65 3a 0a 20 0a 20 42 45 47 49 4e |xample:. . BEGIN| 00004910 5f 49 4e 53 54 41 4e 43 45 53 0a 20 0a 20 20 20 |_INSTANCES. . | 00004920 4e 41 4d 45 20 3d 20 4f 42 4a 45 43 54 5f 31 0a |NAME = OBJECT_1.| 00004930 20 20 20 42 45 47 49 4e 5f 42 42 4f 58 0a 20 0a | BEGIN_BBOX. .| 00004940 20 20 20 20 20 7b 20 2a 2a 20 73 6f 6d 65 20 70 | { ** some p| 00004950 72 69 6d 69 74 69 76 65 73 20 68 65 72 65 20 2a |rimitives here *| 00004960 2a 20 7d 0a 20 20 20 20 20 4e 41 4d 45 20 3d 20 |* }. NAME = | 00004970 53 55 42 5f 4f 42 4a 45 43 54 5f 31 0a 20 20 20 |SUB_OBJECT_1. | 00004980 20 20 42 45 47 49 4e 5f 42 42 4f 58 0a 20 20 20 | BEGIN_BBOX. | 00004990 20 20 20 20 7b 20 2a 2a 20 73 6f 6d 65 20 6d 6f | { ** some mo| 000049a0 72 65 20 70 72 69 6d 69 74 69 76 65 73 20 68 65 |re primitives he| 000049b0 72 65 20 2a 2a 20 7d 0a 20 20 20 20 20 45 4e 44 |re ** }. END| 000049c0 5f 42 42 4f 58 0a 20 20 20 45 4e 44 5f 42 42 4f |_BBOX. END_BBO| 000049d0 58 0a 20 0a 20 20 20 4e 41 4d 45 20 3d 20 4f 42 |X. . NAME = OB| 000049e0 4a 45 43 54 5f 32 0a 20 20 20 42 45 47 49 4e 5f |JECT_2. BEGIN_| 000049f0 42 42 4f 58 0a 20 20 20 20 20 7b 20 2a 2a 20 6d |BBOX. { ** m| 00004a00 6f 72 65 20 70 72 69 6d 69 74 69 76 65 73 20 2a |ore primitives *| 00004a10 2a 20 7d 0a 20 20 20 45 4e 44 5f 42 42 4f 58 0a |* }. END_BBOX.| 00004a20 20 0a 20 45 4e 44 5f 49 4e 53 54 41 4e 43 45 53 | . END_INSTANCES| 00004a30 0a 20 0a 20 52 65 73 74 72 69 63 74 69 6f 6e 73 |. . Restrictions| 00004a40 3a 0a 20 0a 20 54 68 65 72 65 20 63 61 6e 20 62 |:. . There can b| 00004a50 65 20 6f 6e 6c 79 20 6f 6e 65 20 42 45 47 49 4e |e only one BEGIN| 00004a60 5f 49 4e 53 54 41 4e 43 45 53 20 73 74 61 74 65 |_INSTANCES state| 00004a70 6d 65 6e 74 2e 0a 20 54 68 65 72 65 20 6d 75 73 |ment.. There mus| 00004a80 74 20 62 65 20 61 20 6d 61 74 63 68 69 6e 67 20 |t be a matching | 00004a90 45 4e 44 5f 49 4e 53 54 41 4e 43 45 53 20 73 74 |END_INSTANCES st| 00004aa0 61 74 65 6d 65 6e 74 2e 0a 20 0a 20 53 65 65 20 |atement.. . See | 00004ab0 61 6c 73 6f 3a 20 45 4e 44 5f 49 4e 53 54 41 4e |also: END_INSTAN| 00004ac0 43 45 53 2c 20 49 4e 53 54 41 4e 43 45 5f 4f 46 |CES, INSTANCE_OF| 00004ad0 0a 20 0a 20 0a 45 4e 44 5f 49 4e 53 54 41 4e 43 |. . .END_INSTANC| 00004ae0 45 53 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 |ES:. . Command t| 00004af0 79 70 65 20 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 |ype : OPTIONAL. | 00004b00 0a 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 73 |. This command s| 00004b10 70 65 63 69 66 69 65 73 20 74 68 65 20 65 6e 64 |pecifies the end| 00004b20 20 6f 66 20 74 68 65 20 69 6e 73 74 61 6e 63 65 | of the instance| 00004b30 20 74 72 65 65 2e 20 41 6e 79 20 70 72 69 6d 69 | tree. Any primi| 00004b40 74 69 76 65 20 61 66 74 65 72 0a 74 68 65 20 45 |tive after.the E| 00004b50 4e 44 5f 49 4e 53 54 41 4e 43 45 53 20 73 74 61 |ND_INSTANCES sta| 00004b60 74 65 6d 65 6e 74 20 61 72 65 20 61 63 74 75 61 |tement are actua| 00004b70 6c 6c 79 20 64 69 73 70 6c 61 79 65 64 20 61 73 |lly displayed as| 00004b80 20 70 61 72 74 20 6f 66 20 74 68 65 20 69 6d 61 | part of the ima| 00004b90 67 65 2e 0a 20 0a 20 52 65 73 74 72 69 63 74 69 |ge.. . Restricti| 00004ba0 6f 6e 73 3a 0a 20 0a 20 54 68 65 72 65 20 63 61 |ons:. . There ca| 00004bb0 6e 20 62 65 20 6f 6e 6c 79 20 6f 6e 65 20 45 4e |n be only one EN| 00004bc0 44 5f 49 4e 53 54 41 4e 43 45 53 20 73 74 61 74 |D_INSTANCES stat| 00004bd0 65 6d 65 6e 74 2e 0a 20 0a 20 53 65 65 20 41 6c |ement.. . See Al| 00004be0 73 6f 3a 20 42 45 47 49 4e 5f 49 4e 53 54 41 4e |so: BEGIN_INSTAN| 00004bf0 43 45 53 2c 20 49 4e 53 54 41 4e 43 45 5f 4f 46 |CES, INSTANCE_OF| 00004c00 0a 20 0a 0a 49 4e 53 54 41 4e 43 45 5f 4f 46 3a |. ..INSTANCE_OF:| 00004c10 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 70 65 |. . Command type| 00004c20 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 41 66 |: OPTIONAL. . Af| 00004c30 74 65 72 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 |ter an instance | 00004c40 74 72 65 65 20 69 73 20 64 65 66 69 6e 65 64 20 |tree is defined | 00004c50 77 69 74 68 20 74 68 65 20 42 45 47 49 4e 5f 49 |with the BEGIN_I| 00004c60 4e 53 54 41 4e 43 45 53 2c 20 45 4e 44 5f 49 4e |NSTANCES, END_IN| 00004c70 53 54 41 4e 43 45 53 0a 63 6f 6d 6d 61 6e 64 20 |STANCES.command | 00004c80 70 61 69 72 2c 20 70 61 72 74 73 20 6f 66 20 74 |pair, parts of t| 00004c90 68 65 20 74 72 65 65 20 63 61 6e 20 62 65 20 72 |he tree can be r| 00004ca0 65 66 65 72 72 65 64 20 74 6f 20 77 69 74 68 20 |eferred to with | 00004cb0 74 68 65 20 49 4e 53 54 41 4e 43 45 5f 4f 46 0a |the INSTANCE_OF.| 00004cc0 73 74 61 74 65 6d 65 6e 74 2e 20 54 68 69 73 20 |statement. This | 00004cd0 61 63 74 75 61 6c 6c 79 20 70 75 74 73 20 74 68 |actually puts th| 00004ce0 65 20 73 75 62 2d 74 72 65 65 20 69 6e 20 74 68 |e sub-tree in th| 00004cf0 65 20 69 6d 61 67 65 2e 20 59 6f 75 20 6d 75 73 |e image. You mus| 00004d00 74 20 73 70 65 63 69 66 79 0a 74 68 65 20 6e 61 |t specify.the na| 00004d10 6d 65 20 6f 66 20 74 68 65 20 72 6f 6f 74 20 6f |me of the root o| 00004d20 66 20 74 68 65 20 73 75 62 2d 74 72 65 65 2e 20 |f the sub-tree. | 00004d30 54 68 65 20 6f 72 69 67 69 6e 61 6c 20 69 6e 73 |The original ins| 00004d40 74 61 6e 63 65 20 73 68 6f 75 6c 64 20 62 65 0a |tance should be.| 00004d50 64 65 66 69 6e 65 64 20 72 65 6c 61 74 69 76 65 |defined relative| 00004d60 20 74 6f 20 28 30 2c 30 2c 30 29 2c 20 61 6e 64 | to (0,0,0), and| 00004d70 20 74 68 65 20 6c 6f 63 61 74 69 6f 6e 20 70 61 | the location pa| 00004d80 72 61 6d 65 74 65 72 20 73 70 65 63 69 66 69 65 |rameter specifie| 00004d90 73 20 77 68 65 72 65 20 74 68 65 0a 6e 65 77 20 |s where the.new | 00004da0 63 6f 70 79 20 77 69 6c 6c 20 67 6f 2e 0a 20 0a |copy will go.. .| 00004db0 20 50 61 72 61 6d 65 74 65 72 73 20 28 72 65 71 | Parameters (req| 00004dc0 75 69 72 65 64 29 3a 0a 20 0a 20 6e 61 6d 65 20 |uired):. . name | 00004dd0 3d 20 73 74 72 69 6e 67 20 20 3a 20 6e 61 6d 65 |= string : name| 00004de0 20 6f 66 20 73 75 62 2d 74 72 65 65 0a 20 6c 6f | of sub-tree. lo| 00004df0 63 20 20 3d 20 28 78 2c 79 2c 7a 29 20 3a 20 6c |c = (x,y,z) : l| 00004e00 6f 63 61 74 69 6f 6e 20 66 6f 72 20 69 6e 73 74 |ocation for inst| 00004e10 61 6e 63 65 0a 20 0a 20 50 61 72 61 6d 65 74 65 |ance. . Paramete| 00004e20 72 73 20 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 |rs (optional):. | 00004e30 0a 20 73 63 61 6c 65 20 3d 20 28 78 2c 79 2c 7a |. scale = (x,y,z| 00004e40 29 20 3a 20 73 63 61 6c 65 20 66 61 63 74 6f 72 |) : scale factor| 00004e50 0a 20 0a 20 45 78 61 6d 70 6c 65 3a 0a 20 0a 20 |. . Example:. . | 00004e60 49 4e 53 54 41 4e 43 45 5f 4f 46 20 28 20 6e 61 |INSTANCE_OF ( na| 00004e70 6d 65 20 3d 20 4f 42 4a 45 43 54 5f 31 2c 0a 20 |me = OBJECT_1,. | 00004e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f | lo| 00004e90 63 20 3d 20 28 31 30 30 2e 32 33 2c 20 32 30 2e |c = (100.23, 20.| 00004ea0 32 33 2c 20 34 35 2e 36 37 38 29 2c 0a 20 20 20 |23, 45.678),. | 00004eb0 20 20 20 20 20 20 20 20 20 20 20 20 73 63 61 6c | scal| 00004ec0 65 20 3d 20 28 2e 35 2c 20 2e 35 2c 20 2e 35 29 |e = (.5, .5, .5)| 00004ed0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 29 0a |. ).| 00004ee0 20 0a 20 4f 70 74 69 6f 6e 61 6c 20 66 6f 72 6d | . Optional form| 00004ef0 73 3a 0a 20 0a 20 27 6c 6f 63 27 20 3d 20 27 70 |s:. . 'loc' = 'p| 00004f00 6f 73 27 20 3d 20 27 6c 6f 63 61 74 69 6f 6e 27 |os' = 'location'| 00004f10 20 3d 20 27 70 6f 73 69 74 69 6f 6e 27 0a 20 0a | = 'position'. .| 00004f20 20 52 65 73 74 72 69 63 74 69 6f 6e 73 3a 0a 20 | Restrictions:. | 00004f30 0a 20 41 6c 6c 20 73 63 61 6c 65 20 66 61 63 74 |. All scale fact| 00004f40 6f 72 20 65 6e 74 72 69 65 73 20 73 68 6f 75 6c |or entries shoul| 00004f50 64 20 62 65 20 67 72 65 61 74 65 72 20 74 68 61 |d be greater tha| 00004f60 6e 20 7a 65 72 6f 2e 0a 20 0a 20 49 66 20 74 68 |n zero.. . If th| 00004f70 65 20 73 63 61 6c 65 20 66 61 63 74 6f 72 20 65 |e scale factor e| 00004f80 6e 74 72 69 65 73 20 61 72 65 20 75 6e 65 71 75 |ntries are unequ| 00004f90 61 6c 2c 20 73 6f 6d 65 20 70 72 69 6d 69 74 69 |al, some primiti| 00004fa0 76 65 73 20 69 6e 20 74 68 65 20 69 6e 73 74 61 |ves in the insta| 00004fb0 6e 63 65 0a 77 69 6c 6c 20 6e 6f 74 20 62 65 20 |nce.will not be | 00004fc0 61 66 66 65 63 74 65 64 20 63 6f 72 72 65 63 74 |affected correct| 00004fd0 6c 79 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c |ly. For example,| 00004fe0 20 61 20 53 50 48 45 52 45 20 77 69 6c 6c 20 72 | a SPHERE will r| 00004ff0 65 6d 61 69 6e 20 72 6f 75 6e 64 20 69 66 0a 73 |emain round if.s| 00005000 63 61 6c 65 64 20 62 79 20 28 31 2c 32 2c 33 29 |caled by (1,2,3)| 00005010 2c 20 6e 6f 74 20 63 68 61 6e 67 65 20 74 6f 20 |, not change to | 00005020 61 20 51 55 41 44 52 41 54 49 43 20 73 70 68 65 |a QUADRATIC sphe| 00005030 72 6f 69 64 2e 0a 20 0a 20 53 65 65 20 61 6c 73 |roid.. . See als| 00005040 6f 20 3a 20 42 45 47 49 4e 5f 49 4e 53 54 41 4e |o : BEGIN_INSTAN| 00005050 43 45 53 2c 20 45 4e 44 5f 49 4e 53 54 41 4e 43 |CES, END_INSTANC| 00005060 45 53 0a 0a 0a 53 65 74 74 69 6e 67 20 44 65 66 |ES...Setting Def| 00005070 61 75 6c 74 73 0a 20 0a 0a 44 45 46 41 55 4c 54 |aults. ..DEFAULT| 00005080 3a 0a 20 0a 20 43 6f 6d 6d 61 6e 64 20 74 79 70 |:. . Command typ| 00005090 65 3a 20 4f 50 54 49 4f 4e 41 4c 0a 20 0a 20 51 |e: OPTIONAL. . Q| 000050a0 52 54 20 73 65 74 73 20 63 65 72 74 61 69 6e 20 |RT sets certain | 000050b0 64 65 66 61 75 6c 74 73 20 66 6f 72 20 74 68 65 |defaults for the| 000050c0 20 63 6f 6c 6f 72 20 61 74 74 72 69 62 75 74 65 | color attribute| 000050d0 73 20 6f 66 20 61 20 73 75 72 66 61 63 65 2e 20 |s of a surface. | 000050e0 54 68 65 0a 73 74 61 6e 64 61 72 64 20 64 65 66 |The.standard def| 000050f0 61 75 6c 74 20 69 73 20 66 6f 72 20 61 20 77 68 |ault is for a wh| 00005100 69 74 65 2c 20 6e 6f 6e 20 72 65 66 6c 65 63 74 |ite, non reflect| 00005110 69 76 65 2c 20 6e 6f 6e 20 73 68 69 6e 79 2c 20 |ive, non shiny, | 00005120 6e 6f 6e 20 74 72 61 6e 73 70 61 72 65 6e 74 0a |non transparent.| 00005130 73 75 72 66 61 63 65 20 77 69 74 68 20 61 20 6d |surface with a m| 00005140 65 64 69 75 6d 20 61 6d 6f 75 6e 74 20 6f 66 20 |edium amount of | 00005150 64 69 74 68 65 72 69 6e 67 2e 20 54 68 65 73 65 |dithering. These| 00005160 20 64 65 66 61 75 6c 74 73 20 63 61 6e 20 62 65 | defaults can be| 00005170 20 63 68 61 6e 67 65 64 0a 77 69 74 68 20 74 68 | changed.with th| 00005180 65 20 44 45 46 41 55 4c 54 20 63 6f 6d 6d 61 6e |e DEFAULT comman| 00005190 64 2e 20 4d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 |d. More than one| 000051a0 20 44 45 46 41 55 4c 54 20 63 6f 6d 6d 61 6e 64 | DEFAULT command| 000051b0 20 63 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 64 | can be included| 000051c0 2c 20 69 6e 0a 77 68 69 63 68 20 63 61 73 65 20 |, in.which case | 000051d0 65 61 63 68 20 6f 6e 65 20 61 66 66 65 63 74 73 |each one affects| 000051e0 20 61 6c 6c 20 70 72 69 6d 69 74 69 76 65 73 20 | all primitives | 000051f0 61 66 74 65 72 20 69 74 20 61 6e 64 20 62 65 66 |after it and bef| 00005200 6f 72 65 20 74 68 65 20 6e 65 78 74 0a 44 45 46 |ore the next.DEF| 00005210 41 55 4c 54 20 6f 72 20 74 68 65 20 65 6e 64 20 |AULT or the end | 00005220 6f 66 20 74 68 65 20 66 69 6c 65 2e 20 49 6e 20 |of the file. In | 00005230 61 64 64 69 74 69 6f 6e 20 74 6f 20 6e 65 77 20 |addition to new | 00005240 73 75 72 66 61 63 65 20 63 68 61 72 61 63 74 65 |surface characte| 00005250 72 69 73 74 69 63 73 2c 0a 74 68 65 20 4e 4f 5f |ristics,.the NO_| 00005260 53 48 41 44 4f 57 20 6b 65 79 77 6f 72 64 20 69 |SHADOW keyword i| 00005270 6e 73 74 72 75 63 74 73 20 51 52 54 20 6e 6f 74 |nstructs QRT not| 00005280 20 74 6f 20 63 6f 6d 70 75 74 65 20 73 68 61 64 | to compute shad| 00005290 6f 77 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 |ow information f| 000052a0 6f 72 0a 74 68 65 20 73 63 65 6e 65 2e 20 54 68 |or.the scene. Th| 000052b0 69 73 20 63 61 6e 20 64 65 63 72 65 61 73 65 20 |is can decrease | 000052c0 69 6d 61 67 65 20 67 65 6e 65 72 61 74 69 6f 6e |image generation| 000052d0 20 74 69 6d 65 20 61 74 20 74 68 65 20 65 78 70 | time at the exp| 000052e0 65 6e 73 65 20 6f 66 20 69 6d 61 67 65 0a 71 75 |ense of image.qu| 000052f0 61 6c 69 74 79 2e 20 58 20 61 6e 64 20 59 20 72 |ality. X and Y r| 00005300 65 73 6f 6c 75 74 69 6f 6e 20 61 6e 64 20 69 6d |esolution and im| 00005310 61 67 65 20 61 73 70 65 63 74 20 72 61 74 69 6f |age aspect ratio| 00005320 20 63 61 6e 20 62 65 20 73 65 74 20 69 6e 20 74 | can be set in t| 00005330 68 65 20 44 45 46 41 55 4c 54 0a 63 6f 6d 6d 61 |he DEFAULT.comma| 00005340 6e 64 2e 20 49 66 20 74 68 65 79 20 61 72 65 20 |nd. If they are | 00005350 73 65 74 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e |set more than on| 00005360 63 65 2c 20 74 68 65 20 76 61 6c 75 65 73 20 66 |ce, the values f| 00005370 72 6f 6d 20 74 68 65 20 6c 61 73 74 20 44 45 46 |rom the last DEF| 00005380 41 55 4c 54 0a 63 6f 6d 6d 61 6e 64 20 61 72 65 |AULT.command are| 00005390 20 74 61 6b 65 6e 2e 0a 20 0a 20 54 68 65 20 61 | taken.. . The a| 000053a0 73 70 65 63 74 20 72 61 74 69 6f 20 66 6f 72 20 |spect ratio for | 000053b0 61 6e 79 20 6d 6f 6e 69 74 6f 72 20 63 61 6e 20 |any monitor can | 000053c0 62 65 20 64 65 74 65 72 6d 69 6e 65 64 20 61 73 |be determined as| 000053d0 20 66 6f 6c 6c 6f 77 73 3a 0a 20 0a 20 61 73 70 | follows:. . asp| 000053e0 65 63 74 20 72 61 74 69 6f 20 3d 20 28 58 52 2f |ect ratio = (XR/| 000053f0 58 44 29 2f 28 59 52 2f 59 44 29 0a 20 0a 20 77 |XD)/(YR/YD). . w| 00005400 68 65 72 65 3a 0a 20 0a 20 58 52 20 3d 20 58 20 |here:. . XR = X | 00005410 72 65 73 6f 6c 75 74 69 6f 6e 20 6f 66 20 6d 6f |resolution of mo| 00005420 6e 69 74 6f 72 0a 20 58 44 20 3d 20 77 69 64 74 |nitor. XD = widt| 00005430 68 20 6f 66 20 6d 6f 6e 69 74 6f 72 20 69 6e 20 |h of monitor in | 00005440 61 72 62 69 74 72 61 72 79 20 75 6e 69 74 73 0a |arbitrary units.| 00005450 20 0a 20 59 52 20 3d 20 59 20 72 65 73 6f 6c 75 | . YR = Y resolu| 00005460 74 69 6f 6e 20 6f 66 20 6d 6f 6e 69 74 6f 72 0a |tion of monitor.| 00005470 20 59 44 20 3d 20 68 65 69 67 68 74 20 6c 65 6e | YD = height len| 00005480 67 74 68 20 6f 66 20 6d 6f 6e 69 74 6f 72 20 69 |gth of monitor i| 00005490 6e 20 61 72 62 69 74 72 61 72 79 20 75 6e 69 74 |n arbitrary unit| 000054a0 73 0a 20 0a 20 50 61 72 61 6d 65 74 65 72 73 20 |s. . Parameters | 000054b0 28 6f 70 74 69 6f 6e 61 6c 29 3a 0a 20 0a 20 6e |(optional):. . n| 000054c0 6f 5f 73 68 61 64 6f 77 20 3a 20 51 52 54 20 77 |o_shadow : QRT w| 000054d0 69 6c 6c 20 6e 6f 74 20 63 6f 6d 70 75 74 65 0a |ill not compute.| 000054e0 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 61 | sha| 000054f0 64 6f 77 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a |dow information.| 00005500 20 0a 20 74 68 72 65 73 68 6f 6c 64 20 3d 20 70 | . threshold = p| 00005510 20 3a 20 51 52 54 20 77 69 6c 6c 20 73 74 6f 70 | : QRT will stop| 00005520 20 74 72 61 63 69 6e 67 0a 20 20 20 20 20 20 20 | tracing. | 00005530 20 20 20 20 20 20 20 20 20 20 72 65 66 6c 65 63 | reflec| 00005540 74 65 64 20 6f 72 20 74 72 61 6e 73 6d 69 74 74 |ted or transmitt| 00005550 65 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ed. | 00005560 20 20 20 20 72 61 79 73 20 77 68 65 6e 20 74 68 | rays when th| 00005570 65 79 20 72 65 61 63 68 20 74 68 69 73 0a 20 20 |ey reach this. | 00005580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 | p| 00005590 65 72 63 65 6e 74 20 6f 66 20 74 68 65 69 72 20 |ercent of their | 000055a0 6f 72 69 67 69 6e 61 6c 0a 20 20 20 20 20 20 20 |original. | 000055b0 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 6e 73 | intens| 000055c0 69 74 79 2e 0a 20 0a 20 78 5f 72 65 73 20 3d 20 |ity.. . x_res = | 000055d0 70 20 3a 20 58 20 69 6d 61 67 65 20 72 65 73 6f |p : X image reso| 000055e0 6c 75 74 69 6f 6e 2e 20 41 6e 79 0a 20 20 20 20 |lution. Any. | 000055f0 20 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 6e 64 | command| 00005600 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 0a | line arguments.| 00005610 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 | ove| 00005620 72 72 69 64 65 20 74 68 69 73 20 70 61 72 61 6d |rride this param| 00005630 65 74 65 72 2e 0a 20 0a 20 78 5f 72 65 73 20 3d |eter.. . x_res =| 00005640 20 70 20 3a 20 59 20 69 6d 61 67 65 20 72 65 73 | p : Y image res| 00005650 6f 6c 75 74 69 6f 6e 2e 20 41 6e 79 0a 20 20 20 |olution. Any. | 00005660 20 20 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 6e | comman| 00005670 64 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 |d line arguments| 00005680 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 |. ov| 00005690 65 72 72 69 64 65 20 74 68 69 73 20 70 61 72 61 |erride this para| 000056a0 6d 65 74 65 72 2e 0a 20 0a 20 61 73 70 65 63 74 |meter.. . aspect| 000056b0 20 3d 20 70 20 3a 20 69 6d 61 67 65 20 61 73 70 | = p : image asp| 000056c0 65 63 74 20 72 61 74 69 6f 2e 20 54 68 69 73 0a |ect ratio. This.| 000056d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 | is| 000056e0 20 63 6f 6d 70 75 74 65 72 20 61 6e 64 20 72 65 | computer and re| 000056f0 73 6f 6c 75 74 69 6f 6e 0a 20 20 20 20 20 20 20 |solution. | 00005700 20 20 20 20 20 20 20 64 65 70 65 6e 64 65 6e 74 | dependent| 00005710 2e 0a 20 0a 20 61 6d 62 20 20 20 20 20 20 3d 20 |.. . amb = | 00005720 28 72 2c 67 2c 62 29 20 3a 20 61 6d 62 69 65 6e |(r,g,b) : ambien| 00005730 74 20 6c 69 67 68 74 0a 20 64 69 66 66 20 20 20 |t light. diff | 00005740 20 20 3d 20 28 72 2c 67 2c 62 29 20 3a 20 64 69 | = (r,g,b) : di| 00005750 66 66 75 73 65 20 72 65 66 6c 65 63 74 69 6f 6e |ffuse reflection| 00005760 0a 20 74 72 61 6e 73 20 20 20 20 3d 20 28 72 2c |. trans = (r,| 00005770 67 2c 62 29 20 3a 20 74 72 61 6e 73 6d 69 73 73 |g,b) : transmiss| 00005780 69 6f 6e 0a 20 64 65 6e 73 69 74 79 20 20 3d 20 |ion. density = | 00005790 28 72 2c 67 2c 62 29 20 3a 20 6c 69 67 68 74 20 |(r,g,b) : light | 000057a0 61 74 74 65 6e 75 61 74 69 6f 6e 0a 20 6d 69 72 |attenuation. mir| 000057b0 72 6f 72 20 20 20 3d 20 28 72 2c 67 2c 62 29 20 |ror = (r,g,b) | 000057c0 3a 20 6d 69 72 72 6f 72 20 72 65 66 6c 65 63 74 |: mirror reflect| 000057d0 69 6f 6e 0a 20 66 75 7a 7a 20 20 20 20 20 3d 20 |ion. fuzz = | 000057e0 69 20 20 20 20 20 20 20 3a 20 63 75 72 72 65 6e |i : curren| 000057f0 74 6c 79 20 75 6e 75 73 65 64 0a 20 69 6e 64 65 |tly unused. inde| 00005800 78 20 20 20 20 3d 20 70 20 20 20 20 20 20 20 3a |x = p :| 00005810 20 69 6e 64 65 78 20 6f 66 20 72 65 66 72 61 63 | index of refrac| 00005820 74 69 6f 6e 0a 20 64 69 74 68 65 72 20 20 20 3d |tion. dither =| 00005830 20 69 20 20 20 20 20 20 20 3a 20 64 69 74 68 65 | i : dithe| 00005840 72 69 6e 67 0a 20 73 72 65 66 6c 65 63 74 20 3d |ring. sreflect =| 00005850 20 70 20 20 20 20 20 20 20 3a 20 50 68 6f 6e 67 | p : Phong| 00005860 20 73 70 65 63 75 6c 61 72 20 72 65 66 6c 2e 20 | specular refl. | 00005870 63 6f 65 66 66 2e 0a 20 72 65 66 6c 65 63 74 20 |coeff.. reflect | 00005880 20 3d 20 70 20 20 20 20 20 20 20 3a 20 70 65 72 | = p : per| 00005890 63 65 6e 74 20 73 70 65 63 75 6c 61 72 20 72 65 |cent specular re| 000058a0 66 6c 65 63 74 69 6f 6e 0a 20 0a 20 45 78 61 6d |flection. . Exam| 000058b0 70 6c 65 3a 0a 20 0a 20 44 45 46 41 55 4c 54 20 |ple:. . DEFAULT | 000058c0 28 20 6e 6f 5f 73 68 61 64 6f 77 2c 20 20 20 20 |( no_shadow, | 000058d0 20 20 20 7b 20 2a 20 6e 6f 20 73 68 61 64 6f 77 | { * no shadow| 000058e0 69 6e 67 20 2a 20 7d 0a 20 20 20 20 20 20 20 20 |ing * }. | 000058f0 20 20 20 64 69 66 66 20 3d 20 28 31 2c 20 30 2c | diff = (1, 0,| 00005900 20 30 29 20 7b 20 2a 20 64 65 66 61 75 6c 74 20 | 0) { * default | 00005910 3d 20 72 65 64 20 6f 62 6a 65 63 74 73 20 2a 20 |= red objects * | 00005920 7d 0a 20 0a 20 20 20 20 20 20 20 20 20 20 20 78 |}. . x| 00005930 5f 72 65 73 20 3d 20 31 32 38 30 2c 20 20 20 20 |_res = 1280, | 00005940 7b 20 2a 2a 20 42 49 47 20 69 6d 61 67 65 20 2a |{ ** BIG image *| 00005950 2a 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 79 |* }. y| 00005960 5f 72 65 73 20 3d 20 31 30 32 34 2c 0a 20 20 20 |_res = 1024,. | 00005970 20 20 20 20 20 20 20 20 61 73 70 65 63 74 20 3d | aspect =| 00005980 20 2e 38 39 0a 20 20 20 20 20 20 20 20 20 29 3b | .89. );| 00005990 0a |.| 00005991