//apple //by Kurt Bangert //http://www.travelnotes.de // I am not quite pleased with this apple, // and I hope to improve it some day #include "colors.inc" #include "textures.inc" #declare appletex1 = texture{pigment{ granite color_map {[0.0 color rgb<0,.6,0>] [0.5 color rgb<0,.5,0>] [1.0 color rgb<0,.6,0>]}} } #declare apple_finish = finish { ambient .3 diffuse .2 phong .1 specular .1 roughness 1 reflection .1} #declare apple_lathe= lathe { cubic_spline 13, <0.000000, 0.000000> <0.78,-0.45> <0.9, -0.63> <1.74,-0.99> <3.78, 0.81> <4.65, 1.02> <5.70, 4.32> <5.07, 7.23> <2.58, 8.91> <1.11, 8.46> < .2, 7.80> < 0., 7.40> < 0., 0. >} camera {location <0,0,-23> look_at <0,0,0>} light_source { <-5,2,-15> color rgb <2,2,2>} light_source { <10,2,0.> color rgb <1,1,1> } #declare apple_part=object {apple_lathe texture {appletex1 scale <10,50,10> } finish {apple_finish}} #declare apple= difference { object {apple_part scale .5} object {height_field {gif "plasma1.gif" smooth translate <-.5,-1.6,-.5> scale <9,2,9>} pigment{color rgb<.8,.6,.5>} finish {ambient 0.3 diffuse 0.6 reflection 0.1} rotate y*90 rotate z*100 }} #declare stalk_torus = object {torus {.6,.15} scale <1,1,7>} #declare stalk= object {stalk_torus clipped_by { plane { x,0 } plane {-z,3.0} } } object {stalk rotate x*90 rotate y*180 texture {pigment {color rgb <.5,.3,.15>} normal {wrinkles 1 scale <.2,1,.2>}} translate <-.9,4,-6>} object {apple scale 2.5 rotate y*30 rotate -x*30 translate -y*4 }