home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ray Tracing Box
/
RAY_CD.mdf
/
raytrace
/
_pov_dat
/
plasgl
/
plasglo.pov
< prev
Wrap
Text File
|
1994-03-01
|
6KB
|
223 lines
//---------------------
// plasglo.pov
// 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 "textures.inc"
#include "coil.inc" // Tru: optional. Don't use if too slow.
#declare MainCam = camera {
location <5, 12.5, -22>
direction <0, 0, 1>
up <0, 1, 0>
sky y*1
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 }
// These are all independant of the actual object.
// (ie: needed for preview only)
light_source {<10, 20, -10> color White }
light_source {<3, 10, -4> color White }
light_source {<-30, 10, 4> color White }
// Environment (for preview only)
//--------------------------------
#declare Environment = union {
// Left wall
plane { x, -8
texture { pigment {color Gray10} finish { reflection 0.35 }}
rotate y*45
}
// Right wall
plane { x, 6
texture { pigment { color Gray10} finish { reflection 0.35 }}
rotate -y*45
}
// Floor
plane { y, 0
texture {
pigment { color Gray15 }
finish { reflection 0.5 }
}
}
}
// Place the mirrored walls for preview
object { Environment }
//============================================================================
// Plasma Globe by Dan Farmer
// Dimensions:
// width / depth : -5 to 5
// height: 0 to 12.5
//---------- plasma globe color/texture declarations
//
// Also requires from textures.inc:
// Shiny
// Polished_Brass
// Glass3
#declare DMF_Med_Purple = colour red 0.73 green 0.16 blue 0.96 filter 0.95
#declare DMF_Light_Purple = colour red 0.87 green 0.58 blue 0.98 filter 0.85
#declare DMF_Very_DMF_Light_Purple = colour red 0.94 green 0.81 blue 0.99 filter 0.65
#declare DMF_Lightening_CMap1 = color_map {
[0.00 0.15 color White color DMF_Very_DMF_Light_Purple]
[0.15 0.25 color DMF_Very_DMF_Light_Purple color DMF_Very_DMF_Light_Purple ]
[0.25 0.30 color DMF_Very_DMF_Light_Purple color DMF_Light_Purple ]
[0.30 0.40 color DMF_Light_Purple color DMF_Light_Purple ]
[0.40 0.45 color DMF_Light_Purple color DMF_Med_Purple ]
[0.50 1.00 color DMF_Med_Purple color DMF_Med_Purple ]
}
#declare DMF_Lightening1 = texture {
pigment {
marble
color_map { DMF_Lightening_CMap1 }
turbulence <0.5, 0.5, 0.5>
}
finish { ambient 1 }
}
#declare DMF_Lightening_CMap2 = color_map {
[0.00 0.10 color White color DMF_Very_DMF_Light_Purple]
[0.10 0.20 color DMF_Very_DMF_Light_Purple color DMF_Very_DMF_Light_Purple ]
[0.20 0.30 color DMF_Very_DMF_Light_Purple color DMF_Light_Purple ]
[0.30 0.45 color DMF_Light_Purple color DMF_Light_Purple ]
[0.45 0.65 color DMF_Light_Purple color DMF_Med_Purple ]
[0.65 1.00 color DMF_Med_Purple color DMF_Med_Purple ]
}
#declare DMF_Lightening2 = texture {
pigment {
granite
color_map { DMF_Lightening_CMap2 }
turbulence <0.5, 0.5, 0.5>
}
finish { ambient 1 }
}
#declare DMF_Brushed_Aluminum = texture {
Chrome_Metal
normal {
bumps -0.5
scale <1, 0.001, 0.001>
}
}
// Begin plasma globe object
//---------------------------
// Quick substitute for the somewhat slowish plasma texture
#declare QTest = texture { pigment { Red } finish { Shiny } }
// Outer globe, influences inner colors. No IOR required
#declare DMF_Globe =
sphere { <0,0,0>, 1.2
texture { Glass3 pigment { DMF_Light_Purple filter 0.975 } finish { ior 1 }}
// texture { QTest }
}
// Two concentric inner globes textured with the lightening storm texture
#declare DMF_Plasma =
union {
sphere { <0,0,0>, 1.15
texture { DMF_Lightening2 scale 1.5 }
// texture { QTest }
}
sphere { <0,0,0>, 0.75
texture { DMF_Lightening1 rotate <45, 90, 30> }
// texture { QTest }
}
}
// A shiny sphere, concentric to the globes
#declare DMF_Electrode =
sphere { <0,0,0>, 0.35
texture { Polished_Brass }
}
#declare DMF_Globe_Asm = union {
object { DMF_Globe }
object { DMF_Plasma }
object { DMF_Electrode }
bounded_by { sphere { <0,0,0>, 1.2 } }
}
// Tube connecting globe/electrode to base
#declare DMF_Tower = union {
cylinder { <0, -3, 0> <0, 0, 0>, 0.2 texture { DMF_Brushed_Aluminum } }
object { DMF_Coil texture { Polished_Brass } rotate z*180 }
}
// Bumpy gray plastic base
#declare DMF_Base =
cylinder { -y*2.5, -y*2, 1.55
pigment { Gray15 }
finish { reflection 0.5 }
normal { bumps 0.5 scale 0.005 }
}
// Control knob, gray with aluminum cap
#declare DMF_Knob =
union {
disc { -y*1.8999, -y, 0.075
texture { DMF_Brushed_Aluminum }
}
cone { -y*2, 0.1, -y*1.9, 0.075
texture { pigment { Gray15 } finish { Shiny }}
}
}
// The final object
#declare DMF_LighteningGlobe =
union {
object { DMF_Globe_Asm }
object { DMF_Tower }
union {
object { DMF_Knob translate <0.8, 0.75, -0.8> }
object { DMF_Base translate y*0.300 scale 0.80 }
object { DMF_Base translate y*0.285 scale 0.95 }
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 // It's too small. Let's cheat.
}
// Test for outer bounding box
//box { <-2.25, -3, -2.25> <2.25, 1.25, 2.25>
// pigment { White filter 0.85 }
// translate y * 3 // Place base at y=0
//}
// Place the object
object { DMF_LighteningGlobe }