home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / graphic / qrt / samples.doc < prev    next >
Encoding:
Text File  |  1989-03-26  |  21.8 KB  |  793 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.         
  14.  
  15.         
  16.  
  17.                                QRT Sample Programs
  18.  
  19.         
  20.  
  21.         
  22.  
  23.         Introduction
  24.  
  25.         
  26.  
  27.         The following are actual QRT input  files.  They can be used as a
  28.  
  29.         guide to suggested QRT  indenting  style, or as a quick reference
  30.  
  31.         to QRT commands.  They both use most  of the advanced features of
  32.  
  33.         QRT, and would be good examples of  QRT programming.  These files
  34.  
  35.         require QRT 1.4 or later to run correctly.
  36.  
  37.         
  38.  
  39.         
  40.  
  41.         
  42.  
  43.         File One
  44.  
  45.         
  46.  
  47.            
  48.  
  49.            {**************************************************
  50.  
  51.            
  52.  
  53.                Walls with sphere - demonstrates pattern
  54.  
  55.                mapping to sphere surfaces.
  56.  
  57.            
  58.  
  59.                Rendered with QRT ray tracer on Amiga 1000
  60.  
  61.            
  62.  
  63.                - Steve Koren   8 Jun 88
  64.  
  65.            
  66.  
  67.             **************************************************}
  68.  
  69.            
  70.  
  71.            
  72.  
  73.            FILE_NAME = Wall_Sphere.RAW
  74.  
  75.            
  76.  
  77.            { *********   Some pattern definitions ********** }
  78.  
  79.            
  80.  
  81.            PATTERN ( x_size = 16,           { ** A stripe pattern ** }
  82.  
  83.                      y_size = 8,            { ** for the sphere ** }
  84.  
  85.                      name   = MIRROR_STRIPE,
  86.  
  87.            
  88.  
  89.                      RECTANGLE (
  90.  
  91.                        start_x = 0, start_y = 0,
  92.  
  93.                        end_x   = 16, end_y   = 4,
  94.  
  95.            
  96.  
  97.                        diff    = (.1, .1, .1),
  98.  
  99.                        mirror  = (.8, .8, .8),
  100.  
  101.                      )
  102.  
  103.                    )
  104.  
  105.            
  106.  
  107.            PATTERN ( x_size = 60,        { ** Checkered pattern ** }
  108.  
  109.                      y_size = 60,
  110.  
  111.                      name   = CHECK,
  112.  
  113.                      RECTANGLE (
  114.  
  115.  
  116.  
  117.  
  118.  
  119.         QRT Ray Tracer               Page 1           QRT Sample Programs
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.                        start_x = 0,
  146.  
  147.                        start_y = 0,
  148.  
  149.                        end_x   = 30,
  150.  
  151.                        end_y   = 30,
  152.  
  153.                        diff    = (.1,1.0,.1),
  154.  
  155.                      )
  156.  
  157.                      RECTANGLE (
  158.  
  159.                        start_x = 30,
  160.  
  161.                        start_y = 30,
  162.  
  163.                        end_x   = 60,
  164.  
  165.                        end_y   = 60,
  166.  
  167.                        diff    = (.1,1.0,.1),
  168.  
  169.                      )
  170.  
  171.                    )
  172.  
  173.            
  174.  
  175.            PATTERN ( x_size = 40,        { ** Checkered pattern ** }
  176.  
  177.                      y_size = 40,
  178.  
  179.                      name   = CHECK_BLUE,
  180.  
  181.                      RECTANGLE (
  182.  
  183.                        start_x = 0,
  184.  
  185.                        start_y = 0,
  186.  
  187.                        end_x   = 20,
  188.  
  189.                        end_y   = 20,
  190.  
  191.                        diff    = (.7,.2,.7)
  192.  
  193.                        amb     = (.32, .32, .32),
  194.  
  195.                        reflect = .55
  196.  
  197.                        sreflect= 20
  198.  
  199.                      )
  200.  
  201.                      RECTANGLE (
  202.  
  203.                        start_x = 20,
  204.  
  205.                        start_y = 20,
  206.  
  207.                        end_x   = 40,
  208.  
  209.                        end_y   = 40,
  210.  
  211.                        diff    = (.7,.5,.7),
  212.  
  213.                        amb     = (.32, .32, .32),
  214.  
  215.                        reflect = .55
  216.  
  217.                        sreflect= 20
  218.  
  219.                      )
  220.  
  221.                    )
  222.  
  223.            PATTERN ( x_size = 80,               { ** brick pattern ** }
  224.  
  225.                      y_size = 50,
  226.  
  227.                      name   = BRICK,
  228.  
  229.                      RECTANGLE (                { 1st half brick 1 }
  230.  
  231.                        start_x = 0, start_y = 2,
  232.  
  233.                        end_x   = 18, end_y   = 23,
  234.  
  235.                        diff    = (1.00, .20, .20);
  236.  
  237.                      )
  238.  
  239.                      RECTANGLE (                { 2nd hald brick 1 }
  240.  
  241.                        start_x = 62, start_y = 2,
  242.  
  243.                        end_x   = 80, end_y   = 23,
  244.  
  245.                        diff    = (1.00, .20, .20);
  246.  
  247.  
  248.  
  249.  
  250.  
  251.         QRT Ray Tracer               Page 2           QRT Sample Programs
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.                      )
  278.  
  279.                      RECTANGLE (                { brick 2 }
  280.  
  281.                        start_x = 22, start_y = 2,
  282.  
  283.                        end_x   = 58, end_y   = 23,
  284.  
  285.                        diff    = (.80, .20, .20);
  286.  
  287.                      )
  288.  
  289.                      RECTANGLE (                { brick 3 }
  290.  
  291.                        start_x = 2, start_y = 27,
  292.  
  293.                        end_x   = 38, end_y   = 48,
  294.  
  295.                        diff    = (.85, .35, .10);
  296.  
  297.                      )
  298.  
  299.                      RECTANGLE (                { brick 4 }
  300.  
  301.                        start_x = 42, start_y = 27,
  302.  
  303.                        end_x   = 78, end_y   = 48,
  304.  
  305.                        diff    = (.70, .25, .20);
  306.  
  307.                      )
  308.  
  309.                    )
  310.  
  311.            
  312.  
  313.            { *******************  OBJECTS  ******************* }
  314.  
  315.            
  316.  
  317.            { ** ground ** }
  318.  
  319.            
  320.  
  321.            PARALLELOGRAM ( loc  = (  -10000, 0,  -10000),
  322.  
  323.                            v1   = (20000, 0,    0),
  324.  
  325.                            v2   = (  0, 0, 20000),
  326.  
  327.            
  328.  
  329.                            diff = (  .8, .8, 0),
  330.  
  331.                            pattern = CHECK
  332.  
  333.                            xmult = 2
  334.  
  335.                            ymult = 2
  336.  
  337.                          )
  338.  
  339.            
  340.  
  341.            
  342.  
  343.            BEGIN_BBOX
  344.  
  345.            
  346.  
  347.                BEGIN_BBOX
  348.  
  349.            
  350.  
  351.                    SPHERE ( loc = (200, 50, -80),
  352.  
  353.                             radius = 35,
  354.  
  355.                             diff = (.7, .3, .5),
  356.  
  357.            
  358.  
  359.                             pattern = MIRROR_STRIPE,
  360.  
  361.                             xmult   = 1.5,
  362.  
  363.                             ymult   = 1.5
  364.  
  365.                           )
  366.  
  367.            
  368.  
  369.                    QUADRATIC ( loc = (200, 0, -80),
  370.  
  371.            
  372.  
  373.                                a    = 1,
  374.  
  375.                                b    = 0,
  376.  
  377.                                c    = 1,
  378.  
  379.  
  380.  
  381.  
  382.  
  383.         QRT Ray Tracer               Page 3           QRT Sample Programs
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.                                d    = 150,
  410.  
  411.                                xmin = -13,
  412.  
  413.                                xmax = 13,
  414.  
  415.                                ymin = 0,
  416.  
  417.                                ymax = 50,
  418.  
  419.                                zmin = -13,
  420.  
  421.                                zmax = 13,
  422.  
  423.            
  424.  
  425.                                diff = (.1, .1, .1),
  426.  
  427.                                mirror = (.8, .8, .8)
  428.  
  429.                              )
  430.  
  431.            
  432.  
  433.                END_BBOX
  434.  
  435.            
  436.  
  437.            
  438.  
  439.                BEGIN_BBOX
  440.  
  441.            
  442.  
  443.                    SPHERE ( loc      = (200, 90, 80),
  444.  
  445.                             radius   = 35,
  446.  
  447.                             diff     = (.3, .3, .8),
  448.  
  449.                             amb      = (.32, .32, .32),
  450.  
  451.                             reflect  = .40
  452.  
  453.                             sreflect = 20
  454.  
  455.            
  456.  
  457.                             pattern = CHECK_BLUE,
  458.  
  459.                             xmult   = 1.0,
  460.  
  461.                             ymult   = 1.0
  462.  
  463.                           )
  464.  
  465.            
  466.  
  467.                    QUADRATIC ( loc = (200, 0, 80),
  468.  
  469.            
  470.  
  471.                                a    = 1,
  472.  
  473.                                b    = 0,
  474.  
  475.                                c    = 1,
  476.  
  477.                                d    = 150,
  478.  
  479.                                xmin = -13,
  480.  
  481.                                xmax = 13,
  482.  
  483.                                ymin = 0,
  484.  
  485.                                ymax = 90,
  486.  
  487.                                zmin = -13,
  488.  
  489.                                zmax = 13,
  490.  
  491.            
  492.  
  493.                                diff = (.1, .1, .1),
  494.  
  495.                                mirror = (.8, .8, .8)
  496.  
  497.                              )
  498.  
  499.            
  500.  
  501.                END_BBOX
  502.  
  503.            
  504.  
  505.            END_BBOX
  506.  
  507.            
  508.  
  509.            
  510.  
  511.  
  512.  
  513.  
  514.  
  515.         QRT Ray Tracer               Page 4           QRT Sample Programs
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.            BEGIN_BBOX
  542.  
  543.            
  544.  
  545.                { ** a small brick wall ** }
  546.  
  547.            
  548.  
  549.                PARALLELOGRAM ( loc = (150, 00, -15),
  550.  
  551.                                v1  = (0, 0, 30),
  552.  
  553.                                v2  = (0, 100, 0)
  554.  
  555.            
  556.  
  557.                                diff = (1, 1, 1),
  558.  
  559.                                pattern = BRICK
  560.  
  561.            
  562.  
  563.                                xmult = .5,
  564.  
  565.                                ymult = .5
  566.  
  567.                              )
  568.  
  569.            
  570.  
  571.                PARALLELOGRAM ( loc = (150, 00, -15),
  572.  
  573.                                v1  = (100, 0, 0),
  574.  
  575.                                v2  = (0, 100, 0)
  576.  
  577.            
  578.  
  579.                                diff = (1, 1, 1),
  580.  
  581.                                pattern = BRICK
  582.  
  583.            
  584.  
  585.                                xmult = .5,
  586.  
  587.                                ymult = .5
  588.  
  589.                              )
  590.  
  591.            
  592.  
  593.                PARALLELOGRAM ( loc = (150, 00, 15),
  594.  
  595.                                v1  = (100, 0, 0),
  596.  
  597.                                v2  = (0, 100, 0)
  598.  
  599.            
  600.  
  601.                                diff = (1, 1, 1),
  602.  
  603.                                pattern = BRICK
  604.  
  605.            
  606.  
  607.                                xmult = .5,
  608.  
  609.                                ymult = .5
  610.  
  611.                              )
  612.  
  613.            
  614.  
  615.            END_BBOX
  616.  
  617.            
  618.  
  619.            
  620.  
  621.            { ** An observer ** }
  622.  
  623.            
  624.  
  625.            OBSERVER ( loc    = (-20 , 70, -40),
  626.  
  627.                       lookat = (200, 50, 0)
  628.  
  629.                     )
  630.  
  631.            
  632.  
  633.            { ** A lamp ** }
  634.  
  635.            
  636.  
  637.            LAMP ( loc = (120, 120, -50),
  638.  
  639.                   radius = 5,
  640.  
  641.                   dist = 80
  642.  
  643.  
  644.  
  645.  
  646.  
  647.         QRT Ray Tracer               Page 5           QRT Sample Programs
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.                 )
  674.  
  675.            
  676.  
  677.            LAMP ( loc = (120, 150, 80),
  678.  
  679.                   radius = 5,
  680.  
  681.                   dist = 70
  682.  
  683.                 )
  684.  
  685.            
  686.  
  687.            SKY  ( horiz  = (.2, .2, .55),
  688.  
  689.                   zenith = (.1, .1, .25),
  690.  
  691.                   dither = 4
  692.  
  693.                 )
  694.  
  695.            
  696.  
  697.            DEFAULT ( x_res = 320,      { ** parameters for Amiga ** }
  698.  
  699.                      y_res = 400
  700.  
  701.                      aspect= .56
  702.  
  703.                    )
  704.  
  705.            
  706.  
  707.            FOC_LENGTH = 50
  708.  
  709.            
  710.  
  711.            
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.         QRT Ray Tracer               Page 6           QRT Sample Programs
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.            
  806.  
  807.         FILE 2
  808.  
  809.            
  810.  
  811.            
  812.  
  813.            { **************************************************
  814.  
  815.            
  816.  
  817.               Glass table with vase and candy bowl.  This
  818.  
  819.               is the first test of glass surfaces, and came out
  820.  
  821.               surprisingly well - it actually does look like
  822.  
  823.               glass!  This image requires QRT 1.4 to run.
  824.  
  825.            
  826.  
  827.               Rendered with QRT rayracing system
  828.  
  829.            
  830.  
  831.               Steve Koren -  23 AUG 88
  832.  
  833.            
  834.  
  835.              ************************************************** }
  836.  
  837.            
  838.  
  839.            
  840.  
  841.            FILE_NAME = Table.RAW
  842.  
  843.            
  844.  
  845.            PATTERN ( x_size = 80,
  846.  
  847.                      y_size = 30,
  848.  
  849.                      name   = BLOCK,
  850.  
  851.            
  852.  
  853.                      RECTANGLE (
  854.  
  855.                        start_x = 3,  start_y = 3,
  856.  
  857.                        end_x   = 77, end_y   = 27,
  858.  
  859.                        diff    = (.8, .7, .4);
  860.  
  861.                      )
  862.  
  863.                    )
  864.  
  865.            
  866.  
  867.            PATTERN ( x_size = 90,
  868.  
  869.                      y_size = 90,
  870.  
  871.                      name   = FLOOR,
  872.  
  873.            
  874.  
  875.                      RECTANGLE (
  876.  
  877.                        start_x = 0,  start_y = 0,
  878.  
  879.                        end_x   = 55, end_y   = 55,
  880.  
  881.                        diff    = (.1, .8, .1)
  882.  
  883.                      )
  884.  
  885.            
  886.  
  887.                      RECTANGLE (
  888.  
  889.                        start_x = 60, start_y = 0
  890.  
  891.                        end_x   = 85  end_y   = 55
  892.  
  893.                        diff    = (.2, .3, .8)
  894.  
  895.                      )
  896.  
  897.            
  898.  
  899.                      RECTANGLE (
  900.  
  901.                        start_x = 0,  start_y = 60
  902.  
  903.                        end_x   = 55  end_y   = 85
  904.  
  905.                        diff    = (.2, .3, .8)
  906.  
  907.  
  908.  
  909.  
  910.  
  911.         QRT Ray Tracer               Page 7           QRT Sample Programs
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.                      )
  938.  
  939.                    )
  940.  
  941.            
  942.  
  943.            BEGIN_INSTANCES
  944.  
  945.            
  946.  
  947.              { ** glass table leg - hollow glass cylender ** }
  948.  
  949.            
  950.  
  951.              NAME = table_leg;
  952.  
  953.              BEGIN_BBOX
  954.  
  955.            
  956.  
  957.                QUADRATIC ( loc     = (0, 0, 0),
  958.  
  959.                            a       = 1, b  = 0, c  = 1,
  960.  
  961.                            d       = 300,
  962.  
  963.            
  964.  
  965.                            xmin    = -18, xmax = 18,
  966.  
  967.                            ymin    = 0,   ymax = 70,
  968.  
  969.                            zmin    = -18, zmax = 18,
  970.  
  971.            
  972.  
  973.                            diff    = (0, 0, 0),
  974.  
  975.                            trans   = (.7, .7, .7),
  976.  
  977.                            mirror  = (.25, .25, .25),
  978.  
  979.                            index   = 1.33,
  980.  
  981.                            density = (.022, .022, .022)
  982.  
  983.                          )
  984.  
  985.            
  986.  
  987.                QUADRATIC ( loc     = (0, 0, 0),
  988.  
  989.                            a       = 1, b  = 0, c  = 1,
  990.  
  991.                            d       = 144,
  992.  
  993.            
  994.  
  995.                            xmin    = -12, xmax = 12,
  996.  
  997.                            ymin    = 0,   ymax = 70,
  998.  
  999.                            zmin    = -12, zmax = 12,
  1000.  
  1001.            
  1002.  
  1003.                            diff    = (0, 0, 0),
  1004.  
  1005.                            trans   = (1, 1, 1),
  1006.  
  1007.                            mirror  = (.1, .1, .1),
  1008.  
  1009.                            index   = 1.33,
  1010.  
  1011.                            density = (.022, .022, .022)
  1012.  
  1013.                          )
  1014.  
  1015.              END_BBOX
  1016.  
  1017.            
  1018.  
  1019.            END_INSTANCES
  1020.  
  1021.            
  1022.  
  1023.            { ******************** GROUND ********************** }
  1024.  
  1025.            
  1026.  
  1027.            PARALLELOGRAM ( loc = (-10000, 0, -10000),
  1028.  
  1029.                            v1  = (0,0, 20000),
  1030.  
  1031.                            v2  = (20000, 0, 0)
  1032.  
  1033.            
  1034.  
  1035.                            diff    = (.1, .1, .1),
  1036.  
  1037.                            pattern = BLOCK
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.         QRT Ray Tracer               Page 8           QRT Sample Programs
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.                          )
  1070.  
  1071.            
  1072.  
  1073.            
  1074.  
  1075.            { ******************** OBJECTS ********************** }
  1076.  
  1077.            
  1078.  
  1079.            { ** FLOOR ** }
  1080.  
  1081.            
  1082.  
  1083.            PARALLELOGRAM ( loc  = (80, .01, -20),
  1084.  
  1085.                            v1   = (240, 0, 0),
  1086.  
  1087.                            v2   = (0, 0, 240),
  1088.  
  1089.                            diff = (0, 0, 0)
  1090.  
  1091.            
  1092.  
  1093.                            pattern = FLOOR
  1094.  
  1095.                            xmult   = .8,
  1096.  
  1097.                            ymult   = .8
  1098.  
  1099.                          )
  1100.  
  1101.            
  1102.  
  1103.            { ** TABLE LEGS ** }
  1104.  
  1105.            
  1106.  
  1107.            BEGIN_BBOX
  1108.  
  1109.              INSTANCE_OF ( name   = table_leg,
  1110.  
  1111.                            loc    = (140, 0, 40)
  1112.  
  1113.                          )
  1114.  
  1115.            
  1116.  
  1117.              INSTANCE_OF ( name   = table_leg,
  1118.  
  1119.                            loc    = (260, 0, 40)
  1120.  
  1121.                          )
  1122.  
  1123.            END_BBOX
  1124.  
  1125.            
  1126.  
  1127.            BEGIN_BBOX
  1128.  
  1129.              INSTANCE_OF ( name   = table_leg,
  1130.  
  1131.                            loc    = (140, 0, 160)
  1132.  
  1133.                          )
  1134.  
  1135.            
  1136.  
  1137.              INSTANCE_OF ( name   = table_leg,
  1138.  
  1139.                            loc    = (260, 0, 160)
  1140.  
  1141.                          )
  1142.  
  1143.            END_BBOX
  1144.  
  1145.            
  1146.  
  1147.            { ** TABLE TOP ** }
  1148.  
  1149.            
  1150.  
  1151.            BEGIN_BBOX
  1152.  
  1153.            
  1154.  
  1155.              PARALLELOGRAM ( loc      = (100, 70, 0),
  1156.  
  1157.                              v1       = (0, 0, 200),
  1158.  
  1159.                              v2       = (200, 0, 0),
  1160.  
  1161.            
  1162.  
  1163.                              diff     = (0, 0, 0),
  1164.  
  1165.                              trans    = (.7, .7, .7),
  1166.  
  1167.                              mirror   = (.23, .23, .23),
  1168.  
  1169.                              index    = 1.33,
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.         QRT Ray Tracer               Page 9           QRT Sample Programs
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.                              density  = (.015, .015, .015)
  1202.  
  1203.                            )
  1204.  
  1205.            
  1206.  
  1207.              PARALLELOGRAM ( loc      = (100, 85, 0),
  1208.  
  1209.                              v1       = (0, 0, 200),
  1210.  
  1211.                              v2       = (200, 0, 0),
  1212.  
  1213.            
  1214.  
  1215.                              diff     = (0, 0, 0),
  1216.  
  1217.                              trans    = (1, 1, 1),
  1218.  
  1219.                              mirror   = (.25, .25, .25),
  1220.  
  1221.                              index    = 1.33,
  1222.  
  1223.                              density  = (.015, .015, .015)
  1224.  
  1225.                            )
  1226.  
  1227.            
  1228.  
  1229.            
  1230.  
  1231.              { ** SIDES ** }
  1232.  
  1233.            
  1234.  
  1235.              PARALLELOGRAM ( loc = (100, 70, 0),
  1236.  
  1237.                              v1  = (0, 0, 200),
  1238.  
  1239.                              v2  = (0, 15, 0),
  1240.  
  1241.            
  1242.  
  1243.                              diff     = (0, 0, 0),
  1244.  
  1245.                              trans    = (.7, .7, .7),
  1246.  
  1247.                              mirror   = (.23, .23, .23),
  1248.  
  1249.                              index    = 1.33,
  1250.  
  1251.                              density  = (.016, .016, .016)
  1252.  
  1253.                            )
  1254.  
  1255.            
  1256.  
  1257.              PARALLELOGRAM ( loc = (100, 70, 0),
  1258.  
  1259.                              v1  = (200, 0, 0),
  1260.  
  1261.                              v2  = (0, 15, 0),
  1262.  
  1263.            
  1264.  
  1265.                              diff     = (0, 0, 0),
  1266.  
  1267.                              trans    = (.7, .7, .7),
  1268.  
  1269.                              mirror   = (.23, .23, .23),
  1270.  
  1271.                              index    = 1.33,
  1272.  
  1273.                              density  = (.016, .016, .016)
  1274.  
  1275.                            )
  1276.  
  1277.            
  1278.  
  1279.              PARALLELOGRAM ( loc = (100, 70, 200),
  1280.  
  1281.                              v1  = (200, 0, 0),
  1282.  
  1283.                              v2  = (0, 15, 0),
  1284.  
  1285.            
  1286.  
  1287.                              diff     = (0, 0, 0),
  1288.  
  1289.                              trans    = (.7, .7, .7),
  1290.  
  1291.                              mirror   = (.23, .23, .23),
  1292.  
  1293.                              index    = 1.33,
  1294.  
  1295.                              density  = (.016, .016, .016)
  1296.  
  1297.                            )
  1298.  
  1299.            
  1300.  
  1301.              PARALLELOGRAM ( loc = (300, 70, 0),
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.         QRT Ray Tracer               Page 10          QRT Sample Programs
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.                              v1  = (0, 0, 200),
  1334.  
  1335.                              v2  = (0, 15, 0),
  1336.  
  1337.            
  1338.  
  1339.                              diff     = (0, 0, 0),
  1340.  
  1341.                              trans    = (.7, .7, .7),
  1342.  
  1343.                              mirror   = (.23, .23, .23),
  1344.  
  1345.                              index    = 1.33,
  1346.  
  1347.                              density  = (.016, .016, .016)
  1348.  
  1349.                            )
  1350.  
  1351.            
  1352.  
  1353.            END_BBOX
  1354.  
  1355.            
  1356.  
  1357.            { ** CANDY BOWL  & VASE ** }
  1358.  
  1359.            
  1360.  
  1361.            BEGIN_BBOX
  1362.  
  1363.            
  1364.  
  1365.              BEGIN_BBOX
  1366.  
  1367.                QUADRATIC ( loc     = (200, 100, 100),
  1368.  
  1369.                            a       = 1, b  = 2, c  = 1,
  1370.  
  1371.                            d       = 900,
  1372.  
  1373.            
  1374.  
  1375.                            xmin    = -30, xmax = 30,
  1376.  
  1377.                            ymin    = -15, ymax = 0,
  1378.  
  1379.                            zmin    = -30, zmax = 30,
  1380.  
  1381.            
  1382.  
  1383.                            diff    = (1, .1, .1),
  1384.  
  1385.                            reflect = .8
  1386.  
  1387.                            sreflect= 20
  1388.  
  1389.                          )
  1390.  
  1391.            
  1392.  
  1393.                SPHERE   ( loc      = (185, 95, 110),
  1394.  
  1395.                           radius   = 7,
  1396.  
  1397.                           diff     = (.1, .1, 1)
  1398.  
  1399.                         )
  1400.  
  1401.            
  1402.  
  1403.                SPHERE   ( loc      = (200, 93, 80),
  1404.  
  1405.                           radius   = 7,
  1406.  
  1407.                           diff     = (.1, 1, .1)
  1408.  
  1409.                         )
  1410.  
  1411.            
  1412.  
  1413.              END_BBOX
  1414.  
  1415.            
  1416.  
  1417.              { ** VASE ** }
  1418.  
  1419.            
  1420.  
  1421.              BEGIN_BBOX
  1422.  
  1423.            
  1424.  
  1425.                QUADRATIC ( loc     = (260, 85, 50),
  1426.  
  1427.                            a       = 1, b = 0, c = 1,
  1428.  
  1429.                            d       = 100,
  1430.  
  1431.            
  1432.  
  1433.                            xmin    = -10, xmax = 10,
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.         QRT Ray Tracer               Page 11          QRT Sample Programs
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.                            ymin    = 0,   ymax = 50,
  1466.  
  1467.                            zmin    = -10, zmax = 10,
  1468.  
  1469.            
  1470.  
  1471.                            diff    = (.1, .7, .1),
  1472.  
  1473.                            reflect = .7,
  1474.  
  1475.                            sreflect=20
  1476.  
  1477.                          )
  1478.  
  1479.              END_BBOX
  1480.  
  1481.            
  1482.  
  1483.            END_BBOX
  1484.  
  1485.            
  1486.  
  1487.            OBSERVER ( loc    = (-50, 180, -30)
  1488.  
  1489.                       lookat = (180, 50, 100)
  1490.  
  1491.                     )
  1492.  
  1493.            
  1494.  
  1495.            SKY ( horiz  = (.10, .1, .75)
  1496.  
  1497.                  zenith = (.10, .1, .60)
  1498.  
  1499.                  dither = 4
  1500.  
  1501.                )
  1502.  
  1503.            
  1504.  
  1505.            LAMP ( loc = (150, 250, -80)
  1506.  
  1507.                   radius = 5,
  1508.  
  1509.                   dist = 250
  1510.  
  1511.                 )
  1512.  
  1513.            
  1514.  
  1515.            LAMP ( loc = (250, 50, 250),
  1516.  
  1517.                   radius = 5,
  1518.  
  1519.                   dist   = 60
  1520.  
  1521.                 )
  1522.  
  1523.            
  1524.  
  1525.            
  1526.  
  1527.            DEFAULT ( x_res = 320,       { Amiga parameters }
  1528.  
  1529.                      y_res = 400
  1530.  
  1531.                      aspect= .56
  1532.  
  1533.                    )
  1534.  
  1535.            
  1536.  
  1537.            FOC_LENGTH = 50
  1538.  
  1539.            
  1540.  
  1541.            
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.         QRT Ray Tracer               Page 12          QRT Sample Programs
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.