http://www.oocities.org/SiliconValley/Port/9258/CompGraphics.html
 
 

POV SCENEFILE

(CSG.POV)
 
 

#include "colors.inc"

#include "shapes.inc"

#include "textures.inc"

#include "glass.inc"

#include "metals.inc"

#include "woods.inc"

#include "metals.inc"

#include "stones.inc"

#include "skies.inc"

// define camera locations

camera {

// fisheye view

ultra_wide_angle

angle 150

location <0,1,-3>

up <0,1,0>

right <1,0,0>

look_at <0,1,2>

// Creating blurring effects (optional)

// focal_point <0.5,1.5,1.5>

// aperture 0.05

// blur_samples 4

}

// define multiple light sources

// ambient light

global_settings { ambient_light color White } // color defined in COLORS.INC

light_source { <2,4,-3> color Yellow } // Pointlight source

light_source {

<2, 10, -3>

color White

spotlight // Spotlight source

radius 15

falloff 18

tightness 10

area_light <1, 0, 0>, <0, 0, 1>, 2, 2 // Arealight source

adaptive 1

jitter

point_at <0, 0, 0>

}

light_source {

<10, 10, -1>

color Red

spotlight

radius 12

falloff 14

tightness 10

area_light <1, 0, 0>, <0, 0, 1>, 2, 2

adaptive 1

jitter

point_at <2, 0, 0>

}

light_source {

<-12, 10, -1>

color Blue

spotlight

radius 12

falloff 14

tightness 10

area_light <1, 0, 0>, <0, 0, 1>, 2, 2

adaptive 1

jitter

// Light fading effects

fade_distance 5

fade_power 1

point_at <-2, 0, 0>

}

// background color

background {color SkyBlue}

// draw CSG: (Sphere \ Cone) U Cylinder results in a unusual ice-cream!

union {

difference {

sphere {

<0.5,1.5,1.5>, 0.65 // center and radius of sphere

texture {PinkAlabaster} // texture defined in TEXTURES.INC

normal {bumps 0.4 scale 0.2} // adding bumpiness

pigment {turbulence 0.05} // stirs up pattern for more

// polishing effects

finish {phong 1} // highlight color for shiny effects

}

cone {

<0,1,0>,0.175 // center and radius of one end

<1,2,3>,0.4 // center and radius of other end

texture {Gold_Metal}

pigment {turbulence 0.05}

finish {Shiny}

} // shiny finish

}

cylinder {

<0.5,1.5,0.5> // center of one end

<0,1,0> // center of other end

0.2 // radius of cylinder

scale 1.3 // expand cylinder

translate <-0.2, -0.55, 0.5> // move to appropriate position

rotate <0,-3,0> // rotate to align with sphere

pigment {turbulence 0.05}

texture {DMFWood4 scale 4} // scale wood patterns by same

// amount in all directions

finish {Shiny}

}

translate y*-0.3

}
 
 

// make candy tiles

#declare Tile = superellipsoid {

<0.5, 0.5>

scale <1, .05, 1>

}

#declare Offset = 2.1

#declare Row = union {

object { Tile }

object { Tile translate z*Offset }

object { Tile translate z*Offset*2 }

object { Tile translate z*Offset*3 }

object { Tile translate z*Offset*4 }

object { Tile translate z*Offset*5 }

object { Tile translate z*Offset*6 }

object { Tile translate z*Offset*7 }

object { Tile translate z*Offset*8 }

object { Tile translate z*Offset*9 }

object { Tile translate z*Offset*10 }

object { Tile translate -z*Offset }

object { Tile translate -z*Offset*2 }

object { Tile translate -z*Offset*3 }

object { Tile translate -z*Offset*4 }

object { Tile translate -z*Offset*5 }

object { Tile translate -z*Offset*6 }

}

union{

object { Row }

object { Row translate x*Offset }

object { Row translate x*Offset*2 }

object { Row translate x*Offset*3 }

object { Row translate x*Offset*4 }

object { Row translate x*Offset*5 }

object { Row translate x*Offset*6 }

object { Row translate x*Offset*7 }

object { Row translate -x*Offset }

object { Row translate -x*Offset*2 }

object { Row translate -x*Offset*3 }

object { Row translate -x*Offset*4 }

object { Row translate -x*Offset*5 }

object { Row translate -x*Offset*6 }

object { Row translate -x*Offset*7 }

texture { Candy_Cane }

finish { phong 1 phong_size 50 reflection .35 }

}

// create a watery glout

plane {

<0,1,0>,0 // normal to plane

texture {Water}

finish { ambient .4 diffuse .7 }

}
 
 

// create hand to hold ice-cream

