// Persistence Of Vision raytracer version 2.0 sample file. // Wine glass and chessboard // Image by Dan Farmer #include "colors.inc" #include "shapes.inc" #include "textures.inc" camera { location <50.0, 55.0, -75.0> direction <0.0, 0.0, 2.0> up <0.0, 1.0, 0.0> right <4/3, 0.0, 0.0> look_at <-10.0, 18.0, 0.0> } light_source { <10.0, 50.0, 50.0> colour White } light_source { <-35.0, 30.0, -150.0> colour White } #declare Glass = texture { pigment { color red 1.0 green 1.0 blue 1.0 filter 1.0 } finish { ambient 0.0 diffuse 0.0 reflection 0.1 refraction 1.0 ior 1.33 phong 0.3 phong_size 90 } } #declare Wine = color red 1.0 filter 0.85 #declare Liquid = finish { reflection 0.05 refraction 1.0 ior 1.2 } #declare Bead = object { sphere { <0, 0, 0>, 1 scale <1.65, 0.65, 1.65> } texture { Glass2 } } /* Torus generated using Truman's Torus Generator 1.0 (c) 1991 Truman Brown Torus specs: Major radius: 0.975000 Minor radius: 0.025000 Outer radius: 1.000000 Inner radius: 0.950000 */ #declare Rim = quartic { < 1.000000, 0.000000, 0.000000, 0.000000, 2.000000, 0.000000, 0.000000, 2.000000, 0.000000, -1.902500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 2.000000, 0.000000, 1.900000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, -1.902500, 0.000000, 0.902500 > clipped_by { plane { -y, 0.0 } } scale <15.0, 10.0, 15.0> translate 24.0*y texture { Gold_Texture } } #declare Top = intersection { plane { y, 1.0 } object { QCone_Y } object { QCone_Y scale <0.97, 1.0, 0.97> inverse } clipped_by { plane { y, 0.0 inverse } } scale <15.0, 10.0, 15.0> translate 14.0*y texture { Glass } } #declare Stem = object { Cylinder_Y clipped_by { plane { y, -1.0 inverse } plane { y, 1.0 } } scale <1.0, 12.0, 1.0> translate 6.0*y texture { Glass2 } } #declare Base = object { QCone_Y clipped_by { plane { y, 0.0 } plane { y, -1.0 inverse } } translate 1.0*y /* This actually puts the base of the cone on y=0*/ scale <12.0, 3.25, 12.0> translate <0.0, 0.0, 0.0> /*Does nothing: just for clarity */ texture { Glass2 } } #declare Wine2 = intersection { plane { y, 0.9 } object { QCone_Y scale <0.95, 1.0, 0.95> } clipped_by { plane { y, 0.0 inverse } } scale <14.9, 10.0, 14.9> translate 14.0*y texture { finish { Liquid } pigment { Wine } } } /* Ground plane */ plane { y, 0.0 texture { finish { crand 0.2 } pigment { RichBlue } } } #declare Frame = union { object { Disk_X /* Front rounded edge */ scale <240.0, 4.5, 4.5> translate<-120.0, 0.0, -120.0> } object { Disk_Z /* Left rounded edge */ scale <4.5, 4.5, 240.0> translate <-120.0, 0.0, -120.0> } object { Disk_X /* Rear rounded edge */ scale <240.0, 4.5, 4.5> translate<-120.0, 0.0, +120.0> } object { Disk_Z /* Right rounded edge */ scale <4.5, 4.5, 240.0> translate <+120.0, 0.0, -120.0> } texture { Silver_Texture } } #declare ChessBoard = object { Cube scale <120.0, 4.0, 120.0> texture { pigment { White_Marble scale <20.0, 1.0, 20.0> } finish { reflection 0.12 } } texture { pigment { checker color Black color White filter 1.0 scale <30.0, 4.001, 30.0> } finish { reflection 0.12 } } } #declare WineGlass = union { object { Rim } object { Wine2 } object { Top } object { Bead translate 14.5*y } object { Bead translate 10.0*y } object { Bead translate 7.0*y } object { Bead translate 3.0*y } object { Stem } object { Base } bounded_by { object { Disk_Y scale <15.5, 25.0 ,15.5> } } scale <1.0, 1.50, 1.0> } union { object { Frame } object { ChessBoard } translate <0.0, 4.0, 145.0> } object { WineGlass } /*End of file */