home *** CD-ROM | disk | FTP | other *** search
- //---------------------
- // plasgloq.pov QUICK version
- // Plasma globe object for Truman Brown's POV-Ray room project
- // By Dan Farmer CIS 70703,1632
- // All rights released to the public domain.
- //---------------------
- #include "colors.inc"
- #include "coil.inc"
-
- #declare MainCam = camera {
- // location <1.5, 4.25, -6>
- location <4.5, 12.5, -18>
- direction <0, 0, 1.15>
- up <0, 1, 0>
- right <4/3, 0, 0>
- look_at <0, 5, 0>
- }
-
- // Flat view, use with white background for best view
- #declare TestCam = camera {
- location <0.0, 0.1, -10>
- direction <0, 0, 1>
- up <0, 1, 0>
- right <4/3, 0, 0>
- look_at <0, 0.0, 0>
- }
-
- //camera { TestCam }
- //background { color White }
-
- camera { MainCam }
- background { color Gray20 }
-
- // (ie: needed for preview only)
- light_source {<10, 20, -10> color White }
-
-
- //============================================================================
- // Quick Plasma Globe by Dan Farmer
-
- // Quick substitute for the somewhat slowish plasma texture
- #declare QTest = texture { pigment { Red } finish { phong 1 phong_size 90 } }
-
- // Outer globe, influences inner colors. No IOR required
- #declare DMF_Globe =
- sphere { <0,0,0>, 1.2
- texture { QTest }
- }
-
- // Tube connecting globe/electrode to base
- #declare DMF_Tower = union {
- cylinder { <0, -3, 0> <0, 0, 0>, 0.2 texture { pigment { Yellow } } }
- object { DMF_Coil texture { pigment { Green } } rotate z*180 }
- }
-
- // Bumpy gray plastic base
- #declare DMF_Base =
- cylinder { -y*2.5, -y*2, 1.75
- pigment { Gray15 }
- finish { reflection 0.5 }
- }
- #declare DMF_Knob = sphere { <0, -1.8, 0>, 0.075
- texture { pigment { Red } }
- }
-
- // The final object
- // Dimensions:
- // width / depth : -5 to 5
- // height: 0 to 12.5
-
- #declare DMF_LighteningGlobe =
- union {
- object { DMF_Globe }
- object { DMF_Tower }
- object { DMF_Knob translate <0.8, 0.75, -0.8> }
- union {
- object { DMF_Base translate y*0.275 }
- translate -y*1
- }
- bounded_by { box { <-2.25, -3, -2.25> <2.25, 1.25, 2.25> } }
- translate y * 3 // Place base at y=0
- scale 3
- }
-
- /****
- plane { z,0 pigment { checker color Black color White } }
- plane { y,0 pigment { checker color Red color Yellow } }
- box { <-2, -0.1, -2> <2, .1, 2> pigment { White }
- translate y*12.5
- }
- box { <-0.1, 0, -2> <0.1, 12.5, 2> pigment { White }
- translate x*5
- }
- *******/
-
- // Place the object
- object { DMF_LighteningGlobe }
-
-