blob {

threshold .65

sphere { <-.23,-.32,0>,.43, 1 scale <1.95,1.05,.8> } //palm

sphere { <+.12,-.41,0>,.43, 1 scale <1.95,1.075,.8> } //palm

sphere { <-.23,-.63,0>, .45, .75 scale <1.78, 1.3,1> } //midhand

sphere { <+.19,-.63,0>, .45, .75 scale <1.78, 1.3,1> } //midhand

sphere { <-.22,-.73,0>, .45, .85 scale <1.4, 1.25,1> } //heel

sphere { <+.19,-.73,0>, .45, .85 scale <1.4, 1.25,1> } //heel

cylinder { <-.65,-.28,0>, <-.65,.28,-.05>, .26, 1 } //lower pinky

cylinder { <-.65,.28,-.05>, <-.65, .68,-.2>, .26, 1 } //upper pinky

cylinder { <-.3,-.28,0>, <-.3,.44,-.05>, .26, 1 } //lower ring

cylinder { <-.3,.44,-.05>, <-.3, .9,-.2>, .26, 1 } //upper ring

cylinder { <.05,-.28,0>, <.05, .49,-.05>, .26, 1 } //lower middle

cylinder { <.05,.49,-.05>, <.05, .95,-.2>, .26, 1 } //upper middle

cylinder { <.4,-.4,0>, <.4, .512, -.05>, .26, 1 } //lower index

cylinder { <.4,.512,-.05>, <.4, .85, -.2>, .26, 1 } //upper index

cylinder { <.41, -.95,0>, <.85, -.68, -.05>, .25, 1 } //lower thumb

cylinder { <.85,-.68,-.05>, <1.2, -.4, -.2>, .25, 1 } //upper thumb

sphere { <-.65,.28,-.05>, .26, -1 } //counteract pinky knuckle bulge

sphere { <-.65,-.28,0>, .26, -1 } //counteract pinky palm bulge

sphere { <-.3,.44,-.05>, .26, -1 } //counteract ring knuckle bulge

sphere { <-.3,-.28,0>, .26, -1 } //counteract ring palm bulge

sphere { <.05,.49,-.05>, .26, -1 } //counteract middle knuckle bulge

sphere { <.05,-.28,0>, .26, -1 } //counteract middle palm bulge

sphere { <.4,.512,-.05>, .26, -1 } //counteract index knuckle bulge

sphere { <.4,-.4,0>, .26, -1 } //counteract index palm bulge

sphere { <.85,-.68,-.05>, .25, -1 } //counteract thumb knuckle bulge

sphere { <.41,-.7,0>, .25, -.89 } //counteract thumb heel bulge

pigment { Flesh }

scale 0.5

translate <-1,1,0.9>

rotate <0,45,0>

translate y*-0.3

}

// Creating sky effects (sunset)

sky_sphere {

pigment {

gradient y

// color mapping

color_map {

[0.000 0.002 color rgb <1.0, 0.2, 0.0> color rgb <1.0, 0.2, 0.0>]

[0.002 0.200 color rgb <0.8, 0.1, 0.0> color rgb <0.2, 0.2, 0.3>]

}

scale 2

translate -1

}

pigment { // bozo pattern

bozo

turbulence 0.65

// turbulence patterns

octaves 6

omega 0.7

lambda 2

color_map {

[0.0 0.1 color rgb <0.85, 0.85, 0.85> color rgb <0.75, 0.75, 0.75>]

// rgbt = translucent color

[0.1 0.5 color rgb <0.75, 0.75, 0.75> color rgbt <1, 1, 1, 1>]

[0.5 1.0 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>]

}

scale <0.2, 0.5, 0.2>

}

rotate -135*x

}

// Creating multiple layers of ground fog

fog {

distance 150

color rgb<0.3, 0.5, 0.2>

fog_type 2

fog_offset 25

fog_alt 1

turbulence 0.1

turb_depth 0.2

}

fog {

distance 150

color rgb<0.5, 0.1, 0.1>

fog_type 2

fog_offset 15

fog_alt 4

turbulence 0.2

turb_depth 0.2

}

fog {

distance 150

color rgb<0.1, 0.1, 0.6>

fog_type 2

fog_offset 10

fog_alt 2

}

// declare rainbow's colors

#declare r_violet1 = color rgbf<1.0, 0.5, 1.0, 1.0>; // rgbf = fogging color

#declare r_violet2 = color rgbf<1.0, 0.5, 1.0, 0.8>;

#declare r_indigo = color rgbf<0.5, 0.5, 1.0, 0.8>;

#declare r_blue = color rgbf<0.2, 0.2, 1.0, 0.8>;

#declare r_cyan = color rgbf<0.2, 1.0, 1.0, 0.8>;

#declare r_green = color rgbf<0.2, 1.0, 0.2, 0.8>;

#declare r_yellow = color rgbf<1.0, 1.0, 0.2, 0.8>;

#declare r_orange = color rgbf<1.0, 0.5, 0.2, 0.8>;

#declare r_red1 = color rgbf<1.0, 0.2, 0.2, 0.8>;

#declare r_red2 = color rgbf<1.0, 0.2, 0.2, 1.0>;

// create the rainbow

rainbow {

angle 42.5

width 5

distance 1.0e7

direction <-0.2, -0.2, 1>

jitter 0.01

color_map {

[0.000 color r_violet1]

[0.100 color r_violet2]

[0.214 color r_indigo]

[0.328 color r_blue]

[0.442 color r_cyan]

[0.556 color r_green]

[0.670 color r_yellow]

[0.784 color r_orange]

[0.900 color r_red1]

}

}

// Creating text

difference {

box { <-3.5, -1, 0.1>, <3.5, 1, 1>

texture { T_Stone10 } // stone texture defined in STONES.INC

}

text { ttf "timrom.ttf" "ICE-CREAM" 0.15, 0

pigment { BrightGold }

finish { reflection .25 specular 1 }

translate -3*x

}

scale 0.2

translate y*0.1

}

// Creating right ice-cube

superellipsoid {

<.1, .1>

texture { Glass2 }

scale 0.2

translate 0.6

translate x*0.5

}

// Creating left ice-cube

superellipsoid {

<.1, .1>

texture { Glass2 }

scale 0.2

translate 0.6

translate x*-1.4

}
 
 
 
 

POVRAY-Trace 3.1 Render Output: