|
|
It is said somewhere that every beginner must do a reflecting sphere on a
checker.
So, I'm a beginner, and...
I wanted to be more creative than only copying a single scee everybody
already did, I hope you'll like the result.
And the presentations : I'm 29 years old, french, chemist (R&D engineer),
musician and chess player (a little). I'm beginning in POV-Ray and hope to
be the next Michel Ange (!)
People that can read french could see my progression on
croquis.over-blog.com
The others can still look at the pictures and give me loooots of advices.
See ya later for more interesting pictures !
Ah ! I forgot : the source...
global_settings{
max_trace_level 10
}
#declare R1=seed(0);
camera {
location <-1,6,-8>
look_at <0,2,0>
}
light_source {
<0,5,-15>
color rgb <1,0,0>
}
light_source {
<-0.1,5,-15>
color rgb <0,1,0>
}
light_source {
<0.1,5,-15>
color rgb <0,0,1>
}
// sphere
#declare haut = 0;
#while (haut <=4)
#declare rayon = sqrt(abs(4-(haut-2)*(haut-2)));
#declare circonf =pi*rayon*rayon;
#declare nombre = int(circonf/0.5);
#if (nombre =0)
#declare nombre = 1;
#end
#declare pas = 360/nombre;
#declare position = 0;
#declare of = 360*rand(R1);
#while (position < nombre)
#declare position = position +1;
sphere {
<rayon* cos(pas*position+of),haut,rayon*sin (pas*position+of)>,0.2
texture {
pigment {color rgb 1}
finish {reflection 1
conserve_energy
}
}
}
#end
#declare haut = haut + 0.4;
#end
//plan
plane {y,0
texture {pigment {color rgb <1,1,0>} finish {reflection 0.2
conserve_energy} }
}
//cases
#declare a=-30;
#while (a<30)
#declare a=a+1;
#declare b=-50;
#while (b<50)
#declare b=b+1;
#if (int ((a+b)/2) = (a+b)/2) // 1 case sur 2
#declare hauteur =0.1;
#if (int ((a+b)/3) = (a+b)/3)
#declare hauteur =0.2;
#end
#if (int ((a+b)/3) = (a+b)/3+1)
#declare hauteur =0.15;
#end
#if ((a=b+1) + (a=b-1) + (a=2*b) + (b=2*a))
#declare hauteur =hauteur +0.2;
#end
#if (abs(a)>5)
#declare hauteur = hauteur * abs(a)/5;
#end
#if (abs(b)>5)
#declare hauteur = hauteur * abs(b)/5;
#end
#declare hauteur = hauteur * 0.5*(1+rand(R1));
#declare couleur = rgb
<0,0,1>+0.5*rand(R1)*x+0.5*rand(R1)*y-0.5*rand(R1)*z;
box{<a-0.5,-0.1,b-0.5>,<a+0.5,hauteur,b+0.5> //case
texture {
pigment {color couleur}
finish {phong 1}
}
}
#end
#end
#end
Post a reply to this message
Attachments:
Download 'sphere reflechis.JPG' (111 KB)
Preview of image 'sphere reflechis.JPG'
|
|