POV-Ray : Newsgroups : povray.binaries.images : potatoes... : Re: potatoes... Server Time
5 Nov 2024 10:23:29 EST (-0500)
  Re: potatoes...  
From: nemesis
Date: 23 Oct 2006 12:45:01
Message: <web.453cf0cb9fba09f2f2ff13290@news.povray.org>
an update to my potato thingy.  i'll eventually make some potato dish... :P

source:


/**
 * just for fun... nam### [at] gmailcom oct/2006
 *
 **/


/**************************************************************************
  ********************** scene elements **********************************
 **************************************************************************/


/************ color maps ************/

#declare cm_potato1 = color_map { [0 rgb <1,1,.4>][.3 rgb .8*<1,1,.4>][1 rgb
<1,1,.6>] }
#declare cm_potato2 = color_map { [0 rgb <1,1,.4>][.2 rgb .7*<1,1,.5>][1 rgb
<1,1,.5>] }


/************ textures ************/

#declare t_shiny_metal =
texture {
 pigment { rgb .8 }
 finish { specular 1 roughness .06 ambient .3 diffuse .1 metallic 2.2
reflection { .3 metallic .8 }}
}

#declare t_chalk_marble = texture {
        pigment { average
                pigment_map {
                        [1 marble turbulence 2.8 frequency .2 scale 60
rotate 45 translate 3
                                color_map { [0 rgb 1][.2 rgb 1][.3 rgb
...6*(x+z)][.4 rgb <1,.8,1>][.46 rgb 1][.78 rgb 1][.8 rgb 1][.92 rgb
...7*<.8,1,.5>][1 rgb .5*<.7,.9,.3>] }]
                        [1 bozo scale .08 turbulence .4 color_map { [0 rgb
1][.6 rgb <.6,.8,.7>][1 rgb <1,1,.7>] }]
                }
        }
        normal { bozo .9 scale .08 turbulence .4 }
        finish { diffuse .7 ambient .4 specular 3 roughness .34 reflection {
...07 } }
        rotate 30 scale .3
}

#declare t_wood1 = texture {
        pigment { average
                pigment_map {
                        [0 bozo color_map { [0 rgb <1,.8,.7>][.66 rgb
<1,.8,.7>] [.82 rgb .9*<1,.8,.6>][1 rgb .6*<1,.8,.6>] }]
                        [.6 wood turbulence .2 rotate 80 scale 3 color_map {
[0 rgb <1,.8,.7>][.26 rgb <1,.8,.7>] [1 rgb .6*<1,.8,.6>] }]
                        [.7 wood turbulence .2 rotate 60 scale 2.4 translate
...1 color_map { [0 rgb <1,.7,.4>][1 rgb .8*<1,.6,.3>] }]
                }
                scale 3*y
        }
        normal { average
                normal_map {
                        [1 bozo bump_size -2.8 frequency .8 scale 2*x scale
...4]
                        [.2 wood bump_size .6 turbulence .2 rotate 80 scale
3]
                        [.6 wood bump_size -.7 turbulence .2 rotate 60 scale
2.4]
                }
                scale 3*y
        }
        finish { phong .4 phong_size 10 }
        rotate 86
        scale .16
}

#declare t_potato_base = texture {
 // naked
 //pigment { rgb <1,1,.6> }
 pigment { bozo color_map { cm_potato1 } turbulence .5 }
 normal { average
  normal_map {
   [.9 granite bump_size .3 turbulence .5 scale .1]
   [1 bozo bump_size .9 turbulence .5 scale .06]
   [.7 bumps 1.1 turbulence .5 scale 1.38]
  }
 }
 finish { roughness .1 ambient .32 diffuse .62 phong .16 phong_size 10 }
 scale .3
}

#declare t_potato =
texture { t_potato_base }
texture {
        // little "holes" sprinkled throughout the surface
        pigment { bozo scale .38 color_map { [0 rgb .6*<.8,.7,.2>][.1 rgbt
1][.2 rgb <.8,.7,.2>][.22 rgbt 1][1 rgbt 1] } }
        //normal { bozo bump_size 2.2 } // ?? hmm
        scale .06
}


/************ shapes ************/

