// Copyright (C) 2003 Nicolas P. Rougier (rougier@loria.fr) // Tux // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // Persistence of Vision Ray Tracer Scene Description File // File: tux.pov // Vers: 3.5 // Desc: Tux // Date: 08/2003 // Auth: Nicolas Rougier // Cmd : povray +Itux.pov +w600 +h600 +fn +am2 +P +a0.1 // --------------------------------------------------------------------------- #version 3.5; #include "colors.inc" #include "math.inc" #include "transforms.inc" #include "spline.inc" #include "shapes.inc" // ======================================== // Notes // ======================================== // ======================================== // Switches // ======================================== #declare use_radiosity = on; // ======================================== // Settings // ======================================== global_settings { assumed_gamma 1.0 #if (use_radiosity) radiosity { pretrace_start 0.08 pretrace_end 0.02 count 600 error_bound 0.05 nearest_count 5 recursion_limit 1 low_error_factor .5 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.0 adc_bailout 0.01/2 normal on } #end } // ======================================== // Default settings // ======================================== #default { texture { #if (use_radiosity) finish { ambient 0.0 diffuse 1.0 } #else finish { ambient 0.1 diffuse 0.6 } #end } } // ======================================== // Lights // ======================================== light_source { <-10, 20, -10> color rgb <1.0, 0.99, 0.98>*1 area_light <10,0,0> <0,0,10> 10,10 circular orient jitter adaptive 2 } // ======================================== // Camera // ======================================== #declare EyePos = <0, 1,-8>; #declare EyeLook = <0, 1, 0>; camera { location EyePos look_at EyeLook direction 1.5*z right x*image_width/image_height angle 30 } // ======================================== // Sky // ======================================== sky_sphere {pigment {rgb 1}} // ======================================== // Ground // ======================================== plane {y,0 texture {pigment {rgb 1} finish {ambient 0.1 diffuse 1}}} plane {z,100 inverse texture {pigment {rgb 1} finish {ambient 0.1 diffuse 1}}} // ======================================== // Spheric to cartesian conversion macro // ======================================== #macro spheric (rho,theta,phi) #end // ======================================== // Tux // ======================================== // ======================================== // FurTex macro // Copyright April 2000 Rune S. Johansen // => http://runevision.com // Use: object {MyObject FurTex(color MyColor)} // ======================================== #macro FurTex(Color) texture { average texture_map { [ pigment { bozo color_map {[0,color Color*0.9][1,color Color*1.1]} scale 0.001 } normal { average normal_map { [bumps 0.3*2 warp {turbulence 1} scale 0.2] [bumps 0.2*2 warp {turbulence 0.5} scale 0.001] } } finish {ambient 0.1*2 diffuse 0.6*2 brilliance 0.6} ] [ pigment {color -Color} finish {ambient 0 diffuse 0 phong 0.5*2 phong_size 2 metallic} ] } } #end // ======================================== // Textures // ======================================== #declare t_fur_black = FurTex (color <1,1,1>*0.10) #declare t_fur_white = FurTex (color <1,1,1>*1.01) #declare t_eye_white = texture {pigment{rgb 1}} #declare t_eye_black = texture {pigment{rgb 0.01} finish {specular 1 roughness 0.005}} #declare t_beak = texture {pigment {rgb <1,.55,0>}} #declare t_tongue = texture {pigment {rgb <1,0,0>} finish {specular .5 roughness 0.005}} #declare t_feet = texture {pigment {rgb <1,.55,0>}} // ======================================== // Beak // ======================================== #declare beak = union { // Beak-up #declare beak_up = difference { difference { superellipsoid { <.25,.25> } superellipsoid { <.25,.25> scale .9 translate -y} translate y scale /2 rotate <0,45,0> matrix <1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0 > } plane {x,0 inverse} scale <1,1,1>*.6 rotate -y*90 } // Beak holes difference { object {beak_up} #local Norm = <0,0,0>; #local Where = trace (beak_up, < 0.1,0.2,-10>, <0, 0, 1>, Norm ); sphere {0,.025 translate Where} #local Norm = <0,0,0>; #local Where = trace (beak_up, <-0.1,0.2,-10>, <0, 0, 1>, Norm ); sphere {0,.025 translate Where} rotate 5*x translate <0,1.1,-.8> texture {t_beak} } // Beak-down difference { superellipsoid { <.25,.25> translate y scale /2 rotate <0,45,0> matrix <1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0 > } plane {x,0 inverse} scale <1 ,-1, 1>*.57 rotate -y*90 rotate -15*x translate <0,1.16,-.75> texture {t_beak} } // Beak-interior intersection { sphere { <0,1.5,0>, 1.001 texture {pigment {rgb <0,0,0>}} // Interior color } superellipsoid { <.25,.25> translate y scale /2 rotate <0,45,0> matrix <1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0 > scale <1,1,1>*.57 rotate -y*90 translate <0,1.1,-.8> } } } // ======================================== // Body // ======================================== #declare body = difference { union { // Body sphere {<0.0, 0.0, 0.0>, 1 scale <1, .75, 1> translate y*.75} // Head sphere {<0.0, 1.5, 0.0>, 1} texture {t_fur_black} } intersection { union { // Body (a bit smaller) sphere {<0.0, 0.0, 0.0>, 0.99 scale <1, .75, 1> translate y*.75 texture {t_fur_white}} // Head (a bit smaller) sphere {<0.0, 1.5, 0.0>, 0.99 texture {t_eye_white}} inverse } union { // Belly sphere {0,1 scale .88 translate <0,.5,-.5> texture {t_fur_white}} // Eyes sphere {0,1 scale .60 translate <-.5,1.5,-1> texture {t_fur_white}} sphere {0,1 scale .60 translate <.5,1.5,-1> texture {t_fur_white}} } } } // ======================================== // Eyes // ======================================== #declare eyes = union { #local left_eye_pos = spheric (.99, pi/2+pi/64, pi+pi/12); #local right_eye_pos = spheric (.99, pi/2+pi/64, pi-pi/12); #local eye_size = .1; sphere { 0, eye_size Axial_Scale_Trans(right_eye_pos, .65) translate right_eye_pos+1.5*y no_shadow texture {t_eye_black} } sphere { 0, eye_size Axial_Scale_Trans(left_eye_pos, .65) translate left_eye_pos+1.5*y no_shadow texture {t_eye_black} } } // ======================================== // Tongue // ======================================== #declare tongue = object { #macro spline_radius_function () cos(sClock*pi/3.5) #end #declare ObjectSpline = create_spline ( array[4] { <0, 0, -0>, <0, .25, -1>, <0, -0, -1.5>, <0, -.7, -1> }, create_hermite_spline + spline_sampling (on) ) blob_spline (ObjectSpline, spline_radius (<0.5, 0.25>) + blob_stretch_factor (20)) scale .25 translate <0,1.1,-.78> texture {t_tongue} } // ======================================== // Aisles // ======================================== #declare aisles = union { // Aisles #declare ObjectSpline = create_spline ( array[4] { <0, 0, 0>, <1, 0, 0>, <2, 0, 0>, <0, 3, 0> }, create_hermite_spline + spline_sampling (on) ) #macro spline_radius_function () cos(sClock*pi/2.5) #end // Right aisle object { blob_spline (ObjectSpline, spline_radius (<0.5, 1.25>) + blob_stretch_factor (20)) rotate -y*90 rotate x*30 rotate z*10 scale .25 translate <1,.75,0> texture {t_fur_black} } // Left Aisle object { blob_spline (ObjectSpline, spline_radius (<0.5, 1.25>) + blob_stretch_factor (20)) rotate -y*90 rotate x*30 rotate -z*10 scale .25 translate <-1,.75,0> texture {t_fur_black} } } // ======================================== // Feet // ======================================== #declare _foot = blob { threshold 0.5 sphere {0, 3.5, 2 scale <.7,.25,.9> translate <0,0,-1.5>} cylinder { <0, 0, -1>, <0, 0, -3.5>, 1, 2 rotate y*20} cylinder { <0, 0, -1>, <0, 0, -4.0>, 1, 2 } cylinder { <0, 0, -1>, <0, 0, -3.5>, 1, 2 rotate -y*20} scale <1,.85,1>*.19 } #declare foot = object { _foot #local Norm = <0,0,0>; #local Where = trace (_foot, <0,10,0>, <0, -1, 0>, Norm ); translate y*Where.y #local Norm = <0,0,0>; #local Where = trace (_foot, <0,0,10>, <0, 0, -1>, Norm ); translate -z*Where.z } #declare feet = union { #local left_foot_pos = <-0.2, 0.0, 0.0>; #local right_foot_pos = <+0.2, 0.0, 0.0>; object {foot rotate y*15 translate left_foot_pos} object {foot rotate -y*15 translate right_foot_pos} /* #local left_foot_pos = spheric (0.8, pi/2+pi/4, pi+pi/7) + <0.0, 0.5175, 0.0>; #local right_foot_pos = spheric (0.8, pi/2+pi/4, pi-pi/7) + <0.0, 0.5175, 0.0>; object {foot rotate y*15 rotate x*45 translate left_foot_pos} object {foot rotate -y*15 rotate x*45 translate right_foot_pos} */ texture {t_feet} } #declare tux = union { union { object {eyes} object {beak} object {tongue} object {body} object {aisles} translate y*.05 } object {feet} } object { tux rotate y*5 }