POV-Ray : Newsgroups : povray.advanced-users : Box filled with maximum numbers of spheres : Re: Box filled with maximum numbers of spheres Server Time
30 Jul 2024 10:12:59 EDT (-0400)
  Re: Box filled with maximum numbers of spheres  
From: Mark Wagner
Date: 24 Aug 1999 00:54:22
Message: <37c2257e@news.povray.org>
Paul Johnsson wrote in message <37C181CF.D0580FDC@hpts.com>...
>Hello, I have an intresting problem:
>
>Consider this: Take a box with a specified height, with and depth. I
>would like to place a number of spheres with a specific radius in this
>box.
>
>The problem is how to place the spheres in the box to get the maximum
>numbers of spheres that can fit in the box. I think that this is not a
>trivial problem, but is there a complete analytic solution at all (using
>with, height, depth and radius as parameters)?
>
>I had the idea of creating a macro with "height, with, depth, radius" as
>input and get the locations of the spheres as output...


This is also known as the "sphere-stacking" problem in mathmatics.  For a
box, there is a single optimum solution, known (I think) as the "cubic
close-packed" positioning.  A macro implementing this method would be
relatively easy to write.

Mark


Post a reply to this message

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