home *** CD-ROM | disk | FTP | other *** search
- // A scene I originally made for PoV 1.0, converted to Rayce.
-
- /* This is ezprezzo.pov, a datafile for rendering an
- espressomaker. The silly name was chosen to avoid
- confusion: It is not the NFF dataset by Todd Elvins, it
- is not the espresso by Lex van der Sluijs (called S-presso)
- Because my computer is rather slow, I have taken great
- pains to make it as fast possible.
-
- It was made by
-
- Han-Wen Nienhuys
-
- If you have suggestions, or modifications, please
- let me know, I am reachable by e-mail at
-
- hanwen@stack.urc.tue.nl
-
- or
-
- wsadjw@urc.tue.nl
-
- (don't forget to mention your mail is for me; it's not my account)
- or by snailmail at
-
- Dommelseweg 1a
- 5581 VA Waalre, Holland.
-
- */
-
-
- #include "colors.inc"
- #include "shapes.inc"
-
-
- #declare Shiny = texture { specular 1.0 roughness 0.01 }
- #declare Dull = texture { specular 0.5 roughness 0.15 }
-
- /****************/
- /**** CAMERA ****/
- /****************/
-
- #declare overview = camera {
- location <10, 40, -50>
- direction <0, 3.5, 0>
- aspect 1.333
- sky <0, 1, 0>
- look_at <0, 4, 0>
- }
-
- #declare zoomin = camera {
- location <15, 23, -40>
- direction <0, 2.8, 0>
- aspect 1.333
- sky <0, 1, 0>
- look_at <0, 8.5, 0>
- fov 30
- }
-
- camera { zoomin }
-
- options {
- iterations 1
- }
-
- /****************/
- /**** LIGHTS ****/
- /****************/
-
- #declare brightlight = color red 1.5 green 1.4 blue 0.0
- // VERY bright yellow
-
- object {
- light_source {
- <4, 30, 0>
- color brightlight
- spotlight
- point_at <0, 1, 0>
- // radius 22
- // falloff 34
- tightness 0.26
- }
- }
-
- object {
- light_source {
- <10, 20, 0>
- color White
- spotlight
- point_at <2, 3, 0>
- // radius 24
- // falloff 34
- tightness 0.23
- rotate <0, 10, 0>
- }
- }
-
- /**************/
- /*** ACTION ***/
- /**************/
-
- /* modified chrome texture
- the diffuse value is kept low otherwise,
- the spoon looks like a yellow blob
- */
-
- #declare Spoon_Texture = texture {
- color LightGray
- ambient 0.23
- diffuse 0.10
- reflection 0.9
- brilliance 8.0
- specular 0.8
- roughness 0.01
- refraction 0.0
- refraction 0.0
- }
-
-
- #declare Coffee_Text =
- texture {
- color Black
- diffuse 0.3
- specular 1.0 roughness 0.01
- brilliance 5
- // dents 0.7
- scale <0.5, 0.2, 0.5>
- reflection 0.5
- refraction 0.0
- }
-
- #declare Sugar_Text =
- texture {
- color Quartz
- specular 1.0
- roughness 0.01
- // metallic
- ambient 0.4
- diffuse 0.5
- brilliance 2
- reflection 0.1 /* needed for contrast */
- // wrinkles 0.8 /* grainy surface */
- scale <0.12, 0.12, 0.12>
- refraction 0.0
- }
-
- #declare Brown_Ceramic = texture {
- colour Brown
- specular 1.0
- roughness 0.01
- reflection color rgb 0.2 * <1,1,1>
- brilliance 3.0
- diffuse 0.3
- ambient 0.3
- refraction 0.0
- }
-
- #declare Cup_Texture = texture {
- Brown_Ceramic
- }
-
- /* metallic texture */
- #declare Gray_Metal =
- texture {
- colour Silver
- specular 1.0
- roughness 0.01
- // metallic
- brilliance 5.0
- diffuse 0.7
- ambient 0.3
- reflection color rgb 0.3 * <1,1,1>
- refraction 0.0
- }
-
- #declare Espresso_Metal = texture { Gray_Metal }
-
- #declare Black_plastic = texture {
- specular color Grey50
- roughness 0.15
- brilliance 0.3
- colour Black
- diffuse 0.4
- ambient 0.6 /* ambient black ?! [yup :) ] */
- refraction 0.0
- reflection 0.0
- }
-
- /**************************** OBJECTS ****************************************/
- /* ESPRESSO MACHINE */
-
-
- /*
- * handle, points at the -Z axis
- */
-
- #declare handle = /* handle */
- composite {
- /* metal part of the handle */
- intersection {
- quadric { QCone_Z scale <1, 1, 15> }
- plane { <0, 0, 1>, -8.5 }
- plane { <0, 0, -1>, 15 }
- }
- /* black cap */
- intersection {
- Disk_Z
- scale <1, 1, 0.5>
- translate <0, 0, -15>
- texture {
- Black_plastic
- }
- }
-
- translate <0, 0, 8.5>
- }
-
- /*
- middle part. Dimensions:
- height: 7.95
- bottom radius: 3.858
- top radius: 3.154218
- */
-
- #declare espart = /* middle part */
- composite {
- object {
- union {
- intersection {
- intersection { /* body */
- quadric { QCone_Y scale <4.3, 48.6, 4.3> }
- quadric { QCone_Y scale <4.2, 48.6, 4.2> inverse }
- plane { <0, 1, 0>, -35.65 }
- plane { <0, -1, 0>, 43.6 }
- translate <0, 43.6, 0>
- }
- intersection { /* take a bite out of it */
- plane { <0, -1, -1>, 0 }
- plane { <0, -1, 1>, 0 }
- plane { <-1, 0, 0>, 0 }
- translate <0, 7, 0>
- inverse
- }
- }
-
- /* ...; it points at +X axis. */
- intersection {
- plane { <1, -1, -1>, 0 }
- plane { <1, -1, 1>, 0 }
- intersection {
- plane { <1, -1, -1>, -0.2 }
- plane { <1, -1, 1>, -0.2 }
- inverse
- }
- plane { <0, 1, 0>, 1 }
- plane { <-1, 0, 0>, 0.5 }
- translate <3.15, 7, 0>
- }
- }
- bounded_by { sphere { <0, 4, 0>, 6 } }
- }
- composite {
- handle
- translate <0, 5, -2.6>
- }
- }
-
- /*
- Bottom part; this normally contains water. Dimensions:
-
- height: 5.00
- top radius: 3.858
- bottom radius: 4.300
- */
-
- #declare esbot = composite { /* bottom part */
- object {
- intersection { /* body */
- quadric { QCone_Y scale <4.3, 48.6, 4.3> }
- quadric { QCone_Y scale <4.2, 48.6, 4.2> inverse }
- plane { <0, 1, 0>, -43.7 }
- plane { <0, -1, 0>, 48.6 }
- translate <0, 48.6, 0>
- }
- bounded_by {
- sphere { <0, 2.5, 0>, 5 }
- }
- }
- object { /* safety valve */
- intersection {
- intersection { Hexagon scale <0.4, 0.5, 0.5> }
- quadric { Cylinder_X scale <1, 0.3, 0.3> inverse }
- }
- bounded_by {
- sphere { <0, 0, 0>, 1.5 }
- }
- translate <4.1, 3.5, 0>
- }
- }
-
- /*
- * the lid on top of the espressomaker.
- */
-
- #declare escap =
- composite {
- object {
- intersection { /* body */
- plane { <0, -1, 0>, 0 }
- sphere { <0, -1.3185, 0>, 3.4185 }
- sphere { <0, -1.3185, 0>, 3.3 inverse }
- }
- bounded_by {
- sphere { <0, -1.3185, 0>, 3.419 }
- }
- }
-
- composite { /* the little knob on top */
-
- /* the black part */
- intersection {
- sphere { <0, 2.85, 0>, 0.75 }
- quadric {
- Cylinder_Y scale <0.4, 1, 0.4> inverse
- }
- texture {
- Black_plastic
- }
- }
-
- /* metal core */
- intersection {
- sphere { <0, 2.85, 0>, 0.75 }
- quadric { Cylinder_Y scale <0.4, 1, 0.4> }
- }
-
- bounded_by {
- sphere { <0, 2.85, 0>, 0.75 }
- }
- }
- }
-
- /* glue everything together */
-
- #declare espressomachine =
- composite {
- composite {
- espart
- translate <0, 5, 0>
- }
- composite {
- escap
- translate <0, 13, 0>
- }
- composite {
- esbot
- translate <0, 0, 0>
- }
- texture { Espresso_Metal }
- }
-
- /***********/
- /*** CUP ***/
- /***********/
-
- #declare cupbody = /* body */
- object {
- union {
- intersection {
- intersection { /* a Cylinder */
- Disk_Y scale <2.5, 5.5, 2.5>
- }
- quadric { /* make it hollow */
- Cylinder_Y scale <2.1, 5.5, 2.1>
- inverse
- }
- translate <0, 1.1, 0>
- }
- intersection { /* small stand */
- quadric { QCone_Y scale <2, 4.1, 2> }
- plane { <0, 1, 0>, 4.1 }
- plane { <0, -1, 0>, -3 }
- translate <0, -3, 0>
- }
- }
- bounded_by { sphere { <0, 3.3, 0>, 4.2 } }
- }
-
- #declare saucer =
- object {
- intersection {
- intersection {
- sphere { <0, 4.85, 0>, 6.8 }
- plane { <0, -1, 0>, 0 }
- }
- intersection {
- sphere { <0, 7.58, 0>, 8.47 }
- plane { <0, -1, 0>, -0.6 }
- inverse
- }
- intersection { /* place for the cup */
- plane { <0, -1, 0>, -0.4 }
- quadric { Cylinder_Y scale <2.1, 1, 2.1> }
- inverse
- }
- }
- bounded_by {
- sphere { <0, 4.86, 0>, 6.81 }
- }
- }
-
-
- #declare ear =
- object {
- intersection {
- torus { 1.5, 0.3
- translate <-1.2, 0, 0>
- scale <0.9, 1, 1>
- rotate 90*x
- sturm
- }
- plane { <1, 0, 0>, 0 }
- }
- }
-
- /* The hub on top of the cup
- */
- #declare cupring = torus { 2.3, 0.2 sturm }
-
- /****************/
- /* PARAFERNALIA */
- /****************/
-
- #declare Coffee = /* YESSS! Coffee, yummie ! */
- object {
- plane { <0, 1, 0>, 0 }
- clipped_by {
- sphere { <0, 0, 0>, 2.2 }
- }
- texture {
- Coffee_Text
- }
- }
-
-
- #declare spoon =
- composite {
- box { <-5, -0.2, -0.3>, <0, 0, 0.3> }
- box { <0, -0.2, -0.3>, <0.5, 0, 0.3> rotate <0, 0, -30> }
- intersection {
- quadric { Ellipsoid scale <1.5, 1.5, 1.5> }
- quadric { Ellipsoid scale <1.4, 1.4, 1.4> inverse }
- plane { <0, 1, 0>, -0.5 }
- scale <0.75, 0.5, 0.75>
- translate <1.14, 0, 0>
- }
-
- translate <0, 0.2, 0>
- rotate <0, 0, 3>
- texture {
- Spoon_Texture
- }
-
- bounded_by { box { <-5, -1.5, -2>, <4, 1, 2> } }
- }
-
- #declare sugarcube = /* a sugarcube */
- object {
- box {
- Cube
- scale <1, 0.5, 0.75>
- translate <0, 0.5, 0>
- }
- texture {
- Sugar_Text
- }
- }
-
- /*****************************************************************************/
-
- #declare cup =
- composite {
- object {
- cupbody
- }
- object {
- ear
- translate <-2.5, 3.3, 0>
- }
- torus {
- cupring
- translate <0, 6.6, 0>
- }
- }
-
-
- #declare cupandsaucer =
- composite {
- composite {
- cup
- translate <0, 0.4, 0>
- }
- object { saucer }
- composite {
- object {
- sugarcube
- translate <0, 0.4, -3.3>
- }
- object {
- sugarcube
- rotate <0, 20, 0>
- translate <0, 0.4, -3.3>
- rotate <0, 45, 0>
- }
- rotate <0, -55, 0>
- }
- composite {
- spoon
- rotate <0, 0, -10>
- rotate <0, 90, 0>
- translate <-4, 1.3, 0>
- rotate <0, -50, 0>
- }
- texture { Cup_Texture }
- }
-
- /*****************************************************************************/
- /* now, build the scene */
- composite { /* the Holy machine */
- espressomachine
- rotate <0, 20, 0>
- translate <-6, 0, 5>
- }
-
- composite { /* cup and thingies */
- cupandsaucer
- translate <6, 0, 2>
- }
-
- object { /* floor */
- plane { <0, 1, 0>, 0 }
- texture {
- colour Magenta
- ambient 0.16
- diffuse 0.84
- reflection 0.0
- refraction 0.0
- }
- }
-