home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / utility / dos / lparse / exam.pov < prev    next >
Encoding:
Text File  |  1993-07-14  |  15.2 KB  |  181 lines

  1. // --- L-System Parser/Mutator --- Lj Lapre --- 
  2.  
  3. #include "colors.inc"
  4. #include "shapes.inc"
  5. #include "textures.inc"
  6.  
  7. // ------------------------------- Header part -----------------------------------
  8. // part created by the user
  9.  
  10. // Choose 16 colors
  11. #declare col_0  = colour red 1.0 green 1.0 blue 1.0
  12. #declare col_1  = colour red 0.8 green 0.498039 blue 0.196078
  13. #declare col_2  = colour red 1.0
  14. #declare col_3  = colour red 1.0 green 1.0
  15. #declare col_4  = colour green 1.0
  16. #declare col_5  = colour blue 1.0 green 1.0
  17. #declare col_6  = colour blue 1.0
  18. #declare col_7  = colour red 1.0 blue 1.0
  19. #declare col_8  = colour red 0.439216 green 0.858824 blue 0.576471
  20. #declare col_9  = colour red 1.0 green 0.498039 blue 0.0
  21. #declare col_10 = colour red 0.258824 green 0.258824 blue 0.435294
  22. #declare col_11 = colour red 0.6 green 0.196078 blue 0.8
  23. #declare col_12 = colour red 0.439216 green 0.576471 blue 0.858824
  24. #declare col_13 = colour red 0.556863 green 0.137255 blue 0.137255
  25. #declare col_14 = colour red 0.858824 green 0.858824 blue 0.439216
  26. #declare col_15 = colour red 0.623529 green 0.623529 blue 0.372549
  27.  
  28. // Setup camera
  29. camera {
  30.     location  <200 200 -200>
  31.     direction <0 0 1.5>
  32.     up        <0 1 0>
  33.     right     <1.333 0 0>
  34.     look_at   <0 40 0>
  35. }
  36.  
  37. // Setup light sources
  38. object { 
  39.     light_source { <200 200 -100> 
  40.         color White
  41.     }
  42. }
  43.  
  44. // Other lbase objects examples
  45. //
  46. // #declare l_base =
  47. // object { box { <-1 0 -1> <1 2 1> } }
  48. // 
  49. // #declare lbase =
  50. // object {  
  51. //         intersection { Disk_Y }
  52. //         bounded_by{box { <-1 -1 -1> <1 1 1> }}
  53. //        scale<0.75 0.75 0.75>
  54. //         translate<0 0.75 0>
  55. // }
  56.  
  57. // Select lbase object
  58. #declare l_base =
  59. object {  
  60.         blob {
  61.              threshold 0.1
  62.              component 1.0 2.0 <0 0 0>
  63.           sturm
  64.         }
  65.         bounded_by{box { <-2 -2 -2> <2 2 2> }}
  66.     scale<0.75 0.75 0.75>
  67.         translate<0 0.75 0>
  68. }
  69.  
  70. // Textures for l_base object and leafs
  71. #declare t_base =
  72. texture {
  73.     ambient 0.1
  74.     diffuse 0.5
  75.     reflection 0.4
  76.     phong 1
  77. }    
  78.  
  79. #declare t_leaf =
  80. texture {
  81.     ambient 0.3
  82.     diffuse 0.7
  83. }    
  84.  
  85. // Taken from end of output.pov and given new material
  86. // with lparser -g ... last two triangles are ground plane
  87.  
  88. #declare t_ground =
  89. texture {
  90.         Gold_Texture
  91. }    
  92.  
  93. object{triangle{<-10000 -21.6506 -10000><10000 -21.6506 -10000><10000 -21.6506 10000>}bounded_by{box{<-10000 -21.6506 -10000><10000 -21.6506 10000>}}texture{t_ground}}
  94. object{triangle{<10000 -21.6506 10000><-10000 -21.6506 10000><-10000 -21.6506 -10000>}bounded_by{box{<-10000 -21.6506 -10000><10000 -21.6506 10000>}}texture{t_ground}}
  95.  
  96. // ------------------------------- L-parser part ---------------------------------
  97. // part created by 'lparser -r5 -v -g lsys00'
  98.  
  99. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -179.071 0>translate<0 0 0>}
  100. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 -179.071 0>translate<-4.16667 -7.21688 6.30919e-007>}
  101. object{l_base texture{t_base color col_3}scale<2.33333 5.83333 2.33333>rotate<0 0 -149.226>rotate<0 -179.071 0>translate<-8.33333 -14.4338 1.26184e-006>}
  102. object{l_base texture{t_base color col_3}scale<1.64992 5.83333 1.64992>rotate<0 0 -149.226>rotate<0 -179.071 0>translate<-12.5 -21.6506 1.89276e-006>}
  103. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 0 0>translate<0 0 0>}
  104. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 0 0>translate<4.16667 -7.21688 2.66658e-007>}
  105. object{l_base texture{t_base color col_3}scale<2.33333 5.83333 2.33333>rotate<0 0 -149.226>rotate<0 0 0>translate<8.33333 -14.4338 5.33316e-007>}
  106. object{l_base texture{t_base color col_3}scale<1.64992 5.83333 1.64992>rotate<0 0 -149.226>rotate<0 0 0>translate<12.5 -21.6506 7.99974e-007>}
  107. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -29.8451 0>translate<0 0 0>}
  108. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 -29.8451 0>translate<3.60844 -7.21688 2.08333>}
  109. object{l_base texture{t_base color col_3}scale<2.33333 5.83333 2.33333>rotate<0 0 -149.226>rotate<0 -29.8451 0>translate<7.21688 -14.4338 4.16667>}
  110. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -208.916 0>translate<0 0 0>}
  111. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 -208.916 0>translate<-3.60844 -7.21688 -2.08333>}
  112. object{l_base texture{t_base color col_3}scale<2.33333 5.83333 2.33333>rotate<0 0 -149.226>rotate<0 -208.916 0>translate<-7.21688 -14.4338 -4.16666>}
  113. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -238.761 0>translate<0 0 0>}
  114. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 -238.761 0>translate<-2.08333 -7.21688 -3.60844>}
  115. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -59.6902 0>translate<0 0 0>}
  116. object{l_base texture{t_base color col_3}scale<3.29983 5.83333 3.29983>rotate<0 0 -149.226>rotate<0 -59.6902 0>translate<2.08333 -7.21688 3.60844>}
  117. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -89.5354 0>translate<0 0 0>}
  118. object{l_base texture{t_base color col_3}scale<4.66667 5.83333 4.66667>rotate<0 0 -149.226>rotate<0 -268.606 0>translate<0 0 0>}
  119. object{l_base texture{t_base color col_2}scale<9.33333 11.6667 9.33333>rotate<0 0 0>rotate<0 -89.5354 0>translate<0 0 0>}
  120. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 -179.071 0>translate<0 16.6667 0>}
  121. object{l_base texture{t_base color col_4}scale<6.59966 11.6667 6.59966>rotate<0 0 -89.5354>rotate<0 -196.978 0>translate<-16.6667 16.6667 0>}
  122. object{l_base texture{t_base color col_4}scale<4.66667 11.6667 4.66667>rotate<0 0 -89.5354>rotate<0 -213.094 0>translate<-32.5176 16.6667 -5.15028>}
  123. object{triangle{<-46.3023 16.6667 -14.5183><-53.1946 16.6667 -19.2024><-58.6859 16.6667 -25.4706>}bounded_by{box{<-62.4224 16.6667 -32.9193><-46.3023 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  124. object{triangle{<-46.3023 16.6667 -14.5183><-58.6859 16.6667 -25.4706><-62.4224 16.6667 -32.9193>}bounded_by{box{<-62.4224 16.6667 -32.9193><-46.3023 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  125. object{triangle{<-46.3023 16.6667 -14.5183><-62.4224 16.6667 -32.9193><-55.5301 16.6667 -28.2352>}bounded_by{box{<-62.4224 16.6667 -32.9193><-46.3023 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  126. object{triangle{<-46.3023 16.6667 -14.5183><-55.5301 16.6667 -28.2352><-50.0388 16.6667 -21.967>}bounded_by{box{<-62.4224 16.6667 -32.9193><-46.3023 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  127. object{triangle{<-46.3023 16.6667 -14.5183><-50.0388 16.6667 -21.967><-46.3023 16.6667 -14.5183>}bounded_by{box{<-62.4224 16.6667 -32.9193><-46.3023 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  128. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 0 0>translate<0 16.6667 0>}
  129. object{l_base texture{t_base color col_4}scale<6.59966 11.6667 6.59966>rotate<0 0 -89.5354>rotate<0 -340.234 0>translate<16.6667 16.6667 0>}
  130. object{l_base texture{t_base color col_4}scale<4.66667 11.6667 4.66667>rotate<0 0 -89.5354>rotate<0 -324.118 0>translate<32.5176 16.6667 -5.15028>}
  131. object{triangle{<46.3023 16.6667 -14.5183><53.1946 16.6667 -19.2024><58.6859 16.6667 -25.4706>}bounded_by{box{<46.3023 16.6667 -32.9193><62.4224 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  132. object{triangle{<46.3023 16.6667 -14.5183><58.6859 16.6667 -25.4706><62.4224 16.6667 -32.9193>}bounded_by{box{<46.3023 16.6667 -32.9193><62.4224 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  133. object{triangle{<46.3023 16.6667 -14.5183><62.4224 16.6667 -32.9193><55.5301 16.6667 -28.2352>}bounded_by{box{<46.3023 16.6667 -32.9193><62.4224 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  134. object{triangle{<46.3023 16.6667 -14.5183><55.5301 16.6667 -28.2352><50.0388 16.6667 -21.967>}bounded_by{box{<46.3023 16.6667 -32.9193><62.4224 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  135. object{triangle{<46.3023 16.6667 -14.5183><50.0388 16.6667 -21.967><46.3023 16.6667 -14.5183>}bounded_by{box{<46.3023 16.6667 -32.9193><62.4224 16.6667 -14.5183>}}texture{t_leaf color col_6}}
  136. object{l_base texture{t_base color col_2}scale<9.33333 11.6667 9.33333>rotate<0 0 -9.94838>rotate<0 -89.5354 0>translate<0 16.6667 0>}
  137. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 -179.071 0>translate<0 33.0801 2.89414>}
  138. object{l_base texture{t_base color col_4}scale<6.59966 11.6667 6.59966>rotate<0 0 -86.4753>rotate<0 -196.723 0>translate<-16.6667 33.0801 2.89414>}
  139. object{triangle{<-32.5176 33.9745 -2.1779><-40.4431 34.4216 -4.71392><-47.3354 35.235 -9.32679>}bounded_by{box{<-52.6473 33.9745 -15.6502><-32.5176 36.35 -2.1779>}}texture{t_leaf color col_6}}
  140. object{triangle{<-32.5176 33.9745 -2.1779><-47.3354 35.235 -9.32679><-52.6473 36.35 -15.6502>}bounded_by{box{<-52.6473 33.9745 -15.6502><-32.5176 36.35 -2.1779>}}texture{t_leaf color col_6}}
  141. object{triangle{<-32.5176 33.9745 -2.1779><-52.6473 36.35 -15.6502><-44.7218 35.9028 -13.1142>}bounded_by{box{<-52.6473 33.9745 -15.6502><-32.5176 36.35 -2.1779>}}texture{t_leaf color col_6}}
  142. object{triangle{<-32.5176 33.9745 -2.1779><-44.7218 35.9028 -13.1142><-37.8295 35.0895 -8.5013>}bounded_by{box{<-52.6473 33.9745 -15.6502><-32.5176 36.35 -2.1779>}}texture{t_leaf color col_6}}
  143. object{triangle{<-32.5176 33.9745 -2.1779><-37.8295 35.0895 -8.5013><-32.5176 33.9745 -2.1779>}bounded_by{box{<-52.6473 33.9745 -15.6502><-32.5176 36.35 -2.1779>}}texture{t_leaf color col_6}}
  144. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 0 0>translate<0 33.0801 2.89414>}
  145. object{l_base texture{t_base color col_4}scale<6.59966 11.6667 6.59966>rotate<0 0 -86.4753>rotate<0 -340.489 0>translate<16.6667 33.0801 2.89414>}
  146. object{triangle{<32.5176 33.9745 -2.1779><40.4431 34.4216 -4.71392><47.3354 35.235 -9.32679>}bounded_by{box{<32.5176 33.9745 -15.6502><52.6473 36.35 -2.1779>}}texture{t_leaf color col_6}}
  147. object{triangle{<32.5176 33.9745 -2.1779><47.3354 35.235 -9.32679><52.6473 36.35 -15.6502>}bounded_by{box{<32.5176 33.9745 -15.6502><52.6473 36.35 -2.1779>}}texture{t_leaf color col_6}}
  148. object{triangle{<32.5176 33.9745 -2.1779><52.6473 36.35 -15.6502><44.7218 35.9028 -13.1142>}bounded_by{box{<32.5176 33.9745 -15.6502><52.6473 36.35 -2.1779>}}texture{t_leaf color col_6}}
  149. object{triangle{<32.5176 33.9745 -2.1779><44.7218 35.9028 -13.1142><37.8295 35.0895 -8.5013>}bounded_by{box{<32.5176 33.9745 -15.6502><52.6473 36.35 -2.1779>}}texture{t_leaf color col_6}}
  150. object{triangle{<32.5176 33.9745 -2.1779><37.8295 35.0895 -8.5013><32.5176 33.9745 -2.1779>}bounded_by{box{<32.5176 33.9745 -15.6502><52.6473 36.35 -2.1779>}}texture{t_leaf color col_6}}
  151. object{l_base texture{t_base color col_2}scale<9.33333 11.6667 9.33333>rotate<0 0 -19.8968>rotate<0 -89.5354 0>translate<0 33.0801 2.89414>}
  152. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 -179.071 0>translate<0 48.7417 8.59447>}
  153. object{triangle{<-16.6667 48.7417 8.59447><-25 48.7417 8.59447><-32.9255 49.6224 6.17463>}bounded_by{box{<-39.6673 48.7417 1.57182><-16.6667 51.2977 8.59447>}}texture{t_leaf color col_6}}
  154. object{triangle{<-16.6667 48.7417 8.59447><-32.9255 49.6224 6.17463><-39.6673 51.2977 1.57182>}bounded_by{box{<-39.6673 48.7417 1.57182><-16.6667 51.2977 8.59447>}}texture{t_leaf color col_6}}
  155. object{triangle{<-16.6667 48.7417 8.59447><-39.6673 51.2977 1.57182><-31.3339 51.2977 1.57182>}bounded_by{box{<-39.6673 48.7417 1.57182><-16.6667 51.2977 8.59447>}}texture{t_leaf color col_6}}
  156. object{triangle{<-16.6667 48.7417 8.59447><-31.3339 51.2977 1.57182><-23.4085 50.417 3.99166>}bounded_by{box{<-39.6673 48.7417 1.57182><-16.6667 51.2977 8.59447>}}texture{t_leaf color col_6}}
  157. object{triangle{<-16.6667 48.7417 8.59447><-23.4085 50.417 3.99166><-16.6667 48.7417 8.59447>}bounded_by{box{<-39.6673 48.7417 1.57182><-16.6667 51.2977 8.59447>}}texture{t_leaf color col_6}}
  158. object{l_base texture{t_base color col_4}scale<9.33333 11.6667 9.33333>rotate<0 0 -89.5354>rotate<0 0 0>translate<0 48.7417 8.59447>}
  159. object{triangle{<16.6667 48.7417 8.59447><25 48.7417 8.59447><32.9255 49.6224 6.17463>}bounded_by{box{<16.6667 48.7417 1.57182><39.6673 51.2977 8.59447>}}texture{t_leaf color col_6}}
  160. object{triangle{<16.6667 48.7417 8.59447><32.9255 49.6224 6.17463><39.6673 51.2977 1.57182>}bounded_by{box{<16.6667 48.7417 1.57182><39.6673 51.2977 8.59447>}}texture{t_leaf color col_6}}
  161. object{triangle{<16.6667 48.7417 8.59447><39.6673 51.2977 1.57182><31.3339 51.2977 1.57182>}bounded_by{box{<16.6667 48.7417 1.57182><39.6673 51.2977 8.59447>}}texture{t_leaf color col_6}}
  162. object{triangle{<16.6667 48.7417 8.59447><31.3339 51.2977 1.57182><23.4085 50.417 3.99166>}bounded_by{box{<16.6667 48.7417 1.57182><39.6673 51.2977 8.59447>}}texture{t_leaf color col_6}}
  163. object{triangle{<16.6667 48.7417 8.59447><23.4085 50.417 3.99166><16.6667 48.7417 8.59447>}bounded_by{box{<16.6667 48.7417 1.57182><39.6673 51.2977 8.59447>}}texture{t_leaf color col_6}}
  164. object{l_base texture{t_base color col_2}scale<9.33333 11.6667 9.33333>rotate<0 0 -29.8451>rotate<0 -89.5354 0>translate<0 48.7417 8.59447>}
  165. object{l_base texture{t_base color col_2}scale<9.33334 11.6667 9.33334>rotate<0 0 -39.7935>rotate<0 -89.5354 0>translate<0 63.1754 16.9278>}
  166. object{l_base texture{t_base color col_5}scale<4.66667 5.83333 4.66667>rotate<0 0 -49.7419>rotate<0 -89.5354 0>translate<0 75.9428 27.6409>}
  167. object{l_base texture{t_base color col_5}scale<3.29983 5.83333 3.29983>rotate<0 0 -60.3212>rotate<0 -100.793 0>translate<0 81.2994 34.0246>}
  168. object{l_base texture{t_base color col_5}scale<2.33333 5.83333 2.33333>rotate<0 0 -70.612>rotate<0 -108.851 0>translate<-1.42508 85.3859 41.146>}
  169. object{l_base texture{t_base color col_5}scale<1.64992 5.83333 1.64992>rotate<0 0 -80.2144>rotate<0 -115.154 0>translate<-4.04399 88.102 48.5763>}
  170. object{l_base texture{t_base color col_5}scale<1.16667 5.83333 1.16667>rotate<0 0 -89.0006>rotate<0 -120.443 0>translate<-7.61623 89.4586 55.9819>}
  171. object{l_base texture{t_base color col_7}scale<1.64992 11.6667 1.64992>rotate<0 0 -96.9509>rotate<0 -125.126 0>translate<-11.9165 89.5368 63.1195>}
  172. object{l_base texture{t_base color col_5}scale<4.66667 5.83333 4.66667>rotate<0 0 -49.7419>rotate<0 -89.5354 0>translate<0 75.9428 27.6409>}
  173. object{l_base texture{t_base color col_5}scale<3.29983 5.83333 3.29983>rotate<0 0 -60.3212>rotate<0 -78.2776 0>translate<0 81.2994 34.0246>}
  174. object{l_base texture{t_base color col_5}scale<2.33333 5.83333 2.33333>rotate<0 0 -70.612>rotate<0 -70.2198 0>translate<1.42508 85.3859 41.146>}
  175. object{l_base texture{t_base color col_5}scale<1.64992 5.83333 1.64992>rotate<0 0 -80.2144>rotate<0 -63.9171 0>translate<4.04399 88.102 48.5763>}
  176. object{l_base texture{t_base color col_5}scale<1.16667 5.83333 1.16667>rotate<0 0 -89.0006>rotate<0 -58.6279 0>translate<7.61623 89.4586 55.9819>}
  177. object{l_base texture{t_base color col_7}scale<1.64992 11.6667 1.64992>rotate<0 0 -96.9509>rotate<0 -53.945 0>translate<11.9165 89.5368 63.1195>}
  178.  
  179. // Last two triangles moved up as ground plane
  180.  
  181.