home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / lysdat / lilys.pov < prev   
Text File  |  1993-02-19  |  8KB  |  366 lines

  1. //  Persistance of Vision Raytracer V1.0
  2. //
  3. //  "Lilys", a raytrace by Douglas Otwell
  4. //  Copyright 1993, Douglas Otwell
  5.  
  6. #include "colors.inc"
  7. #include "textures.inc"
  8. #include "shapes.inc"
  9.  
  10. camera {  //  Camera cam1
  11.   location  <0.2 5.0 -8.0>
  12.   direction <0.0  0.0  2.0>
  13.   sky       <0.0  1.0  0.0>
  14.   up        <0.0  1.0  0.0>
  15.   right     <1.3333  0.0  0.0>
  16.   look_at   <0.000 1.0 0.000>
  17. }
  18.  
  19. object {
  20.    light_source {
  21.       <0 20 -12> 
  22.       color White
  23.       spotlight
  24.       point_at <-1 0.5 3>
  25.       tightness 2
  26.       radius 3
  27.       falloff 8
  28.    }
  29. }
  30. object {
  31.    light_source {
  32.       <2.5 20 -12> 
  33.       color White
  34.       spotlight
  35.       point_at <1 0 -1>
  36.       tightness 1
  37.       radius 3
  38.       falloff 8
  39.    }
  40.  
  41. #declare OrangeYellow = color red 1.0 green 0.65 blue 0.0
  42.  
  43. #declare lily_texture1 = texture {
  44.    leopard
  45.    turbulence 0.5
  46.    color_map {
  47.       [0.0 0.25 color OrangeYellow color OrangeYellow]
  48.       [0.25 0.55 color OrangeYellow color Brown]
  49.       [0.55 1.0 color Brown  color Brown]
  50.    }
  51.    scale <0.05 0.05 0.0125>
  52.    
  53. }
  54. #declare lily_texture2 = texture {
  55.    onion
  56.    turbulence 0.05
  57.    color_map {
  58.       [0.0 0.35 color Clear  color Clear]
  59.       [0.35 0.65 color Clear  color OrangeYellow]
  60.       [0.65 1.0 color OrangeYellow color Orange]
  61.    }
  62.    scale <1.01 1.01 0.51>
  63.    translate <0 1 0>
  64.    rotate <0 0 -45>
  65.  
  66.    wrinkles 1.0
  67. }
  68. #declare lily_texture = 
  69.    texture {lily_texture1 ambient 0.0 diffuse 1.0}
  70.    texture {lily_texture2 ambient 0.0 diffuse 1.0}
  71.  
  72. #declare sphere_x = 1
  73. #declare sphere_y = 1
  74. #declare sphere_z = 0.5
  75.  
  76. #declare leaf_texture = texture {
  77.    leopard
  78.    turbulence 1.0
  79.    color_map {
  80.       [0.0 0.1   color ForestGreen  color MediumForestGreen]
  81.       [0.1 0.4   color MediumForestGreen  color White]
  82.       [0.4 0.6   color White color GreenYellow]
  83.       [0.6 1.001 color GreenYellow color GreenYellow]
  84.    }
  85.    scale <0.1 0.1 0.1>
  86.    phong 1.0 phong_size 70.0
  87. }
  88.  
  89. #declare lily_petal = object { 
  90.    quartic { // Torus MinRadius=   0.500   MajRadius=   1.500 
  91.       < 1.000   0.000   0.000   0.000   2.000
  92.         0.000   0.000   2.000   0.000   -5.000
  93.         0.000   0.000   0.000   0.000   0.000
  94.         0.000   0.000   0.000   0.000   0.000
  95.         1.000   0.000   0.000   2.000   0.000
  96.         -5.000    0.000   0.000   0.000   0.000
  97.         1.000   0.000   4.000  0.000   4.000 >
  98.       sturm
  99.       translate <1 0 0>
  100.    }
  101.    clipped_by {
  102.       quadric { 
  103.          Sphere 
  104.          scale <1 1 0.5>
  105.          translate <0 1 0>
  106.          rotate <0 0 -45>
  107.       }
  108.    }
  109.    bounded_by {
  110.       quadric { 
  111.          Sphere 
  112.          scale <1 1 0.5>
  113.          translate <0 1 0>
  114.          rotate <0 0 -45>
  115.       }
  116.    }
  117.    texture {lily_texture}
  118. }
  119.  
  120. // lily_petals
  121. #declare lily_petals = composite {
  122.    object {
  123.       lily_petal
  124.       
  125.       scale <1 2.0 1>
  126.       translate <0.2 0 0>
  127.       rotate <0 -90 0 >
  128.    }
  129.    object {
  130.       lily_petal
  131.       
  132.       scale <1.2 1.3 1.2>
  133.       translate <0.2 0 0>
  134.       rotate <0 30 0 >
  135.    }
  136.    object {
  137.       lily_petal
  138.       
  139.       scale <1 1.65 1>
  140.       translate <0.2 0 0>
  141.       rotate <0 150 0 >
  142.    }
  143.    
  144.    object {
  145.       lily_petal
  146.       
  147.       scale <1 1.7 1>
  148.       rotate <0 0 -15>
  149.       translate <0.2 0 0>
  150.       rotate <0 -30 0 >
  151.    }
  152.    object {
  153.       lily_petal
  154.       
  155.       scale <1 1.6 1>
  156.       rotate <0 0 -15>
  157.       translate <0.2 0 0>
  158.       rotate <0 90 0 >
  159.    }
  160.    object {
  161.       lily_petal
  162.       
  163.       scale <1 2.0 1>
  164.       rotate <0 0 -15>
  165.       translate <0.2 0 0>
  166.       rotate <0 210 0 >
  167.    } 
  168. }
  169.  
  170. // sepal
  171. #declare sepal = object {
  172.    union {
  173.       difference {
  174.          quadric {Ellipsoid scale <0.25 1 0.25>}
  175.          quadric {Ellipsoid scale <0.25 1 0.25> translate <0 0.1 0>}
  176.       }
  177.       sphere {<0 0 0> 0.25}
  178.    }
  179.    texture {
  180.       color ForestGreen
  181.       phong 1.0
  182.       bumps 1.0
  183.       scale <0.1 1 0.1>
  184.    }
  185. }
  186.  
  187. // stamen
  188. #declare stamen = composite {
  189.    object {
  190.       intersection {
  191.          quartic {
  192.             <1 0 0 0 2 0 0
  193.              2 0 -18.000450 0 0 0 0
  194.              0 0 0 0 0 0 1
  195.              0 0 2 0 17.999550 0 0
  196.              0 0 1 0 -18.000450 0 80.995949>
  197.          }
  198.          plane {<0 0 1> 0 inverse}
  199.          plane {<0 0 1> 0 rotate <0 -50.000000 0>}
  200.       }
  201.       bounded_by {
  202.          box {<1.918721 -0.015000 0.000000> 
  203.               <3.015000 0.015000 2.309624>}
  204.       }
  205.       texture {color YellowGreen phong 1.0 phong_size 120}
  206.       rotate <-90 0 0>
  207.    }
  208.    object {
  209.       union {
  210.          quadric {Ellipsoid scale <0.08 0.02 0.02> translate <0 0 0.01>}
  211.          quadric {Ellipsoid scale <0.08 0.02 0.02> translate <0 0 -0.01>}
  212.       }
  213.       texture {color Brown}
  214.       translate <3 0 0>
  215.       rotate <0 0 50>
  216.    }
  217.    translate <-3 0 0>
  218. }
  219.  
  220. //stem
  221. #declare stem = object {
  222.    // Major radius: 12.000000  Minor radius: 0.080000
  223.    intersection {
  224.       quartic {
  225.          <1 0 0 0 2 0 0
  226.           2 0 -288.012787 0 0 0 0
  227.           0 0 0 0 0 0 1
  228.           0 0 2 0 287.987213 0 0
  229.           0 0 1 0 -288.012787 0 20734.156250>
  230.       }
  231.       plane {<0 0 1> 0 inverse}
  232.       plane {<0 0 1> 0 rotate <0 -60.000000 0>}
  233.    }
  234.    bounded_by {
  235.       box {<5.960000 -0.080000 0.000000> 
  236.            <12.080000 0.080000 10.461587>}
  237.    }
  238.    texture {
  239.       color ForestGreen
  240.       phong 1.0
  241.    }
  242.    rotate <90 0 0>
  243.    translate <-12 -1 0>
  244. }
  245.  
  246. // lily
  247. #declare lily = composite {
  248.    composite {lily_petals}
  249.    object {sepal}
  250.    object {stem}
  251.    composite {stamen}
  252.    composite {
  253.       stamen 
  254.       rotate <0 0 -15>
  255.       rotate <0 170 0>
  256.    }
  257.    composite {
  258.       stamen 
  259.       rotate <0 0 -30>
  260.       rotate <0 80 0>
  261.    }
  262.    composite {
  263.       stamen 
  264.       rotate <0 0 -25>
  265.       rotate <0 30 0>
  266.    }
  267.    composite {
  268.       stamen 
  269.       rotate <0 0 -20>
  270.       rotate <0 340 0>
  271.    }
  272.    composite {
  273.       stamen 
  274.       rotate <0 0 -35>
  275.       rotate <0 290 0>
  276.    }
  277.    composite {
  278.       stamen 
  279.       rotate <0 0 -10>
  280.       rotate <0 240 0>
  281.    }
  282.  
  283.    bounded_by {sphere {<0 0 0> 3.5}}
  284. }
  285.  
  286. #declare bud = composite {
  287.    object {
  288.       union {
  289.          quadric {Ellipsoid scale <0.25 1.125 0.25> translate <-0.08 0 -0.08>}
  290.          quadric {Ellipsoid scale <0.25 1.125 0.25> translate <0.08 0 -0.08>}
  291.          quadric {Ellipsoid scale <0.25 1.125 0.25> translate <0.08 0 0.08>}
  292.          quadric {Ellipsoid scale <0.25 1.125 0.25> translate <-0.08 0 0.08>}
  293.       }
  294.       texture {
  295.          color OrangeYellow
  296.          wrinkles 0.8
  297.          scale <0.125 3 0.125>
  298.       }
  299.       translate <0 1 0>
  300.    }
  301.    object {sepal}
  302.    object {stem}
  303. }
  304.  
  305. //
  306. // The Scene Description
  307. //
  308.  
  309. composite {
  310.    lily
  311.    rotate <0 45 0>
  312.    translate <-1 -0.5 3>
  313. composite {
  314.    lily
  315.    translate <1 -1 -1>
  316. composite {
  317.    bud
  318.    rotate <-20 0 45>
  319.    translate <2.5 1 2.5>
  320. composite {
  321.    bud
  322.    rotate <0 0 35>
  323.    rotate <0 -75 0>
  324.    translate <-3.5 -1 5>
  325. composite {
  326.    bud
  327.    rotate <0 0 35>
  328.    rotate <0 135 0>
  329.    translate <-3 -1.5 0.5>
  330.  
  331.  
  332. // Sky
  333. object {
  334.    sphere {<0 0 0> 100}
  335.    texture {
  336.       bozo
  337.       color_map {
  338.          [0.0 0.4 color Gray20 color Gray20]
  339.          [0.4 1.0 color Gray20 color Gray50]
  340.       }
  341.       ambient 0.4 diffuse 0.0
  342.  
  343.       scale <8 8 8>
  344.       translate <0 100 0>
  345.    } 
  346.    texture {
  347.       bozo
  348.       turbulence 0.1
  349.       color_map {
  350.          [0.0 0.1 color OrangeYellow color OrangeYellow]
  351.          [0.1 0.5 color OrangeYellow color Clear]
  352.          [0.5 1.0 color Clear color Clear]
  353.       }
  354.       ambient 0.4 diffuse 0.0
  355.  
  356.       scale <16 16 16>
  357.    } 
  358.  
  359.