home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / plasgl / pgquick.pov < prev    next >
Text File  |  1994-02-24  |  3KB  |  99 lines

  1. //---------------------
  2. // plasgloq.pov       QUICK version
  3. // Plasma globe object for Truman Brown's POV-Ray room project
  4. // By Dan Farmer CIS 70703,1632
  5. // All rights released to the public domain.
  6. //---------------------
  7. #include "colors.inc"
  8. #include "coil.inc"
  9.  
  10. #declare MainCam = camera {
  11. //   location  <1.5, 4.25, -6>
  12.    location  <4.5, 12.5, -18>
  13.    direction <0, 0,  1.15>
  14.    up        <0, 1,  0>
  15.    right     <4/3, 0,  0>
  16.    look_at   <0, 5, 0>
  17. }
  18.  
  19. // Flat view, use with white background for best view
  20. #declare TestCam = camera {
  21.    location  <0.0, 0.1, -10>
  22.    direction <0, 0,  1>
  23.    up        <0, 1,  0>
  24.    right     <4/3, 0,  0>
  25.    look_at   <0, 0.0, 0>
  26. }
  27.  
  28. //camera { TestCam }
  29. //background { color White }
  30.  
  31. camera { MainCam }
  32. background { color Gray20 }
  33.  
  34. // (ie: needed for preview only)
  35. light_source {<10, 20, -10> color White }
  36.  
  37.  
  38. //============================================================================
  39. // Quick Plasma Globe by Dan Farmer
  40.  
  41. // Quick substitute for the somewhat slowish plasma texture
  42. #declare QTest = texture { pigment { Red } finish { phong 1 phong_size 90 } }
  43.  
  44. // Outer globe, influences inner colors.  No IOR required
  45. #declare DMF_Globe =
  46.     sphere { <0,0,0>, 1.2 
  47.     texture { QTest } 
  48. }
  49.  
  50. // Tube connecting globe/electrode to base
  51. #declare DMF_Tower = union {
  52.     cylinder { <0, -3, 0> <0, 0, 0>, 0.2 texture { pigment { Yellow } } }
  53.     object { DMF_Coil texture { pigment { Green } } rotate z*180 }
  54. }
  55.  
  56. // Bumpy gray plastic base
  57. #declare DMF_Base = 
  58.     cylinder { -y*2.5, -y*2, 1.75
  59.     pigment { Gray15 }
  60.     finish { reflection 0.5 }
  61. }
  62. #declare DMF_Knob = sphere { <0, -1.8, 0>, 0.075
  63.     texture { pigment { Red } }
  64. }
  65.  
  66. // The final object
  67. // Dimensions:
  68. // width / depth : -5 to 5
  69. // height: 0 to 12.5 
  70.  
  71. #declare DMF_LighteningGlobe = 
  72. union { 
  73.     object { DMF_Globe }
  74.     object { DMF_Tower }
  75.     object { DMF_Knob translate <0.8, 0.75, -0.8> }
  76.     union {  
  77.         object { DMF_Base translate y*0.275 }
  78.         translate -y*1
  79.     }
  80.     bounded_by { box { <-2.25, -3, -2.25> <2.25, 1.25, 2.25> } }
  81.     translate y * 3     // Place base at y=0
  82.     scale 3
  83. }
  84.  
  85. /****
  86. plane { z,0 pigment { checker color Black color White } }
  87. plane { y,0 pigment { checker color Red color Yellow } }
  88. box { <-2, -0.1, -2> <2, .1, 2>  pigment { White } 
  89.     translate y*12.5
  90. }
  91. box { <-0.1, 0, -2> <0.1, 12.5, 2>  pigment { White } 
  92.     translate x*5
  93. }
  94. *******/
  95.  
  96. // Place the object
  97. object { DMF_LighteningGlobe }
  98.  
  99.