POV-Ray : Newsgroups : povray.binaries.images : Dendrites (115k jpeg) : A view from the inside (25k jpeg) Server Time
12 Aug 2024 03:26:50 EDT (-0400)
  A view from the inside (25k jpeg)  
From: Samuel Benge
Date: 22 Nov 2003 16:58:02
Message: <3FBFDBCA.1030900@hotmail.com>
Chris Johnson wrote:

> That looks really nice 


Thanks Chris.

> what's the algorithm for producing the dendrites?

Here it is, minus the extraneous pattern-based scaling:

#declare thk=.5;

union{
 #local Z=-20;
 #while(Z<=20)
  #local Y=-11;
  #while(Y<=15)
   #local X=-20;
   #while(X<=20)
    #if(rand(R)>.33)     
     #if(rand(R)>.33)
      box{ <-1,-1,-1>, <-thk,1,-thk> translate<X,Y,Z> }
      #else
       box{ <-1,-1,-1>, <1,-thk,-thk> translate<X,Y,Z> }
     #end
     #else
      box{ <-1,-1,-1>, <-thk,-thk,1> translate<X,Y,Z> }
    #end
    #local X=X+2;
   #end
   #local Y=Y+2;
  #end
  #local Z=Z+2;
 #end
 //rotate y*(35+180)+x*180
 pigment{rgb 1}
}


-- 
Samuel Benge

stb### [at] hotmailcom
See my website@: http://www.goldrush.com/~abenge/Top/index.html


Post a reply to this message


Attachments:
Download 'maze_cube2.jpg' (26 KB)

Preview of image 'maze_cube2.jpg'
maze_cube2.jpg


 

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