POV-Ray : Newsgroups : povray.text.scene-files : Custom aquarium with overflow Server Time
23 Dec 2024 02:45:50 EST (-0500)
  Custom aquarium with overflow (Message 1 to 1 of 1)  
From: Rich
Subject: Custom aquarium with overflow
Date: 23 Jan 2002 19:38:28
Message: <Xns919FB375BDCD5spammindspringcom@204.213.191.226>
Here's the code for the aquarium I'd eventually like to have built for 
me.  You can see a render of this in the images group, titled Dream Tank.  
Any suggestions for speeding up the render, improving the textures, etc., 
will be greatly appreciated.

-- 
Rich Allen
(Remove SPAM from my address to reply by e-mail)

--------------------------------------------------

global_settings { max_trace_level 10 }

camera { location <-24,68,-96> right 1280/1024*x look_at <0,48,0> }

#declare MainLight  = <-5,72,-13>;
#declare BlueLight1 = < 1,72,-10>;
#declare BlueLight2 = <-7,72, -7>;

light_source { MainLight  color rgb <1, 1, 1.00> }
light_source { BlueLight1 color rgb <0, 0, 0.15> }
light_source { BlueLight2 color rgb <0, 0, 0.15> }


//TEXTURE DEFINITIONS
#declare glassTex = texture{
  pigment { rgbf <.99,.99,1.0,.99>}
  finish { reflection 0 }
}
#declare glassInt = interior{ ior 1.67 }

#declare waterTex = texture{
    pigment { color rgbf <0.9,0.9,1.0,0.995> }
    finish { reflection 0.2 }
}
#declare waterInt = interior { ior 1.33 caustics 1.5 }

#declare overflowTex = texture{
    pigment { color rgb 0 }
    finish { reflection 0.05 }
}

#declare sandTex = texture{
  pigment { 
    granite
    color_map {
      [0.20 rgb 0.79]
      [0.23 rgb 0.00]
      [0.24 rgb 0.79]
      [0.50 rgb 0.70]
      [0.51 rgb 0.10]
      [0.53 rgb 0.70]
      [0.91 rgb 0.20]
      [0.91 rgb 0.70]
    }
  }
  finish { ambient .7 }  
  scale <10,.1,10>
}



//OBJECT DEFINITIONS
#declare tank_solid = merge{
  intersection {
    cylinder { <0,0,0>, <0,28,0>, 28 }
    box { <0,0,0>, <-29,29,-29> }
  }
  box { <-0.001,0,0>, <8,28,-28> }
}

#declare tank_inside = merge{
  intersection {
    cylinder { <0,0,0>, <0,28,0>, 27.5 }
    box { <0,0,0>, <-29,29,-29> }
  }
  box { <-0.001,0,0>, <8,28,-27.5> }
  translate <-0.25,0.25,-0.25>
}

#declare tank = difference {
  object { tank_solid }
  object { tank_inside }
}


#declare overflow = intersection {
  difference {
    cylinder { <8,0,0>, <8,26,0>, 6 }
    cylinder { <8,0,0>, <8,28,0>, 5.75 }
  }
  box { <0,0,0>, <8,26,-8> } 
}

#declare sand = difference {
  intersection {
    height_field { function 200,200 { pattern { granite } } scale 
<40,.75,40> translate <-30,3,-30> }
    object { tank_inside scale .999}
  }
  cylinder { <8,0,0>, <8,6,0>, 6.001 }
}

#declare water = difference {
  intersection {
    height_field { function 200,200 { pattern { bozo scale .05 } } scale 
<40,.75,40> translate <-30,26,-30> }
    object { tank_inside scale .9999 }
  }
  cylinder { <8,0,0>, <8,29,0>, 6.001 }
}



//SCENE DEFINITION

sky_sphere { pigment { color rgb .6 } }

//tank
object { tank texture { glassTex } interior { glassInt } translate <-
0.5,36,-0.5> }
object { water texture { waterTex } interior { waterInt } translate <-
0.5,36,-0.5> }
object { overflow  texture { overflowTex } translate <-0.5,36,-0.5> }
object { sand texture { sandTex } translate <-0.5,36,-0.5> }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.