home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / pov / legoka / legoka.pov < prev   
Encoding:
Text File  |  1994-05-18  |  19.7 KB  |  656 lines

  1. /*********************************************************************
  2.                             LEGOKA.POV
  3.  
  4. Usage:  A Persistence of Vision 2.0 scene file. See also LEGOBITS.INC,
  5.         which provides the construction units from which the LEGO
  6.         objects are constructed. This scene file makes no use of the
  7.         standard POV include files, so it may be of interest if you
  8.         are looking for a fairly self-contained tutorial example.
  9.  
  10. Author: Peter Middlestorb
  11.         CIS:100065,3267
  12.         May 1994
  13.  
  14. Status: Public domain. Fold, spindle or mutilate as you see fit.
  15.  
  16. Acknowledgements:
  17.  
  18.         LEGO is a registered trademark of LEGO Group.
  19.         Much kudos to the POV-Ray Team for producing the excellent
  20.         and freely available Persistence of Vision Raytracer.
  21. *********************************************************************/
  22.  
  23. /*********************************************************************
  24. include
  25. *********************************************************************/
  26. #include "legobits.inc"
  27.  
  28. /*********************************************************************
  29. texture, finish and color declarations
  30. *********************************************************************/
  31.  
  32. //========== pigment for desktop ==========
  33. #declare pigDesktop = pigment {
  34.     wood
  35.     turbulence 0.2
  36.     color_map {
  37.         [0.0, 0.2   color red 0.7 green 0.23333 blue 0.11666
  38.                     color red 0.6 green 0.20000 blue 0.10000]
  39.         [0.2, 0.7   color red 0.6 green 0.20000 blue 0.10000
  40.                     color red 0.7 green 0.23333 blue 0.11666]
  41.         [0.7, 0.8   color red 0.7 green 0.23333 blue 0.11666
  42.                     color red 0.4 green 0.13333 blue 0.06666]
  43.         [0.8, 1.0   color red 0.4 green 0.13333 blue 0.06666
  44.                     color red 0.2 green 0.06666 blue 0.03333]
  45.     }
  46. }
  47.  
  48. //========== colours for graph paper ==========
  49. #declare colSheet = color red 0.95 green 0.95 blue 0.8
  50. #declare colGrid = color red 0.0 green 0.4 blue 0.0
  51. #declare colLead = color red 0.25 green 0.25 blue 0.25
  52.  
  53. //========== colour, pigment and texture for drawing implements ==========
  54. #declare pigPencil = pigment {
  55.     wood
  56.     turbulence 0.1
  57.     color_map {
  58.         [0.0, 0.7   color red 0.9 green 0.36 blue 0.18
  59.                     color red 0.9 green 0.36 blue 0.18]
  60.         [0.7, 1.0   color red 0.6 green 0.20 blue 0.10
  61.                     color red 0.6 green 0.20 blue 0.10]
  62.     }
  63.     rotate <0, 90, 0>
  64.     scale <0.8, 0.8, 0.8>
  65. }
  66.  
  67. #declare texPencil = texture {
  68.     pigment {pigPencil}
  69.     finish {
  70.         brilliance 2.0
  71.         phong 0.8
  72.         phong_size 80
  73.     }
  74. }
  75.  
  76. #declare colEraser = color red 0.2 green 0.65 blue 0.2
  77.  
  78. //========== plastic finishes ==========
  79. #declare finShinyPlastic = finish {
  80.     brilliance 3.0
  81.     reflection 0.15
  82.     phong 1.0
  83.     phong_size 130
  84. }
  85.  
  86. #declare finMattPlastic = finish {
  87.     brilliance 2.0
  88.     phong 1.0
  89.     phong_size 130
  90. }
  91.  
  92. //========== plastics for car ==========
  93. #declare texShinyRedPlastic = texture {
  94.     pigment {color red 1.7 green 0.0 blue 0.0}  // note "unnatural" value
  95.     finish {finShinyPlastic}
  96. }
  97.  
  98. #declare texShinyYellowPlastic = texture {
  99.     pigment {color red 1.6 green 1.6 blue 0.0}  // note "unnatural" value
  100.     finish {finShinyPlastic}
  101. }
  102.  
  103. #declare texShinyGreyPlastic = texture {
  104.     pigment {color red 0.98 green 0.98 blue 0.98}
  105.     finish {finShinyPlastic}
  106. }
  107.  
  108. #declare texMattGreyPlastic = texture {
  109.     pigment {color red 0.98 green 0.98 blue 0.98}
  110.     finish {finMattPlastic}
  111. }
  112.  
  113. #declare texShinyBlackPlastic = texture {
  114.     pigment {color red 0.3 green 0.3 blue 0.3}
  115.     finish {finShinyPlastic}
  116. }
  117.  
  118. #declare texMattBlackPlastic = texture {
  119.     pigment {color red 0.3 green 0.3 blue 0.3}
  120.     finish {finMattPlastic}
  121. }
  122.  
  123. //========== working colours - declared as needed ==========
  124. #declare colWhite = color red 1.0 green 1.0 blue 1.0
  125. #declare colGreen = color green 1.0
  126. #declare colBlue = color blue 1.0
  127.  
  128. /*********************************************************************
  129. graph paper sub-assemblies
  130. *********************************************************************/
  131.  
  132. //========== A4 sheet ==========
  133. #declare objSheet = difference {
  134.     box {<0.0, 0.0, 0.0> <210.0, 0.1, 297.0>}
  135.     cylinder {<12.0, -0.1, 107.0>, <12.0, 0.2, 107.0> 3.0}
  136.     cylinder {<12.0, -0.1, 187.0>, <12.0, 0.2, 187.0> 3.0}
  137. }
  138.  
  139. //========== grid for A4 10mm graph paper ==========
  140. #declare objGrid = union {
  141.     box {<20.0, 0.1,  10.0> <200.3, 0.11,  10.3>}
  142.     box {<20.0, 0.1,  20.0> <200.3, 0.11,  20.3>}
  143.     box {<20.0, 0.1,  30.0> <200.3, 0.11,  30.3>}
  144.     box {<20.0, 0.1,  40.0> <200.3, 0.11,  40.3>}
  145.     box {<20.0, 0.1,  50.0> <200.3, 0.11,  50.3>}
  146.     box {<20.0, 0.1,  60.0> <200.3, 0.11,  60.3>}
  147.     box {<20.0, 0.1,  70.0> <200.3, 0.11,  70.3>}
  148.     box {<20.0, 0.1,  80.0> <200.3, 0.11,  80.3>}
  149.     box {<20.0, 0.1,  90.0> <200.3, 0.11,  90.3>}
  150.     box {<20.0, 0.1, 100.0> <200.3, 0.11, 100.3>}
  151.     box {<20.0, 0.1, 110.0> <200.3, 0.11, 110.3>}
  152.     box {<20.0, 0.1, 120.0> <200.3, 0.11, 120.3>}
  153.     box {<20.0, 0.1, 130.0> <200.3, 0.11, 130.3>}
  154.     box {<20.0, 0.1, 140.0> <200.3, 0.11, 140.3>}
  155.     box {<20.0, 0.1, 150.0> <200.3, 0.11, 150.3>}
  156.     box {<20.0, 0.1, 160.0> <200.3, 0.11, 160.3>}
  157.     box {<20.0, 0.1, 170.0> <200.3, 0.11, 170.3>}
  158.     box {<20.0, 0.1, 180.0> <200.3, 0.11, 180.3>}
  159.     box {<20.0, 0.1, 190.0> <200.3, 0.11, 190.3>}
  160.     box {<20.0, 0.1, 200.0> <200.3, 0.11, 200.3>}
  161.     box {<20.0, 0.1, 210.0> <200.3, 0.11, 210.3>}
  162.     box {<20.0, 0.1, 220.0> <200.3, 0.11, 220.3>}
  163.     box {<20.0, 0.1, 230.0> <200.3, 0.11, 230.3>}
  164.     box {<20.0, 0.1, 240.0> <200.3, 0.11, 240.3>}
  165.     box {<20.0, 0.1, 250.0> <200.3, 0.11, 250.3>}
  166.     box {<20.0, 0.1, 260.0> <200.3, 0.11, 260.3>}
  167.     box {<20.0, 0.1, 270.0> <200.3, 0.11, 270.3>}
  168.     box {<20.0, 0.1, 280.0> <200.3, 0.11, 280.3>}
  169.     box {< 20.0, 0.1, 10.0> < 20.3, 0.11, 280.3>}
  170.     box {< 30.0, 0.1, 10.0> < 30.3, 0.11, 280.3>}
  171.     box {< 40.0, 0.1, 10.0> < 40.3, 0.11, 280.3>}
  172.     box {< 50.0, 0.1, 10.0> < 50.3, 0.11, 280.3>}
  173.     box {< 60.0, 0.1, 10.0> < 60.3, 0.11, 280.3>}
  174.     box {< 70.0, 0.1, 10.0> < 70.3, 0.11, 280.3>}
  175.     box {< 80.0, 0.1, 10.0> < 80.3, 0.11, 280.3>}
  176.     box {< 90.0, 0.1, 10.0> < 90.3, 0.11, 280.3>}
  177.     box {<100.0, 0.1, 10.0> <100.3, 0.11, 280.3>}
  178.     box {<110.0, 0.1, 10.0> <110.3, 0.11, 280.3>}
  179.     box {<120.0, 0.1, 10.0> <120.3, 0.11, 280.3>}
  180.     box {<130.0, 0.1, 10.0> <130.3, 0.11, 280.3>}
  181.     box {<140.0, 0.1, 10.0> <140.3, 0.11, 280.3>}
  182.     box {<150.0, 0.1, 10.0> <150.3, 0.11, 280.3>}
  183.     box {<160.0, 0.1, 10.0> <160.3, 0.11, 280.3>}
  184.     box {<170.0, 0.1, 10.0> <170.3, 0.11, 280.3>}
  185.     box {<180.0, 0.1, 10.0> <180.3, 0.11, 280.3>}
  186.     box {<190.0, 0.1, 10.0> <190.3, 0.11, 280.3>}
  187.     box {<200.0, 0.1, 10.0> <200.3, 0.11, 280.3>}
  188. }
  189.  
  190. //========== 2x1 block sketch (scale 2:1) ==========
  191. #declare objSketchBlock2x1 = union {
  192.     box {<-0.2, 0.1, -0.2> <32.2, 0.12,  0.2>}  // bottom
  193.     box {<-0.2 ,0.1, -0.2> < 0.2 ,0.12, 19.4>}  // left
  194.     box {<-0.2 ,0.1, 19.0> <32.2 ,0.12, 19.4>}  // top
  195.     box {<31.8 ,0.1, -0.2> <32.2 ,0.12, 19.4>}  // right
  196.     box {< 2.8 ,0.1, 19.0> < 3.2 ,0.12, 23.0>}  // left pip left
  197.     box {< 2.8 ,0.1, 22.6> <13.2 ,0.12, 23.0>}  // left pip top
  198.     box {<12.8 ,0.1, 19.0> <13.2 ,0.12, 23.0>}  // left pip right
  199.     box {<18.8 ,0.1, 19.0> <19.2 ,0.12, 23.0>}  // right pip left
  200.     box {<18.8 ,0.1, 22.6> <29.2 ,0.12, 23.0>}  // right pip top
  201.     box {<28.8 ,0.1, 19.0> <29.2 ,0.12, 23.0>}  // right pip right
  202. }                
  203.  
  204. #declare objSketchBlockOtrHole = difference {
  205.     cylinder {<0.0, 0.1, 0.0> <0.0, 0.12, 0.0> 6.2}
  206.     cylinder {<0.0, 0.0, 0.0> <0.0, 0.20, 0.0> 5.8}
  207. }
  208.  
  209. #declare objSketchBlockInrHole = difference {
  210.     cylinder {<0.0, 0.1, 0.0> <0.0, 0.12, 0.0> 5.0}
  211.     cylinder {<0.0, 0.0, 0.0> <0.0, 0.20, 0.0> 4.6}
  212. }
  213.  
  214. #declare objSketchHoleBlock2x1 = union {
  215.     object {objSketchBlock2x1}
  216.     object {objSketchBlockOtrHole
  217.         translate <16.0, 0.0, 11.8>
  218.     }
  219.     object {objSketchBlockInrHole
  220.         translate <16.0, 0.0, 11.8>
  221.     }
  222. }
  223.  
  224. //========== wheel sketch (scale 2:1) ==========
  225. #declare objSketchWheelOuter = difference {
  226.     cylinder {<0.0, 0.1, 0.0> <0.0, 0.12, 0.0> 17.2}
  227.     cylinder {<0.0, 0.0, 0.0> <0.0, 0.20, 0.0> 16.8}
  228. }
  229.  
  230. #declare objSketchWheelInner = difference {
  231.     cylinder {<0.0, 0.1, 0.0> <0.0, 0.12, 0.0> 12.2}
  232.     cylinder {<0.0, 0.0, 0.0> <0.0, 0.20, 0.0> 11.8}
  233. }
  234.  
  235. #declare objSketchWheel = union {
  236.     object {objSketchWheelOuter}
  237.     object {objSketchWheelInner}
  238. }
  239.  
  240. /*********************************************************************
  241. drawing implements
  242. *********************************************************************/
  243.  
  244. #declare objPencil = union {
  245.     cone {<0.0, 0.0, 0.0>, 0.0, < 5.0, 0.0, 0.0>, 1.0
  246.         pigment {color colLead}
  247.     }
  248.     cone {<5.0, 0.0, 0.0>, 1.0, <20.0, 0.0, 0.0>, 4.0
  249.         pigment {pigPencil}             // only pigment where sharpened
  250.     }
  251.     cylinder {<20.0, 0.0, 0.0> <140, 0.0, 0.0> 4.0
  252.         texture {texPencil}             // full texture where unsharpened
  253.     }
  254. }
  255.  
  256. #declare objEraser = difference {
  257.     box {<0.0, 0.0, 0.0> <55.0, 8.0, 20.0>}
  258.     plane {x, 0
  259.         rotate <0, 0, -45>
  260.     }
  261.     plane {-x, 0
  262.         rotate <0, 0, -45>
  263.         translate <55.0, 8.0, 0.0>
  264.     }
  265.     pigment {color colEraser}
  266. }
  267.  
  268. /*********************************************************************
  269. car sub-assemblies
  270. *********************************************************************/
  271.  
  272. //========== car body ==========
  273. #declare objCarBody = union {
  274.     object {objBlock2x1                 // rear right outer axle block
  275.         texture {texShinyRedPlastic}
  276.         translate <0.0, -3.2, 0.0>
  277.     }
  278.     object {objBlock2x1                 // rear right inner axle block
  279.         texture {texShinyRedPlastic}
  280.         translate <0.0, -3.2, 8.0>
  281.     }
  282.     object {objBlock2x1                 // rear left inner axle block
  283.         texture {texShinyRedPlastic}
  284.         translate <0.0, -3.2, 16.0>
  285.     }
  286.     object {objBlock2x1                 // rear left outer axle block
  287.         texture {texShinyRedPlastic}
  288.         translate <0.0, -3.2, 24.0>
  289.     }
  290.     object {objSlab4x2                  // rear axle block spacer
  291.         texture {texShinyRedPlastic}
  292.         rotate <0, -90, 0>
  293.         translate <16.0, 6.4, 0.0>
  294.     }
  295.     object {objBlock6x1                 // right side pod
  296.         texture {texShinyRedPlastic}
  297.         translate <16.0, 0.0, 0.0>
  298.     }
  299.     object {objBlock16x1                // right rail
  300.         texture {texShinyRedPlastic}
  301.         translate <16.0, 0.0, 8.0>
  302.     }
  303.     object {objBlock16x1                // left rail
  304.         texture {texShinyRedPlastic}
  305.         translate <16.0, 0.0, 16.0>
  306.     }
  307.     object {objBlock6x1                 // left side pod
  308.         texture {texShinyRedPlastic}
  309.         translate <16.0, 0.0, 24.0>
  310.     }
  311.     object {objSlab8x2                  // top right tie plate
  312.         texture {texShinyRedPlastic}
  313.         translate <0.0, 9.6, 0.0>
  314.     }
  315.     object {objSlab8x2                  // top left tie plate
  316.         texture {texShinyRedPlastic}
  317.         translate <0.0, 9.6, 16.0>
  318.     }
  319.     object {objBlock2x1                 // right seat back block
  320.         texture {texShinyRedPlastic}
  321.         translate <0.0, 12.8, 8.0>
  322.     }
  323.     object {objBlock2x1                 // left back block
  324.         texture {texShinyRedPlastic}
  325.         translate <0.0, 12.8, 16.0>
  326.     }
  327.     object {objBlock2x1                 // parachute
  328.         texture {texShinyYellowPlastic}
  329.         rotate <0, -90, 0>
  330.         translate <8.0, 22.4, 8.0>
  331.     }
  332.     object {objBlock2x1                 // headrest
  333.         texture {texShinyRedPlastic}
  334.         rotate <0, -90, 0>
  335.         translate <16.0, 22.4, 8.0>
  336.     }
  337.     object {objBlock4x1                 // right engine block cylinders
  338.         texture {texShinyGreyPlastic}
  339.         translate <32.0, 12.8, 8.0>
  340.     }
  341.     object {objBlock4x1                 // left engine block cylinders
  342.         texture {texShinyGreyPlastic}
  343.         translate <32.0, 12.8, 16.0>
  344.     }
  345. }
  346.  
  347. //========== rear axle and wheels ==========
  348. #declare objRearWheels = union
  349. {
  350.     object {objRodx6                    // rear axle
  351.         texture {texMattBlackPlastic}
  352.         rotate <0, -90, 0>
  353.     }
  354.     object {objWheel                    // right rear wheel
  355.         texture {texMattGreyPlastic}
  356.     }
  357.     object {objLargeTyre                // right rear tyre
  358.         texture {texShinyBlackPlastic}
  359.         translate <0.0, 0.0, -3.6>
  360.     }
  361.     object {objWheel                    // left rear wheel
  362.         texture {texMattGreyPlastic}
  363.         translate <0.0, 0.0, 40.8>
  364.     }
  365.     object {objLargeTyre                // left rear tyre
  366.         texture {texShinyBlackPlastic}
  367.         rotate <0, 180, 0>
  368.         translate <0.0, 0.0, 51.6>
  369.     }
  370. }
  371.  
  372. //========== front axle and wheels ==========
  373. #declare objFrontWheels = union
  374. {
  375.     object {objRodx4                    // front axle
  376.         texture {texMattBlackPlastic}
  377.         rotate <0, -90, 0>
  378.     }
  379.     object {objWheel                    // right front wheel
  380.         texture {texMattGreyPlastic}
  381.     }
  382.     object {objSmallTyre                // right front tyre
  383.         texture {texShinyBlackPlastic}
  384.     }
  385.     object {objWheel                    // left front wheel
  386.         texture {texMattGreyPlastic}
  387.         translate <0.0, 0.0, 24.8>
  388.     }
  389.     object {objSmallTyre                // left front tyre
  390.         texture {texShinyBlackPlastic}
  391.         translate <0.0, 0.0, 24.8>
  392.     }
  393. }
  394.  
  395. //========== pair of exhaust venturi on linking pipe ==========
  396. #declare objExhaustPair = union {
  397.     object {objRodx4
  398.         texture {texMattBlackPlastic}
  399.         rotate <0, -90, 0>
  400.         rotate <0, 0, 105>              // cant up and back to match exhausts
  401.     }
  402.     object {objRod90LockJoint
  403.         texture {texMattGreyPlastic}
  404.         rotate <0, 0, 105>              // cant from - to 15deg up and back
  405.         translate <0.0, 0.0, 4.0>
  406.     }
  407.     object {objRod90LockJoint
  408.         texture {texMattGreyPlastic}
  409.         rotate <180, 0, 0>
  410.         rotate <0, 0, 105>              // cant from - to 15deg up and back
  411.         translate <0.0, 0.0, 28.0>
  412.     }
  413. }
  414.  
  415. //========== safety cage - inner ==========
  416. #declare objCageInner = union { 
  417.     object {objRodx4                    // seat base cage support
  418.         texture {texMattBlackPlastic}
  419.         rotate <0, -90, 0>
  420.     }
  421.     object {objRod90LockJoint           // join seat base and right support
  422.         texture {texMattGreyPlastic}
  423.         translate <0.0, 0.0, 4.0>
  424.     }
  425.     object {objRod90LockJoint           // join seat base and left support
  426.         texture {texMattGreyPlastic}
  427.         rotate <180, 0, 0>
  428.         translate <0.0, 0.0, 28.0>
  429.     }
  430.     object {objRodx3                    // right support
  431.         texture {texMattBlackPlastic}
  432.         translate <4.0, 0.0, 4.0>
  433.     }
  434.     object {objRodx3                    // left support
  435.         texture {texMattBlackPlastic}
  436.         translate <4.0, 0.0, 28.0>
  437.     }
  438.     object {objRod90Joint               // right join for top rail (unlocked)
  439.         texture {texMattGreyPlastic}
  440.         rotate <0, 0, 180>
  441.         rotate <180, 0, 0>
  442.         translate <33.15650117, 0.0, 4.0>     // not quite seated on support
  443.     }
  444.     object {objRod90Joint               // left join for top rail (unlocked)
  445.         texture {texMattGreyPlastic}
  446.         rotate <0, 0, 180>
  447.         translate <33.15650117, 0.0, 28.0>    // not quite seated on support
  448.     }
  449.     rotate <0, 0, 90>
  450. }
  451.  
  452. //========== safety cage - outer ==========
  453. #declare objCageOuter = union { 
  454.     object {objRodx6                    // chassis cage support
  455.         texture {texMattBlackPlastic}
  456.         rotate <0, -90, 0>
  457.     }
  458.     object {objRod90LockJoint           // join chassis and right diagonal
  459.         texture {texMattGreyPlastic}
  460.         translate <0.0, 0.0, 4.0>
  461.     }
  462.     object {objRod90LockJoint           // join chassis and left diagonal
  463.         texture {texMattGreyPlastic}
  464.         rotate <180, 0, 0>
  465.         translate <0.0, 0.0, 44.0>
  466.     }
  467.     object {objRodx6                    // right diagonal
  468.         texture {texMattBlackPlastic}
  469.         translate <4.0, 0.0, 4.0>
  470.     }
  471.     object {objRodx6                    // left diagonal
  472.         texture {texMattBlackPlastic}
  473.         translate <4.0, 0.0, 44.0>
  474.     }
  475.     object {objRod90LockJoint           // join chassis and right diagonal
  476.         texture {texMattGreyPlastic}
  477.         rotate <0, 0, 180>
  478.         translate <56.0, 0.0, 4.0>
  479.     }
  480.     object {objRod90LockJoint           // join chassis and left diagonal
  481.         texture {texMattGreyPlastic}
  482.         rotate <0, 0, 180>
  483.         rotate <180, 0, 0>
  484.         translate <56.0, 0.0, 44.0>
  485.     }
  486.     object {objRodx6                    // top rail
  487.         texture {texMattBlackPlastic}
  488.         rotate <0, -90, 0>
  489.         translate <56.0, 0.0, 0.0>
  490.     }
  491.     rotate <0, 0, 124.8499046>
  492. }
  493.  
  494. /*********************************************************************
  495. make car from sub-assemblies
  496. *********************************************************************/
  497.  
  498. #declare objCar = union {
  499.     object {objCarBody}
  500.     object {objRearWheels
  501.         rotate <0, 0, -70>              // rotate spokes out of x alignment
  502.         translate <8.0, 2.7, -8.0>
  503.     }
  504.     object {objFrontWheels
  505.         rotate <0, 0, 20>               // rotate spokes out of x alignment
  506.         translate <136.0, 5.9, 0.0>
  507.     }
  508.     object {objExhaustPair              // rear set of exhausts
  509.         translate <40.0, 18.7, 0.0>
  510.     }
  511.     object {objExhaustPair              // middle set of exhausts
  512.         translate <48.0, 18.7, 0.0>
  513.     }
  514.     object {objExhaustPair              // font set of exhausts
  515.         translate <56.0, 18.7, 0.0>
  516.     }
  517.     object {objCageInner                // inner cage assembly
  518.         translate <8.0, 18.7, 0.0>
  519.     }
  520.     object {objCageOuter                // outer cage assembly
  521.         translate <40.0, 5.9, -8.0>
  522.     }
  523. }
  524.  
  525. /*********************************************************************
  526. observer and lights
  527. *********************************************************************/
  528.  
  529. //========== the onlooker ==========
  530. camera {
  531.     location    <320, 380, -200>
  532.     direction   <0, 0, 4.1>
  533.     look_at     <123, 32, 163>
  534. }
  535.  
  536. //========== lighting ==========
  537. light_source {<-1500, 1500, -350>
  538.     color colWhite
  539. }
  540. light_source {<2000, 1000, -150>
  541.     color colWhite
  542. }
  543.  
  544. /*********************************************************************
  545. make the scene from the bits
  546. *********************************************************************/
  547.  
  548. /*
  549. //========== a diagnostic plane only used to check dimensions ==========
  550. plane {y, 0
  551.     texture {
  552.         pigment {checker color colGreen color colBlue}
  553.         scale <8, 8, 8>
  554.     }
  555. }
  556. */
  557.  
  558. //========== a cheap wooden desk top ==========
  559. plane {y, 0
  560.     texture {
  561.         pigment {pigDesktop}
  562.         rotate <0, 90, 0>
  563.         scale <20, 1, 10>
  564.     }
  565. }
  566.  
  567. //========== lay the paper on the desktop ==========
  568. object {objSheet
  569.     pigment {color colSheet}
  570. }
  571.  
  572. //========== drop the grid onto the paper ==========
  573. object {objGrid
  574.     pigment {color colGrid}
  575. }
  576.  
  577. //========== put some sketches on the graph paper ==========
  578. object {objSketchBlock2x1
  579.     pigment {color colLead}
  580.     translate <70, 0, 100>
  581. }
  582. object {objSketchHoleBlock2x1
  583.     pigment {color colLead}
  584.     rotate <0, -90, 0>
  585.     translate <170, 0, 130>
  586. }
  587. object {objSketchWheel
  588.     pigment {color colLead}
  589.     translate <110, 0, 160>
  590. }
  591. object {objSketchWheelOuter
  592.     pigment {color colLead}
  593.     translate <50, 0, 210>
  594. }
  595. object {objSketchWheelOuter
  596.     pigment {color colLead}
  597.     translate <123, 0, 230>
  598. }
  599. object {objSketchWheelInner
  600.     pigment {color colLead}
  601.     translate <128, 0, 250>
  602. }
  603.  
  604. //========== lay the drawing implements on the graph paper ==========
  605. object {objPencil
  606.     rotate <0, 125, 0>
  607.     translate <150, 4, 138>
  608. }
  609.  
  610. object {objEraser
  611.     rotate <0, 115, 0>
  612.     translate <52, 0, 292>
  613. }
  614.  
  615. //========== scatter a few left-over construction blocks ==========
  616. object {objBlock2x1
  617.     texture {texShinyYellowPlastic}
  618.     rotate <0, 0, 90>                   // flip on end
  619.     rotate <0, -105, 0>
  620.     translate <108.0, 0.0, 253.0>
  621. }
  622.  
  623. object {objBlock4x1
  624.         texture {texShinyRedPlastic}
  625.         rotate <90, 0, 0>
  626.         rotate <0, -20, 0>
  627.         translate <114, 8.0, 280>
  628. }
  629.  
  630. object {objBlock2x1
  631.     texture {texShinyRedPlastic}
  632.     rotate <90, 0, 0>
  633.     rotate <0, -82, 0>
  634.     translate <179, 8.0, 130>
  635. }
  636.  
  637. //========== plonk the car onto the graph paper ==========
  638. /*********************************************************************
  639. The cars rear wheels have a radius of 15 and the axle is centred at y=2.7.
  640. The front wheels have a radius of 12.5 and the axle is centred at y=5.9.
  641. As (2.7-15)-(5.9-12.5)=-5.7 the font wheels are y=5.7 too high.
  642. The rear axle centre is x=8 (negligible) and the font axle centre is x=136
  643. so a quick and dirty rotation about the z axis will drop the bottom of the
  644. front wheels down to the approximate level of the bottom of the back wheels.
  645. Angle = arctan (-5.7 / 136.0) = -2.399962632 or -2.4 degrees.
  646. *********************************************************************/
  647. object {objCar
  648.     rotate <0, 0, -2.4>
  649.     rotate <0, -18, 0>
  650.     translate <58, 12.3, 133>
  651. }
  652.  
  653. /*********************************************************************
  654. End of LEGOKA.POV
  655. *********************************************************************/
  656.