FILL AREA WITH OBJECTS EQUALLY SPACED

Next
 From:  AlexPolo
10147.1 
Hi Trying to work out best way to fill an closed area with a set number of other closed curves and have them equally spaced with each other.

Image showing problem 80 circles to be distributed equally within the red bounding semi circle. Any vague scripts anyone is aware of would be helpful.



thanks Alex.

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10147.2 In reply to 10147.1 
Hi Alex,

See December 2020 posts of Equidistant array on surface / automatic Pave

The remarkable D3-force program can be used to do repulsion of circles. It is actually a charting/node graph program, but they also use physics of repulsion and attraction. Their boundaries are a box, not a semicircle.
Google "D3-force observable". They can also repel from the exterior of a very large circle, using its center point.

Maybe next year I'll have time to pursue this...Repulsion could be from many small fixed boundary circles, on the desired curved boundaries.

Coding Train has a few videos of doing repulsion and attraction with Javascript/ processing.
https://www.youtube.com/watch?v=OAcXnzRNiCY

But neither of the above sources has a ready to use program for your project.

- Brian

A hexagonal layout of uniform circles could be expected.
Maybe try making a hexagonal layout of say 100 circles in a rectangle encompasing your D shape.
Place the layout over your D, and deduct circles in the exterior and intersecting the boundary, aiming for 80.
If the interior circle count is below 80, scale down the array a bit.
If the interior circle count is above 80, scale up the array a bit.

Or vice-versa,
Create a hex layout of circles, place the D over them, count circles, and scale the D shape up or down appropriately, to get 80 interior circles.
Then scale Both the new D and the 80 circles, so that the new D is the same size as your D.

Left out a step to make the diameter of the circles the same as at the start...

http://www.packomania.com/

EDITED: 8 Feb 2021 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10147.3 In reply to 10147.1 
Hi Alex, you might find some ideas on this thread:
http://moi3d.com/forum/index.php?webtag=MOI&msg=10052.1

Probably the best bet is using a Grasshopper component for Rhino:
https://www.grasshopper3d.com/video/circle-packing

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10147.4 
Re-arranging to hex grid. Drawing a few hexagons helps with manipulation.
Scale circles. Move to fit+/-.
ScaleIndividual Script to shrink the circles back to size.
CenterPoint script is helpful.
Better, but not done.
Could repeat...
- Brian
Edit, Deleted atachment.
Google search of "Locomotive steam boiler", images, show hex "D" layout.

EDITED: 11 Feb 2021 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  AlexPolo
10147.5 
Hi Brian and Michael,

Thanks for the input and advice I am modelling a flange for a heat exchange unit and came up with this as a manual solution.
A series of semi circle arcs which I used unwrap curve. Worked out the length of each curve and used array over curve once I knew how many per curve. Gave a good enough result not perfect but should disperse heat even enough. Will explore Circle Packing in Rhino but was on tight time frame on this one so sometimes time spent learning new tricks versus getting the knuckles dirty and knocking it out.




Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10147.6 In reply to 10147.5 
Hi Alex.
Your solution looks excellent.
Maybe a fibonanacci layout would work?

-Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
10147.7 
Scatter tools, dispersion ...? by Max Smirnov
http://moi3d.com/forum/index.php?webtag=MOI&msg=6486.1
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
10147.8 In reply to 10147.1 
Hi Alex,
I have created a basic spacing nod file on the Nodeeditor that can set minimum gaps.
The dimensions that can be adjusted are shown on the photo.
The number of arcs are 12 but if you need more let me know.
Anyway hope this helps.
Barry

Edit:
Nodeeditor added.

EDITED: 18 Feb 2021 by BARRY-H


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  AlexPolo
10147.9 
Hi Barry,
Many thanks for taking time in putting this together looks great - I have a large collection of your scripts and your input is gold.
I am having trouble running the node am I missing some components?
Alex.


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
10147.10 In reply to 10147.9 
Hi Alex,
I have updated my previous post adding the Nodeeditor I used plus a modification
to the nod file collating the outputs into one so you can see the total number of circles.
Cheers
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  AlexPolo
10147.11 
Hi Barry,

Thanks again for your input looks great and working for me now - Will add to my collection of BARRY SCRIPTS your insight is well appreciated - my NODE skills are basic and looking at your MACRO section makes my head spin :) your contributions to the MOI community highlight how such an agile tool can be used to solve high end problems.

Keep powering on
Alex.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All