/*##############################################################

School: Nanyang Technological University

Subject: CE 304 - Computer Graphics

Student: Jamie Tan Ai Ping

Laboratory 1 RayTracing with POV-RAY

##############################################################*/

//This section includes all the standard library files.

#include "colors.inc"

#include "shapes.inc"

#include "textures.inc"

#include "glass.inc"

#include "skies.inc"

global_settings {assumed_gamma .75}

//camera location and two light sources shining in fromt the right

//side of the screen

camera {location <0,2,-8>

look_at <0,1,2>}

light_source {<2,-4,-3> rgb 1}

light_source{<6,0,-12> rgb 1}

//defines background and sky of the picture

sky_sphere{S_Cloud2}

background {color Coral}

plane { y,-2

texture{

Water scale 4

pigment{

color Clear

}

}

}

text { ttf "timrom.ttf" "The New Millenium" 0, 0 pigment { NewMidnightBlue } finish { ambient 0.8 diffuse 0 } translate<-4,4,0> } text { ttf "timrom.ttf" "Containment of Computer Viruses" 0, 0 pigment {Red } finish{Shiny} translate<-7,7,0> scale 0.5 }

//virus words that are on the top of the picture. They are declared as //words #declare words=

union{

text { ttf "timrom.ttf" "Virus 2000" 0, 0

pigment {Black }

scale 0.4

translate<-0.9,2.5,-2>

}

text { ttf "timrom.ttf" "Virus 1999" 0, 0

pigment {Black }

scale 0.4

translate<-4.5,2.2,-1>

}

text { ttf "timrom.ttf" "Virus 1998" 0, 0

pigment {Black }

scale 0.4

translate<2.2,2.2,-1>

}

}

//virus for that has one color_Vicks_Bottle_Glass

#declare virus =

blob {

threshold 0.5

cylinder { <-1, 2, -1>, <0, 0,- 1>, 0.5, 1 }

cylinder { <1, 2, -1>, <0, 0, -1>, 0.5, 1 }

texture{Vicks_Bottle_Glass}

finish { ambient 0.2 diffuse 0.8 phong 1 }

translate <0,-1,0>

scale 0.8

}

//two side viruses that has color_Ruby_Glass

#declare virus2 =

blob {

threshold 0.5

cylinder { <-1, 2, -1>, <0, 0,- 1>, 0.5, 1 }

cylinder { <1, 2, -1>, <0, 0, -1>, 0.5, 1 }

texture{Ruby_Glass}

finish { ambient 0.2 diffuse 0.8 phong 1 }

translate <0,-1.2,0>

scale 0.8

}

#declare stand =

cylinder{ <0,0,0>,<0,-2,0>,1.6

texture{White_Marble}

translate<0,-1.5,0>

}

//This section describes how to cut a solid CSG object up and insert

//a glassy effect like that of a fish-tank

#declare tank =

difference{

object {UnitBox scale 1.5}

//squareholes

//left side n right side or x axis

object{UnitBox scale <1.51,1.25,1.25>

texture{T_Glass2} }

//top side n bottom side or y axis

object{UnitBox scale <1.25,1.52,1.25>

texture{T_Glass2}}

//front side n back side or z axis

object{UnitBox scale <1.25,1.25,1.52>

texture{T_Glass2}}

pigment{color OldGold}

finish{Phong_Shiny}

//note using radius of sphere not box

bounded_by{object{UnitBox scale 1.75}}

}

//Actual code to display objects

union{

object { tank }

object { virus}

object { stand}

translate<0,1,0>

}

union{

object {tank}

object {stand}

object {virus2}

scale 0.75

translate<4,1,1>

}

union{

object {tank}

object {stand}

object {virus2}

scale 0.75

translate<-4,1,1>

}

object {words}

/*########################## THE END ############################*/

Hosted by www.Geocities.ws

1