Javascript 2D circular bin packing algorithm with selective grouping of inner objects

This project received 5 bids from talented freelancers with an average bid price of $103 CAD.

Get free quotes for a project like this
Project Budget
$10 - $30 CAD
Total Bids
Project Description

I need a function which takes a radius of a circular bin and a 2 dimensional array of the groups of circles of various radius and returns the 2d array with each circle's x,y center coordinates within the bin. The circles in each internal array must be grouped together within the bin and the separation of the groups must be organic. In the attached diagram not how each color of circles is grouped together, but all the circles are still individually packed together as a whole and the division between groups is indistinguishable from the division between individual circles except for circle color.

For instance each circle object is simply {x:0,y:0,radius:0}

The input array looks something like this






and the returned array would remain the same, except the x,y values for each circle object have been set.

The attached image is a visualization of the resulting arrangement of the arrays of circles

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online