|
|
Code for the chocolate bar posted in p.b.i
//start
#declare LO=<40,120,-100>;
#declare LA=<0,0,0>;
camera{
up y
right x*image_width/image_height
angle 60
location LO
look_at LA
aperture 0.5 // [0...N] larger is narrower depth of field
(blurrier)
blur_samples 120 // number of rays per pixel for sampling
focal_point LA // point that is in focus <X,Y,Z>
confidence 0.98 // [0...1] when to move on while sampling
(smaller is less accurate)
variance 1/500 // [0...1] how precise to calculate (smaller
is more accurate)
}
light_source{0
rgb 1
fade_power 2
fade_distance 1500
translate <100,1000,-400>
}
#declare A=10;
#declare BUMP=function (x) {1-pow(1/2-cos(radians(360*(x+0.5)))/2,A)}
#declare Povray_LogoX =
union {
difference {
cone {2*y, 1, -4*y, 0}
sphere {2*y, 1.4 scale <1,1,2>}
}
difference {
sphere {0, 1 scale <2.6, 2.2, 1>}
sphere {0, 1 scale <2.3, 1.8, 2> translate <-0.35, 0, 0>}
rotate z*30 translate 2*y
}
sphere {2*y, 1}
rotate <0, 0, -25>
translate <-0.5,-0.35,0>
scale 1/4
}
difference{
union{
intersection{
height_field {
function 500,500 {pattern{function{min(BUMP(x),BUMP(y))} translate
<0,1/2,0> scale 1/10}}
smooth
translate <-1/2,1,-1/2>
scale <10,1/4,10>*4
}
box{<-12,0,-6><12,5,6>}
}
#local i=-3;#while (i<3)
#local j=-1;#while (j<2)
object{Povray_LogoX rotate x*90 rotate -y*90
scale 1.3
translate <2,0,0> translate <4*i,1.95,4*j>
}
#local j=j+1; #end
#local i=i+1; #end
}
texture{
pigment{color rgb <.75,.4,.28>*1.1}
finish{
ambient .15
diffuse .35
phong .35
phong_size 14
specular .9
roughness .004
}
}
scale 6.25
}
//end
-tgq
Post a reply to this message
|
|