dimanche 7 janvier 2018

How to create a random array of circles in Python, without overlapping?

my first question here. I would like to know how to create some circles without overlapping in Python.

Let me share a part of my script A screenshot, describing the source code.

In lines 55,56 and 57 I print the coordinates, witnessing overlapping. Inside each for statement I thought I avoided the overlapping doing something like bisection method (root finding method).

The source code works good for 5 or 6 voids but when increasing the number of voids I get overlapping.

Looking after comments I salute you.-




Aucun commentaire:

Enregistrer un commentaire