home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 9 / CD_ASCQ_09_1193.iso / news / 4444 / plant3 / leaf1.inc < prev    next >
Text File  |  1992-07-28  |  15KB  |  561 lines

  1. /*
  2.  
  3. Leaf1
  4. This leaf & stem has a base point at <0 0 0> & arches towards
  5. the negative z with the tip of the leaf at -50 z & the arch 
  6. apexes at 57 y.
  7.  
  8. */
  9.  
  10.  
  11. //---- Texture for the right side of leaf
  12. #declare Leaf_Texture_R = 
  13. texture {
  14.     color DarkGreen 
  15.     .02
  16.     ambient .25
  17.     diffuse .5
  18.     waves .8
  19.     frequency .05
  20.     phong .75
  21.     phong_size 40
  22.     scale <10 .01 10>
  23.     rotate <0 0 45>
  24. }
  25. texture {
  26.     wood
  27.     color_map {
  28.     [0 .5 color Black alpha .8 color DarkGreen alpha .7]
  29.     [.5 1 color DarkGreen alpha .7 color Yellow alpha .7]
  30.     }
  31.     diffuse .4
  32.     scale <30 40 20>
  33.     } 
  34.  
  35.  
  36. //---- Texture for left side of leaf
  37. #declare Leaf_Texture_L = 
  38. texture {
  39.     color DarkGreen
  40.     .01
  41.     ambient .25
  42.     diffuse .5
  43.     waves .8
  44.     frequency .05
  45.     phong .75
  46.     phong_size 40
  47.     scale <10 .01 10>
  48.     rotate <0 0 -45>
  49. }
  50. texture {
  51.     wood
  52.     color_map {
  53.     [0 .5 color Black alpha .8 color DarkGreen alpha .7]
  54.     [.5 1 color DarkGreen alpha .7 color Yellow alpha .7]
  55.     }
  56.     diffuse .4
  57.     scale <30 40 20>
  58.     } 
  59.  
  60.  
  61. //--- Texture for leaf stem
  62. #declare Stem_Texture = 
  63. texture {
  64.     color DarkGreen 
  65.     .02
  66.     ambient .25
  67.     diffuse .5
  68.     waves .8
  69.     frequency .05
  70.     phong .75
  71.     phong_size 40
  72.     scale <10 .1 10>
  73.     rotate <0 0 45>
  74. }
  75.  
  76.  
  77. //----- Right 1/2 of leaf
  78. #declare Leaf_R = 
  79. object {
  80.      quadric { Sphere scale <10 20 8> translate <5 0 0> }
  81.     clipped_by {
  82.       quadric { Sphere scale <12.5 30 12.5> translate <0 15 0> }
  83.       quadric { Cylinder_X scale <1 22 8> translate <0 0 1.7> inverse }
  84.       plane { <1 0 0> 0 inverse }
  85.     }
  86.         texture {
  87.         Leaf_Texture_R
  88.         }
  89. }
  90.  
  91.  
  92. //--- Left 1/2 of leaf
  93. #declare Leaf_L = 
  94. object {
  95.      quadric { Sphere scale <10 20 8> translate <-5 0 0> }
  96.     clipped_by {
  97.       quadric { Sphere scale <12.5 30 12.5> translate <0 15 0> }
  98.       quadric { Cylinder_X scale <1 22 8> translate <0 0 1.7> inverse }
  99.       plane { <1 0 0> 0 }
  100.     }
  101.         texture {
  102.         Leaf_Texture_L
  103.         }
  104. }
  105.  
  106.  
  107.  
  108. //--- Texture for Stem
  109. #declare YourTexture =    
  110.     texture {
  111.     Stem_Texture
  112.     }
  113.  
  114.  
  115.  
  116. #declare Dot =
  117.     quadric {
  118.        < 1.0  1.0  1.0>
  119.        < 0.0  0.0  0.0>
  120.        < 0.0  0.0  0.0>
  121.         -1.0
  122.     }
  123.  
  124. #declare Connector_1 = 
  125.    object {
  126.       quadric {
  127.          < 0.0  1.0  1.0>
  128.          < 0.0  0.0  0.0>
  129.          < 0.0  0.0  0.0>
  130.           -1.0
  131.       }
  132.       clipped_by {
  133.          plane { < 1.0  0.0  0.0> 1.0 }
  134.          plane { <-1.0  0.0  0.0> 0.0 }
  135.       }
  136.    }
  137.  
  138. #declare Connector_2 =
  139.    quadric {
  140.       < 1.0 -1.0  1.0>
  141.       < 0.0  0.0  0.0>
  142.       < 0.0  0.0  0.0>
  143.         0.0
  144.       rotate < 0.0  0.0  90.0>
  145.    }
  146.  
  147. /*----------------------------------------------------------------------------*/
  148.  
  149. //--- Arched Stem
  150. #declare Stem =
  151.    composite {
  152.       object {
  153.          quadric {
  154.             Dot
  155.             scale     < 1.884620  1.884620  1.884620>
  156.          }
  157.          texture {
  158.             YourTexture
  159.          }
  160.       }
  161.       object {
  162.          quadric {
  163.             Connector_2
  164.          }
  165.          clipped_by {
  166.             plane {     < 1.000000  0.000000  0.000000>  1.884409 }
  167.             plane {     < 1.000000  0.000000  0.000000>  1.769032 inverse }
  168.          }
  169.          translate <-1.884409  0.000000  0.000000>
  170.          scale     < 66.871071  1.000000  1.000000>
  171.          translate <-0.028180  0.000000  0.000000>
  172.          rotate    < 0.000000  180.000000  0.000000>
  173.          rotate    < 0.000000  0.000000  66.321546>
  174.          rotate    < 0.000000 -90.000000  0.000000>
  175.          texture {
  176.             YourTexture
  177.          }
  178.       }
  179.       object {
  180.          quadric {
  181.             Dot
  182.             scale     < 1.769230  1.769230  1.769230>
  183.             translate < 0.000000  7.067440  3.099220>
  184.          }
  185.          texture {
  186.             YourTexture
  187.          }
  188.       }
  189.       object {
  190.          quadric {
  191.             Connector_2
  192.          }
  193.          clipped_by {
  194.             plane {     < 1.000000  0.000000  0.000000>  1.769032 }
  195.             plane {     < 1.000000  0.000000  0.000000>  1.653665 inverse }
  196.          }
  197.          translate <-1.769032  0.000000  0.000000>
  198.          scale     < 66.876887  1.000000  1.000000>
  199.          translate <-0.026452  0.000000  0.000000>
  200.          rotate    < 0.000000  180.000000  0.000000>
  201.          rotate    < 0.000000  0.000000  77.073854>
  202.          rotate    < 0.000000 -90.000000  0.000000>
  203.          translate < 0.000000  7.067440  3.099220>
  204.          texture {
  205.             YourTexture
  206.          }
  207.       }
  208.       object {
  209.          quadric {
  210.             Dot
  211.             scale     < 1.653850  1.653850  1.653850>
  212.             translate < 0.000000  14.589000  4.825500>
  213.          }
  214.          texture {
  215.             YourTexture
  216.          }
  217.       }
  218.       object {
  219.          quadric {
  220.             Connector_2
  221.          }
  222.          clipped_by {
  223.             plane {     < 1.000000  0.000000  0.000000>  1.653665 }
  224.             plane {     < 1.000000  0.000000  0.000000>  1.538288 inverse }
  225.          }
  226.          translate <-1.653665  0.000000  0.000000>
  227.          scale     < 66.871050  1.000000  1.000000>
  228.          translate <-0.024729  0.000000  0.000000>
  229.          rotate    < 0.000000  180.000000  0.000000>
  230.          rotate    < 0.000000  0.000000  87.826250>
  231.          rotate    < 0.000000 -90.000000  0.000000>
  232.          translate < 0.000000  14.589000  4.825500>
  233.          texture {
  234.             YourTexture
  235.          }
  236.       }
  237.       object {
  238.          quadric {
  239.             Dot
  240.             scale     < 1.538460  1.538460  1.538460>
  241.             translate < 0.000000  22.300560  5.118210>
  242.          }
  243.          texture {
  244.             YourTexture
  245.          }
  246.       }
  247.       object {
  248.          quadric {
  249.             Connector_2
  250.          }
  251.          clipped_by {
  252.             plane {     < 1.000000  0.000000  0.000000>  1.538288 }
  253.             plane {     < 1.000000  0.000000  0.000000>  1.422921 inverse }
  254.          }
  255.          translate <-1.538288  0.000000  0.000000>
  256.          scale     < 66.876872  1.000000  1.000000>
  257.          translate <-0.023002  0.000000  0.000000>
  258.          rotate    < 0.000000  180.000000  0.000000>
  259.          rotate    < 0.000000  0.000000  81.421487>
  260.          rotate    < 0.000000  90.000000  0.000000>
  261.          translate < 0.000000  22.300560  5.118210>
  262.          texture {
  263.             YourTexture
  264.          }
  265.       }
  266.       object {
  267.          quadric {
  268.             Dot
  269.             scale     < 1.423080  1.423080  1.423080>
  270.             translate < 0.000000  29.931340  3.967090>
  271.          }
  272.          texture {
  273.             YourTexture
  274.          }
  275.       }
  276.       object {
  277.          quadric {
  278.             Connector_2
  279.          }
  280.          clipped_by {
  281.             plane {     < 1.000000  0.000000  0.000000>  1.422921 }
  282.             plane {     < 1.000000  0.000000  0.000000>  1.307544 inverse }
  283.          }
  284.          translate <-1.422921  0.000000  0.000000>
  285.          scale     < 66.871072  1.000000  1.000000>
  286.          translate <-0.021279  0.000000  0.000000>
  287.          rotate    < 0.000000  180.000000  0.000000>
  288.          rotate    < 0.000000  0.000000  70.669222>
  289.          rotate    < 0.000000  90.000000  0.000000>
  290.          translate < 0.000000  29.931340  3.967090>
  291.          texture {
  292.             YourTexture
  293.          }
  294.       }
  295.       object {
  296.          quadric {
  297.             Dot
  298.             scale     < 1.307690  1.307690  1.307690>
  299.             translate < 0.000000  37.213390  1.412560>
  300.          }
  301.          texture {
  302.             YourTexture
  303.          }
  304.       }
  305.       object {
  306.          quadric {
  307.             Connector_2
  308.          }
  309.          clipped_by {
  310.             plane {     < 1.000000  0.000000  0.000000>  1.307544 }
  311.             plane {     < 1.000000  0.000000  0.000000>  1.192177 inverse }
  312.          }
  313.          translate <-1.307544  0.000000  0.000000>
  314.          scale     < 66.876889  1.000000  1.000000>
  315.          translate <-0.019552  0.000000  0.000000>
  316.          rotate    < 0.000000  180.000000  0.000000>
  317.          rotate    < 0.000000  0.000000  59.916798>
  318.          rotate    < 0.000000  90.000000  0.000000>
  319.          translate < 0.000000  37.213390  1.412560>
  320.          texture {
  321.             YourTexture
  322.          }
  323.       }
  324.       object {
  325.          quadric {
  326.             Dot
  327.             scale     < 1.192310  1.192310  1.192310>
  328.             translate < 0.000000  43.891000 -2.455700>
  329.          }
  330.          texture {
  331.             YourTexture
  332.          }
  333.       }
  334.       object {
  335.          quadric {
  336.             Connector_2
  337.          }
  338.          clipped_by {
  339.             plane {     < 1.000000  0.000000  0.000000>  1.192177 }
  340.             plane {     < 1.000000  0.000000  0.000000>  1.076800 inverse }
  341.          }
  342.          translate <-1.192177  0.000000  0.000000>
  343.          scale     < 66.870990  1.000000  1.000000>
  344.          translate <-0.017828  0.000000  0.000000>
  345.          rotate    < 0.000000  180.000000  0.000000>
  346.          rotate    < 0.000000  0.000000  49.164547>
  347.          rotate    < 0.000000  90.000000  0.000000>
  348.          translate < 0.000000  43.891000 -2.455700>
  349.          texture {
  350.             YourTexture
  351.          }
  352.       }
  353.       object {
  354.          quadric {
  355.             Dot
  356.             scale     < 1.076920  1.076920  1.076920>
  357.             translate < 0.000000  49.729690 -7.501830>
  358.          }
  359.          texture {
  360.             YourTexture
  361.          }
  362.       }
  363.       object {
  364.          quadric {
  365.             Connector_2
  366.          }
  367.          clipped_by {
  368.             plane {     < 1.000000  0.000000  0.000000>  1.076800 }
  369.             plane {     < 1.000000  0.000000  0.000000>  0.961433 inverse }
  370.          }
  371.          translate <-1.076800  0.000000  0.000000>
  372.          scale     < 66.876938  1.000000  1.000000>
  373.          translate <-0.016101  0.000000  0.000000>
  374.          rotate    < 0.000000  180.000000  0.000000>
  375.          rotate    < 0.000000  0.000000  38.412182>
  376.          rotate    < 0.000000  90.000000  0.000000>
  377.          translate < 0.000000  49.729690 -7.501830>
  378.          texture {
  379.             YourTexture
  380.          }
  381.       }
  382.       object {
  383.          quadric {
  384.             Dot
  385.             scale     < 0.961540  0.961540  0.961540>
  386.             translate < 0.000000  54.524450 -13.548670>
  387.          }
  388.          texture {
  389.             YourTexture
  390.          }
  391.       }
  392.       object {
  393.          quadric {
  394.             Connector_2
  395.          }
  396.          clipped_by {
  397.             plane {     < 1.000000  0.000000  0.000000>  0.961433 }
  398.             plane {     < 1.000000  0.000000  0.000000>  0.846055 inverse }
  399.          }
  400.          translate <-0.961433  0.000000  0.000000>
  401.          scale     < 66.871053  1.000000  1.000000>
  402.          translate <-0.014377  0.000000  0.000000>
  403.          rotate    < 0.000000  180.000000  0.000000>
  404.          rotate    < 0.000000  0.000000  27.659934>
  405.          rotate    < 0.000000  90.000000  0.000000>
  406.          translate < 0.000000  54.524450 -13.548670>
  407.          texture {
  408.             YourTexture
  409.          }
  410.       }
  411.       object {
  412.          quadric {
  413.             Dot
  414.             scale     < 0.846150  0.846150  0.846150>
  415.             translate < 0.000000  58.106910 -20.383860>
  416.          }
  417.          texture {
  418.             YourTexture
  419.          }
  420.       }
  421.       object {
  422.          quadric {
  423.             Connector_2
  424.          }
  425.          clipped_by {
  426.             plane {     < 1.000000  0.000000  0.000000>  0.846055 }
  427.             plane {     < 1.000000  0.000000  0.000000>  0.730688 inverse }
  428.          }
  429.          translate <-0.846055  0.000000  0.000000>
  430.          scale     < 66.876810  1.000000  1.000000>
  431.          translate <-0.012651  0.000000  0.000000>
  432.          rotate    < 0.000000  180.000000  0.000000>
  433.          rotate    < 0.000000  0.000000  16.907523>
  434.          rotate    < 0.000000  90.000000  0.000000>
  435.          translate < 0.000000  58.106910 -20.383860>
  436.          texture {
  437.             YourTexture
  438.          }
  439.       }
  440.       object {
  441.          quadric {
  442.             Dot
  443.             scale     < 0.730770  0.730770  0.730770>
  444.             translate < 0.000000  60.351260 -27.767400>
  445.          }
  446.          texture {
  447.             YourTexture
  448.          }
  449.       }
  450.       object {
  451.          quadric {
  452.             Connector_2
  453.          }
  454.          clipped_by {
  455.             plane {     < 1.000000  0.000000  0.000000>  0.730688 }
  456.             plane {     < 1.000000  0.000000  0.000000>  0.615311 inverse }
  457.          }
  458.          translate <-0.730688  0.000000  0.000000>
  459.          scale     < 66.871100  1.000000  1.000000>
  460.          translate <-0.010927  0.000000  0.000000>
  461.          rotate    < 0.000000  180.000000  0.000000>
  462.          rotate    < 0.000000  0.000000  6.155239>
  463.          rotate    < 0.000000  90.000000  0.000000>
  464.          translate < 0.000000  60.351260 -27.767400>
  465.          texture {
  466.             YourTexture
  467.          }
  468.       }
  469.       object {
  470.          quadric {
  471.             Dot
  472.             scale     < 0.615380  0.615380  0.615380>
  473.             translate < 0.000000  61.178710 -35.440030>
  474.          }
  475.          texture {
  476.             YourTexture
  477.          }
  478.       }
  479.       object {
  480.          quadric {
  481.             Connector_2
  482.          }
  483.          clipped_by {
  484.             plane {     < 1.000000  0.000000  0.000000>  0.615311 }
  485.             plane {     < 1.000000  0.000000  0.000000>  0.499944 inverse }
  486.          }
  487.          translate <-0.615311  0.000000  0.000000>
  488.          scale     < 66.876872  1.000000  1.000000>
  489.          translate <-0.009201  0.000000  0.000000>
  490.          rotate    < 0.000000  180.000000  0.000000>
  491.          rotate    < 0.000000  0.000000 -4.597062>
  492.          rotate    < 0.000000  90.000000  0.000000>
  493.          translate < 0.000000  61.178710 -35.440030>
  494.          texture {
  495.             YourTexture
  496.          }
  497.       }
  498.       object {
  499.          quadric {
  500.             Dot
  501.             scale     < 0.500000  0.500000  0.500000>
  502.             translate < 0.000000  60.560200 -43.132320>
  503.          }
  504.          texture {
  505.             YourTexture
  506.          }
  507.       }
  508.       object {
  509.          quadric {
  510.             Connector_2
  511.          }
  512.          clipped_by {
  513.             plane {     < 1.000000  0.000000  0.000000>  0.499944 }
  514.             plane {     < 1.000000  0.000000  0.000000>  0.384577 inverse }
  515.          }
  516.          translate <-0.499944  0.000000  0.000000>
  517.          scale     < 66.876832  1.000000  1.000000>
  518.          translate <-0.007476  0.000000  0.000000>
  519.          rotate    < 0.000000  180.000000  0.000000>
  520.          rotate    < 0.000000  0.000000 -15.349363>
  521.          rotate    < 0.000000  90.000000  0.000000>
  522.          translate < 0.000000  60.560200 -43.132320>
  523.          texture {
  524.             YourTexture
  525.          }
  526.       }
  527.       object {
  528.          quadric {
  529.             Dot
  530.             scale     < 0.384620  0.384620  0.384620>
  531.             translate < 0.000000  58.517450 -50.574160>
  532.          }
  533.          texture {
  534.             YourTexture
  535.          }
  536.       }
  537.       bounded_by {
  538.          quadric {
  539.             Dot
  540.             scale < 47.276732  47.276732  47.276732>
  541.             translate < 0.000000  29.954735 -22.151055>
  542.          }
  543.       }
  544.    }
  545.  
  546.  
  547.  
  548.  
  549.  
  550. //--- Complete Leaf & Stem
  551. #declare Leaf1 =
  552. composite {
  553.    object { Leaf_L rotate <90 0 0>  translate <0 54 -38> }
  554.    object { Leaf_R rotate <90 0 0>  translate <0 54 -38> }
  555.    composite { Stem }
  556. }
  557.  
  558.  
  559.  
  560.  
  561.