home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / w95 / povwin3 / PYRAMID.ZIP / PYRTEST.POV < prev   
Encoding:
Text File  |  1996-10-20  |  3.1 KB  |  132 lines

  1. //
  2. // Sample file for pyramid.inc
  3. // 
  4.  
  5. #include "colors.inc"
  6.  
  7. #declare DEBUG = 0
  8.  
  9. // Change #if param to yes to use textures, no for simple colors
  10. #if (yes)
  11.   #include "textures.inc"
  12.   #include "glass.inc"
  13.   #include "woods.inc"
  14.   #include "metals.inc"
  15.   #include "stones.inc"
  16.   #declare T_Table = texture { T_Chrome_3C } //T_Wood2 rotate <30, 0, 20> }
  17.   #declare T_P1 = texture {  T_Glass3  finish { caustics 0.5 } }
  18.   #declare T_P2 = texture { T_Chrome_2D  }
  19.   #declare T_P3 = texture { PinkAlabaster scale 0.5 }
  20.   #declare T_P4 = texture { T_Stone24 }
  21.   #declare T_P5 = texture { T_Brass_4B }
  22.   box
  23.   {
  24.       <-6, -1, -4>, <6, 0, 5>
  25.       texture { T_Table }
  26.   }
  27.  
  28.   sky_sphere
  29.   {
  30.       pigment
  31.       {
  32.       #if (0)
  33.         gradient y
  34.         color_map
  35.         {
  36.         [0 rgb <0.8, 0.3, 0.5>]
  37.         [1 rgb <0.0, 0.0, 0.1>]
  38.         }
  39.         turbulence 0.2
  40.       #else
  41.         radial
  42.         color_map
  43.         {
  44.         [0.0 NeonBlue]
  45.         [1.0 MidnightBlue]
  46.         }
  47.         frequency 50
  48.         scallop_wave
  49.         turbulence  0.1 omega  0.2
  50.       #end
  51.       }
  52.   }
  53.   
  54.   light_source { <-1, 0.1, -3> Gray50 }
  55.   light_source { <20, 10, -1> Pink }
  56.   light_source { <-30, 20, 10> NeonBlue }
  57.   
  58. #else
  59.   #declare T_Table = texture { pigment { Gray50 } }
  60.   #declare T_P1 = texture { pigment { Red } }
  61.   #declare T_P2 = texture { pigment { Green } }
  62.   #declare T_P3 = texture { pigment { Blue } }
  63.   #declare T_P4 = texture { pigment { Yellow } }
  64.   #declare T_P5 = texture { pigment { Cyan } }
  65. #end
  66.  
  67. // Regular tetrahedron
  68. #declare Sides = 3
  69. #declare BaseMode = 0    // Know the length of the base
  70. #declare Base = 1.25    // Length of each edge will be 1
  71. #declare HeightMode = 3    // Know the length of an edge
  72. #declare Edge = 1.25    // Length of each edge will be 1
  73. object
  74. {
  75.     #include "pyramid.inc" texture { T_P1 }
  76. //    rotate y * 10
  77.     translate < -1.5,  0,  -2.75>
  78. }
  79.  
  80. // 4 sided
  81. #declare Sides = 4
  82. #declare BaseMode = 0    // Know the length of the base
  83. #declare Base = 2    // Length of each edge will be 1
  84. #declare HeightMode = 0    // Know the height of the pyramid
  85. #declare Height = 1
  86. object
  87. {
  88.     #include "pyramid.inc" texture { T_P2 }
  89.     rotate -y * 15
  90.     translate <  0,  0,  2>
  91. }
  92.  
  93. // 6 sided
  94. #declare Sides = 6
  95. #declare BaseMode = 1    // Know the radius of circumscribed circle
  96. #declare Radius = 1
  97. #declare HeightMode = 1    // Know the angle of the side
  98. #declare SideAngle = 60
  99. object
  100. {
  101.     #include "pyramid.inc" texture { T_P3 } 
  102.     translate < -3,  0,  0>
  103. }
  104.  
  105. // 5 sided
  106. #declare Sides = 5
  107. #declare BaseMode = 1    // Know radius of circumscribed circle
  108. #declare Radius = 0.7
  109. #declare HeightMode = 2    // Know length of side from base to apex
  110. #declare SideLength = 1.5
  111. object
  112. {
  113.     #include "pyramid.inc" texture { T_P4 }
  114.     translate <  2,  0,  -1>
  115. }
  116.  
  117. // 7 sided
  118. #declare Sides = 7
  119. #declare BaseMode = 1    // Know radius of circumscribed circle
  120. #declare Radius = 0.8
  121. #declare HeightMode = 0    // Know height
  122. #declare Height = 0.4
  123. object
  124. {
  125.     #include "pyramid.inc" texture { T_P5 }
  126.     translate <  1,  0,  -3>
  127. }
  128.  
  129.  
  130. light_source { <1000, 1000, -1000> White }
  131. camera { location <0, 3,-7> look_at 0 }
  132.