title: placing objects around a centered object
body: <p>I have a dynamic list of objects and need to place them around a centre object without overlapping. They are all rectangle shapes. I am using Java FX text objects.</p>
  
  <p>If I place the first object in the centre with</p>
  
  <pre><code>int x =(int)(scene.getWidth() /2);
  int y =(int)(scene.getHeight() /2);
  </code></pre>
  
  <p>How do I position the others around it without overlapping.There are n amount of objects. </p>
  
  <p>I am not sure how to detect the collision and then move them once the collision has been detected. </p>
  
  <pre><code>if collision = true {
                  translate x 30 px{
                  if still true {
                  translate y 30{
                  if still true{
                  translate x -30
                  if still true{
                  translate y -30{
                  if still true {
                  start again but increase movement size by 20 each iteration 
                  until collision free placement occurs.
  
  
                  x-----&gt;----x
                  |          |
                  ^          |
                  |          |
                  |          |
                  x----&lt;-----x
  </code></pre>
  
  <p>Thanks</p>