Artwork | Email

Pov-Ray source for Ghost Sphere


// Persistence of Vision Ray Tracer Scene Description File
// File: ghost_sphere.pov
// Vers: 3.5
// Desc: Some kind of artwork
// Date: 3/9/2005
// Auth: Jim Lowell - jlowell@visi.com

#version 3.1

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"

// RENDER OPTIONS
#declare draw_detail=1
#declare draw_media=1

camera
{
  location  <5,10,-20>
  look_at   <5,5,0>
}

#if (draw_media=1)
  media {
    scattering { 1, rgb 0.04}
    #if (draw_detail=1)
      intervals 120
      samples 1, 10
      confidence 0.9999
      variance 1/1000
    #else
      intervals 10
      samples 1, 1
      confidence 0.9
      variance 1/100
    #end
    ratio 0.9
  }
#end

background { Black }

// Declare a floor tile
#declare theight=0.025;
#declare tedge=0.05;
#declare atile=union {
  box { <tedge,0,tedge>,<1-tedge,theight,1-tedge> }
  triangle { <0,0,0>,<tedge,theight,tedge>,<tedge,theight,1-tedge> }
  triangle { <0,0,0>,<tedge,theight,1-tedge>,<0,0,1> }

  triangle { <0,0,0>,<tedge,theight,tedge>,<1-tedge,theight,tedge> }
  triangle { <0,0,0>,<1-tedge,theight,tedge>,<1,0,0> }

  triangle { <1,0,1>,<1-tedge,theight,1-tedge>,<1-tedge,theight,tedge> }
  triangle { <1,0,1>,<1-tedge,theight,tedge>,<1,0,0> }

  triangle { <1,0,1>,<1-tedge,theight,1-tedge>,<tedge,theight,1-tedge> }
  triangle { <1,0,1>,<0,0,1>,<tedge,theight,1-tedge> }
}

// Draw the floor
#declare I=0;
#while (I<40)
  #declare J=0;
  #while (J < 40)
    object { atile translate <I-20,-theight,J-20> pigment { DarkPurple } finish { Shiny reflection 0.5 }  }
    #declare J=J+1;
  #end
  #declare I=I+1;
#end  

// Draw the sphere that the spotlight hits
sphere { <0,2.025,0>,2 texture { NBglass } }
#declare I=0;
#while (I<18)
  torus { 2,0.025 rotate <I*20,0,0> translate <0,2.025,0> texture { Polished_Brass } }
  torus { 2,0.025 rotate <0,0,I*20> translate <0,2.025,0> texture { Polished_Brass } }
  #declare I=I+1;
#end

// Draw the curved thing behind the sphere
difference {
  cylinder { <0,0,0>,<0,3,0>,8 }
  cylinder { <0,-1,0>,<0,4,0>,4 }
  torus { 4,0.75 scale <1,2,1> translate <0,1.5,0> }
  torus { 8,0.75 scale <1,2,1> translate <0,1.5,0> }
  box { <-10,-1,0>,<10,4,-10> }
  texture { Polished_Brass }
}

// Outer spotlight
light_source {
  0*x              
  color rgb <0.8,0.85,1.0> * 2.0
  spotlight           
  translate <40, 50, 0>
  point_at <0, 0, 0>
  radius 6
  tightness 50
  falloff 8
}

// Inner spotlight
light_source {
  0*x              
  color rgb <0.8,0.85,1.0> * 2.0
  spotlight           
  translate <40, 50, 0>
  point_at <0, 0, 0>
  radius 2
  tightness 50
  falloff 4
}