POV-Ray : Newsgroups : povray.text.scene-files : More Math... Server Time
31 Oct 2024 23:30:28 EDT (-0400)
  More Math... (Message 1 to 1 of 1)  
From: Spider
Subject: More Math...
Date: 26 Jan 1999 14:06:03
Message: <36AE110D.E6DA2091@bahnhof.se>
Here it is.
Not attached, sorry.


//Spider

#declare EndY = 2000;
#declare EndX = 1500;
#declare Drops = 625;
#declare Multi = 1;

global_settings {
  assumed_gamma 1.0 
  max_trace_level Drops*10  //Ridiculously high....
}

camera {
  location  <0.0, -100, -3*EndX>
  direction 1*z
  right     4/3*x
  look_at   <0.0, 0,  0.0>
}
#declare M_Good = 
material { 
  interior { ior 1.35 }
  texture { 
    pigment { rgbf <.8, .3, .8, .9> }
    finish { ambient <.3, -.3, .3> diffuse 0.5 }
  }
}
#declare M_solid = material{texture{pigment{rgb<.8,.3,.8>}}}
#declare drop = sphere{<0,0,0>,4*Multi}


union {
  #local InvFact = 1.2;
  #local DropsInv = InvFact/Drops;
  #local s1 = seed(666);
  #local s2 = seed(777);
  #local Amount = 25*Multi; //Change 25 for a diffrent spacing of the objects. Try up
to
60. Haven't tried higher.
  #local N = 0;
  #while(N<=InvFact)
    #local TransY = log(N+0.5)*EndY; //<---Log.
    #local LoopX = N*EndX; //<--- Linear
    #while(LoopX>0) //This is for spacing, the higher, the more objects.
      #local TransX = LoopX + ((rand(s1)-0.5)/(Drops*0.6*EndX));
      object {
        drop
        translate <TransX, TransY, 0> 
        rotate <0,(rand(s2)*360)+(rand(s2)*360),0>   //Comment this out to get the
simple
2D curve.
      }
      #local LoopX=LoopX-Amount;
    #end
    #declare N=N+DropsInv;
  #end
  material{M_Good}
//  material{M_solid} //A solid one. Esp. good in 2D.
  translate <0,-log(0.5)*EndY,0>
  translate <0,-.5*EndY,0> //Center it ok.
}
       
light_source { //Shine through them,make a nice image on the plane.
  <0,-EndY,0>
  color rgb <1,1,1>
  fade_distance EndY/2
  fade_power 2
}

plane { -y, -(EndY*2) pigment { colour rgb <1,1,1> } finish { ambient 0 diffuse 1} }
//Well, a comparsion, and a good view.


Post a reply to this message

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