POV-Ray : Newsgroups : povray.binaries.images : Ping Pong Collaboration? : Re: Ping Pong Collaboration? Into the first branching away... Server Time
3 Aug 2024 02:17:47 EDT (-0400)
  Re: Ping Pong Collaboration? Into the first branching away...  
From: Thomas de Groot
Date: 24 Mar 2007 03:55:06
Message: <4604e76a@news.povray.org>
Here we go!
Transformed the plane into a cube.




#include "colors.inc"
#include "stones.inc"

#default {finish {ambient 0}}

// global_settings + photons added by William
global_settings {
   photons {
     count 200000
     max_trace_level 10
     autostop 0
     jitter 0
   }
}
// end global_settings

// 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.5,1.3,-1.0>*10 color rgb 1
   spotlight point_at y  radius 15 falloff 25
   area_light  x*2,y*2,25,25 circular    orient    adaptive 0
   photons {
     refraction on reflection on
   }
}

// Start addition Thomas de Groot
intersection {
  plane {
    y, 0
  }
  box { <-10, -10, -10>, <10, 0.1, 10> }
  rotate -35*y
  texture {
    T_Stone2
    finish {specular 1 reflection 0.1}
    scale 2
  }
}

// End addition Thomas de Groot

#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)}

// Box and sphere added by William

#declare index = 0;
#while (index < 50)
  sphere {
    0, 0.1
    scale <1, 0.5, 1>
    translate y * 0.75
    rotate <rand(s1) * 90, rand(s1) * 360, rand(s1) * 90>
    translate <1, 2, -5>

   texture
   {
      pigment { color rgbt 0.75 }
      normal {bumps 0.5 scale 0.2}
      finish {
       brilliance 0.5
       diffuse 0.1
       reflection 0.5
       specular 0.75
       roughness 0.001
     }
   }

   interior
   {
     ior 1.3
   }
   photons {
     target
     refraction on
     reflection on
     collect off
   }
  }

  #declare index = index + 1;
#end

sphere{
  <1, 2, -05>, 0.75
  rubber(rgb <0, 0.5, 0>)
}

box {
   <0, 0, 0>
   <2, 2, 2>
   rotate y * 45
   translate z * -5
   texture
   {
      pigment { color rgbt 0.75 }
      normal {bumps 0.5 scale 0.2}
      finish {
       brilliance 0.5
       diffuse 0.1
       reflection 0.5
       specular 0.75
       roughness 0.001
     }
   }

   interior
   {
     ior 1.35
   }
   photons {
     target
     refraction on
     reflection on
     collect off
   }
}

// End of William's box

// 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 'PingPong.jpg' (21 KB)

Preview of image 'PingPong.jpg'
PingPong.jpg


 

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