home *** CD-ROM | disk | FTP | other *** search
- //
- // Sample file for pyramid.inc
- //
-
- #include "colors.inc"
-
- #declare DEBUG = 0
-
- // Change #if param to yes to use textures, no for simple colors
- #if (yes)
- #include "textures.inc"
- #include "glass.inc"
- #include "woods.inc"
- #include "metals.inc"
- #include "stones.inc"
- #declare T_Table = texture { T_Chrome_3C } //T_Wood2 rotate <30, 0, 20> }
- #declare T_P1 = texture { T_Glass3 finish { caustics 0.5 } }
- #declare T_P2 = texture { T_Chrome_2D }
- #declare T_P3 = texture { PinkAlabaster scale 0.5 }
- #declare T_P4 = texture { T_Stone24 }
- #declare T_P5 = texture { T_Brass_4B }
- box
- {
- <-6, -1, -4>, <6, 0, 5>
- texture { T_Table }
- }
-
- sky_sphere
- {
- pigment
- {
- #if (0)
- gradient y
- color_map
- {
- [0 rgb <0.8, 0.3, 0.5>]
- [1 rgb <0.0, 0.0, 0.1>]
- }
- turbulence 0.2
- #else
- radial
- color_map
- {
- [0.0 NeonBlue]
- [1.0 MidnightBlue]
- }
- frequency 50
- scallop_wave
- turbulence 0.1 omega 0.2
- #end
- }
- }
-
- light_source { <-1, 0.1, -3> Gray50 }
- light_source { <20, 10, -1> Pink }
- light_source { <-30, 20, 10> NeonBlue }
-
- #else
- #declare T_Table = texture { pigment { Gray50 } }
- #declare T_P1 = texture { pigment { Red } }
- #declare T_P2 = texture { pigment { Green } }
- #declare T_P3 = texture { pigment { Blue } }
- #declare T_P4 = texture { pigment { Yellow } }
- #declare T_P5 = texture { pigment { Cyan } }
- #end
-
- // Regular tetrahedron
- #declare Sides = 3
- #declare BaseMode = 0 // Know the length of the base
- #declare Base = 1.25 // Length of each edge will be 1
- #declare HeightMode = 3 // Know the length of an edge
- #declare Edge = 1.25 // Length of each edge will be 1
- object
- {
- #include "pyramid.inc" texture { T_P1 }
- // rotate y * 10
- translate < -1.5, 0, -2.75>
- }
-
- // 4 sided
- #declare Sides = 4
- #declare BaseMode = 0 // Know the length of the base
- #declare Base = 2 // Length of each edge will be 1
- #declare HeightMode = 0 // Know the height of the pyramid
- #declare Height = 1
- object
- {
- #include "pyramid.inc" texture { T_P2 }
- rotate -y * 15
- translate < 0, 0, 2>
- }
-
- // 6 sided
- #declare Sides = 6
- #declare BaseMode = 1 // Know the radius of circumscribed circle
- #declare Radius = 1
- #declare HeightMode = 1 // Know the angle of the side
- #declare SideAngle = 60
- object
- {
- #include "pyramid.inc" texture { T_P3 }
- translate < -3, 0, 0>
- }
-
- // 5 sided
- #declare Sides = 5
- #declare BaseMode = 1 // Know radius of circumscribed circle
- #declare Radius = 0.7
- #declare HeightMode = 2 // Know length of side from base to apex
- #declare SideLength = 1.5
- object
- {
- #include "pyramid.inc" texture { T_P4 }
- translate < 2, 0, -1>
- }
-
- // 7 sided
- #declare Sides = 7
- #declare BaseMode = 1 // Know radius of circumscribed circle
- #declare Radius = 0.8
- #declare HeightMode = 0 // Know height
- #declare Height = 0.4
- object
- {
- #include "pyramid.inc" texture { T_P5 }
- translate < 1, 0, -3>
- }
-
-
- light_source { <1000, 1000, -1000> White }
- camera { location <0, 3,-7> look_at 0 }
-