Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81067 > unrolled thread

pack circles into a partial annulus

Started byRobin Becker <robin@reportlab.com>
First post2014-11-20 10:12 +0000
Last post2014-11-20 09:10 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  pack circles into a partial annulus Robin Becker <robin@reportlab.com> - 2014-11-20 10:12 +0000
    Re: pack circles into a partial annulus Roy Smith <roy@panix.com> - 2014-11-20 08:11 -0500
    Re: pack circles into a partial annulus Cousin Stanley <cousinstanley@gmail.com> - 2014-11-20 09:10 -0700

#81067 — pack circles into a partial annulus

FromRobin Becker <robin@reportlab.com>
Date2014-11-20 10:12 +0000
Subjectpack circles into a partial annulus
Message-ID<mailman.16011.1416478357.18130.python-list@python.org>
I need to pack circles into a partial annulus ie part of a larger circle bounded 
by two radii and angles of  say 18 & 90. The region is described in polar coords 
as {(r,theta) | r0<=r<=r1 & theta0<=theta<=theta1}. The circles to be packed 
have three different radii, but all will fit singly into the region. The idea is 
that they should be as far apart as possible so as to minimize overlap and avoid 
crossing the region boundary.

Circle packing is hard so I'm thinking of using some kind of spring/repulsion 
model to do this.

Has anyone any ideas about how to do this?
-- 
Robin Becker

[toc] | [next] | [standalone]


#81073

FromRoy Smith <roy@panix.com>
Date2014-11-20 08:11 -0500
Message-ID<roy-06E948.08103220112014@news.panix.com>
In reply to#81067
In article <mailman.16011.1416478357.18130.python-list@python.org>,
 Robin Becker <robin@reportlab.com> wrote:

> I need to pack circles into a partial annulus ie part of a larger circle 
> bounded by two radii [...]
> Circle packing is hard so I'm thinking of using some kind of spring/repulsion 
> model to do this.
> 
> Has anyone any ideas about how to do this?

This is not a Python question.  This is an algorithm question, and would 
be better asked on some sort of math forum.  Googling for things like 
"circle packing algorithm" brought me to http://www.packomania.com/, 
which looks like the perfect place to start your investigations.

Once you have a specific algorithm in mind, and are having problems 
coding it up, come back here for help on the Python aspects.

[toc] | [prev] | [next] | [standalone]


#81086

FromCousin Stanley <cousinstanley@gmail.com>
Date2014-11-20 09:10 -0700
Message-ID<m4l3og$l0p$1@dont-email.me>
In reply to#81067
> I need to pack circles into a partial annulus ie part of a larger circle
> bounded by two radii and angles of  say 18 & 90. 

  You might take a look at Descartes Circle Theorem .... 

    http://en.wikipedia.org/wiki/Descartes'_theorem

  Blub from google search ....

    In geometry, Descartes' theorem states that 
    for every four kissing, or mutually tangent, circles, 
    the radii of the circles satisfy a certain quadratic equation. 

    By solving this equation, one can construct a fourth circle 
    tangent to three given, mutually tangent circles.

  There is a screen saver in Debian Linux
  named Apollonian that uses this algorihm
  packing smaller circles into a larger circle ....

  The C source code for this screen saver 
  is available under Debian ....


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web