Grasshopper

algorithmic modeling for Rhino

Hi everyone! 

I created a kissing disk diagram. From this diagram i'd like to create a boundary curve that packs these circles. 
Is there a simple way to create this boundary curve from these circles?

I even taught about voronoi components or a system of tangent with mathematical formulas, or by including these circles inside squares but with no success. 

Thanks. ;)

 

Views: 3368

Attachments:

Replies to This Discussion

The bottom most boundary edge only touches a single circle. How do you define where along the circle it touches?

Anyway, given a set of (closed) curves you can use [Convex Hull] to find a reasonable approximation of the boundary. If you then remove all the short line segments from this hull and extend the remaining ones until they intersect, you can use those extended lines to cut a whole bunch of surfaces one of which is the one you're looking for. Unfortunately this approach does require you to hand pick both the fragment bounds (just a rectangle large enough to contain your desired shape) and the extension length. 

Attachments:

Wow thanks a lot David! It's really helpfull. 


Here's another approach using Circle Circle Tangents. to calculate outlines. 

When you input the your circles if you end up with a crazy mess just switch the value list to + and it should solve the issue and give you a clean outline. Is an issue with Curve direction and offset curve region does not work with just touching circles it seems.

Attachments:

I'll try this one too then, thanks a lot! 

Matt, the line|line component isn't really working. The relative item gives only empty item so the entries for the line|line component are empty too. 

Its to do with the tree structure of the input list i think.

If you right click the T input on the Relative item Component and click Flatten, Then replace the text in the Panel that plugs into the O with this..

{0}[+1] 

Its should hopefully work as expected.

Thanks for the reply. But the outline is messy even when i switch to +. 

Attachments:

Could you just upload a file with the Circles internalised in the code as i can't get the space syntax plug into work as expected.

I am wondering if i creating and example that worked because all my circles where tangent to 2 others.. 

Davids code on the other hand seems unbreakable ;)

Haha yeah his code works fine but I want to try yours too because i'll have a lot of circle later that's why. 

Here's the file Matt. 

Attachments:

I think i have solved it.. Hopefully... with rather a bit of a re-write based on some ideas from David's code using Convex Hull Component.

Attachments:

Works perfectly! Thanks a lot guys! 
Back to work now haha. 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service