#declare potato = blob {
 threshold .3

 sphere { -.1*x, .5, .6 scale 2*x }

 //sphere { 0, .9, .8 }
 sphere { 0, .84, .76 }
 /*sphere { 0, .8, .8 }
 sphere { .12*x-.1*y, .7, -.28 scale x*3 }*/

 sphere { .4*x-.1*y, .5, .7 }
 sphere { .5*x, .45, .8 }
 sphere { .6*x, .4, .9 }

 texture { t_potato }
}


#declare knife = union {
       /************ handle **********/
       blob {
               threshold .2
               // base
               cylinder { -.5*x, .5*x .5 1 }
               // another
               sphere { 0, .4 (.4) scale <.4,1.7,.6> rotate -10*z translate
...76*x }
               // squeezing the sides
               cylinder { -.5*x, .5*x .5 (-.6) /*scale 2*y*/ translate .3*z
}
               cylinder { -.5*x, .5*x .5 (-.6) /*scale 2*y*/ translate -.3*z
}
               // deforming the handle
               sphere { -.3*x, .5 (-.04) scale <1,2,.4> }
               sphere { .3*x, .5 (-.2) scale 2*y rotate 30*z translate -.4*y
}

               texture {
                       pigment { rgb <0,0,.2> }
                       //finish { phong .8 phong_size 30 ambient .35 }
                       finish { ambient .5 specular .8 roughness .03 }
               }
               scale 1.4*x
       }
       /************* blade **************/
       /*blob {
               threshold .3
               cylinder { -.5*x,.5*x .49 1 scale <3,1,.02>
                       //pigment { rgbt <1,0,0,.7> }
               }
               cylinder { -.02*z,.02*z .49 .7 scale 3*x+.01*z translate
-.3*y+1.4*x
                       //pigment { rgbt <0,0,1,.7> }
               }
               texture { t_shiny_metal }
               scale y*.7
               translate 1.5*x
       }*/
       /************* blade **************/
       /*difference {
               // base
               blob {
                       threshold .3
                       cylinder { -.5*x,.5*x .49 1 scale <3,1,.02>
                               //pigment { rgbt <1,0,0,.7> }
                       }
                       cylinder { -.02*z,.02*z .49 .7 scale 3*x+.01*z
translate -.3*y+1.4*x
                               //pigment { rgbt <0,0,1,.7> }
                       }
                       /*texture { t_shiny_metal }
                       scale y*.7
                       translate 1.5*x*/
               }
               // cut
               box { -.5,.5 translate -.5*z scale 5*x+2*z translate -z*.02
rotate -x }

               texture { t_shiny_metal }
               scale y*.7
               translate 1.5*x
       }*/
       /************* blade **************/
       difference {
               sphere { 0, .3 scale <4.3,.7,.02> }
               sphere { 0, .3 scale <5,.7,.02> translate <.5,-.2,-.005> }
               texture { t_shiny_metal }
               scale <1.5,1.2,2>
               translate 1.6*x
       }
} // knife



/**************************************************************************
  ************** mounting the scene from the declared elements ***********
 **************************************************************************/

object { potato }
object { knife scale .6 translate x-.3*y rotate z*20 rotate y*40 translate
<-.5,-.03,.4>*4 }
#if (1)
object { potato texture { t_shiny_metal } rotate 30*x rotate 60*y translate
4*z-.6*x }
object { potato texture { t_wood1 rotate z*40 scale .3 } rotate -30*x rotate
-120*y translate 4.8*z+2.6*x }
#end

// floor
plane { y, -.46 texture { t_chalk_marble scale .8 } }

// origin mark
//cylinder { -y,y .02 pigment { rgb x } }

// sky
sphere { 0, 100 pigment { rgb <.7,.7,1> } }

global_settings { assumed_gamma 1.4
        //radiosity { brightness 1.4 normal on }
}

light_source { 15-50*z rgb .7
 area_light 3*x, 3*y, 4, 4 adaptive .001 jitter
}

light_source { 8*y-6*x .4
 area_light 3*x, 3*y, 3, 3 adaptive .001 jitter
}

#declare cam1 = camera { location <-1.2,1.2,-3>*1 look_at -.3*x angle 40
 //aperture .16 blur_samples 20 focal_point <-.3,.4,.6>
 //aperture .056 blur_samples 20 focal_point 0
}
#declare cam2 = camera { location -3*z+y look_at 0 angle 40 }

camera { cam1 }


Post a reply to this message


Attachments:
Download 'batatas_e_faca.jpg' (86 KB)

Preview of image 'batatas_e_faca.jpg'
batatas_e_faca.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.