POV-Ray : Newsgroups : povray.binaries.images : Ping Pong Collaboration? : Re: Ping Pong Collaboration? [JPG 800 x 600, 31 KB] Server Time
2 Aug 2024 20:21:11 EDT (-0400)
  Re: Ping Pong Collaboration? [JPG 800 x 600, 31 KB]  
From: Jörg 'Yadgar' Bleimann
Date: 22 Mar 2007 17:45:54
Message: <46030722@news.povray.org>
High!

What about this:



#default {finish {ambient 0}}

// Begin additions by Yadgar

#declare s1=seed(1979);

#declare Silver_Ball=
sphere
{
   0, 0.04
   texture
   {
     pigment { color rgb 0.75 }
     finish { brilliance 0.7 diffuse 1 reflection 0.5 specular 0.8 
roughness 0.001 }
   }
}

// End additions by Yadgar

camera {
	location <-5,10,-20>
	look_at 0
}

light_source {
	<1,1,-1>*10 color rgb 1
	spotlight	point_at y*3	radius 15	falloff 25
	area_light	x*2,y*2,25,25	circular		orient		adaptive 0
}

plane {
	y, 0
	pigment {checker color rgb 2, color rgb 0 scale 2}
	finish {specular 1 reflection 1/3}
}

#macro rubber(col)
	texture {
		pigment {color col}
		finish {specular 1/4}
		normal {bumps 1/50 scale 1/100}
	}
#end

sphere {<0,3,0>, 3	rubber(rgb x)}
sphere {<4,2,-3>, 2	rubber(rgb x+y)}
sphere {<-2,1,-4>, 1	rubber(rgb z)}

// Begin additions by Yadgar

#declare n=0;

#while (n<1800)
   #declare r1=rand(s1)*360;
   #declare r2=asin(rand(s1)*2-1);
   object { Silver_Ball translate <0, 3, 0>+3*<sin(r1*(pi/180))*cos(r2), 
sin(r2), cos(r1*(pi/180))*cos(r2)> }
   #declare n=n+1;
#end

#declare n=0;

#while (n<800)
   #declare r1=rand(s1)*360;
   #declare r2=asin(rand(s1)*2-1);
   object { Silver_Ball translate <4, 2, 
-3>+2*<sin(r1*(pi/180))*cos(r2), sin(r2), cos(r1*(pi/180))*cos(r2)> }
   #declare n=n+1;
#end

#declare n=0;

#while (n<200)
   #declare r1=rand(s1)*360;
   #declare r2=asin(rand(s1)*2-1);
   object { Silver_Ball translate <-2, 1, -4>+<sin(r1*(pi/180))*cos(r2), 
sin(r2), cos(r1*(pi/180))*cos(r2)> }
   #declare n=n+1;
#end

// End additions by Yadgar


Post a reply to this message


Attachments:
Download '2007_03_22_ping_pong_collaboration_take_2.jpg' (31 KB)

Preview of image '2007_03_22_ping_pong_collaboration_take_2.jpg'
2007_03_22_ping_pong_collaboration_take_2.jpg


 

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