POV-Ray : Newsgroups : povray.general : Stacking Balls : Re: Stacking Balls Server Time
13 Aug 2024 19:29:51 EDT (-0400)
  Re: Stacking Balls  
From: Friedemann Schmidt
Date: 25 Aug 1998 10:13:48
Message: <35e2b884.14578999@news.povray.org>
>Create an array which holds position values and radii for the spheres (one
>entry for each sphere).  Then as you create each new sphere test it against
>all previously created spheres to make sure it doesn't touch.  If it doesn't
>touch add it, if it does, discard it and try another one.

My above posted macro should do exatly this job to fill a cylinder.

BTW, what does your code do if there's no place for a new sphere? It
hangs up, doesn't it? ;-)

Bye,
Friedemann



Friedemann Schmidt
Fri### [at] Stonescom
Raytracing-Gallery: http://www.rz.fhtw-berlin.de/~s0049669/


Post a reply to this message

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