Grasshopper

algorithmic modeling for Rhino

Hey all,

I'm attempting to put an irregular "grid" on a custom surface, one with a gradient of radii. I've been looking a lot into the various circle packing discussions, because I can always in/circumscribe a polygon on them. I'm able to get circle packing working with an attractor on a 2D surface, as well as equal sized or random radii on a 3D surface, but not both.

Essentially, I'm looking to have circles with larger radii where the surface is wide, and as it gets smaller, the smaller circles fill in the space (you can see this when the simulation is reset, I've attached an image showing this). I used the definition posted here as a basis, while trying to incorporate an attractor point to both define the radius size and, after a few unsuccessful simulations, to pull some of the points toward the smaller side of the surface. 

I suspect the problem occurs when I cross-reference the points with each other to get the spring connections. I sorted the points by their distance to the attractor to allow the radii to stay a gradient even when running simulations.

Thanks!

EDIT: I just realized I was running the sorted points into both of the CrossRef modules, and that I should use the distances from the attractor point (essentially the radii) for the Rest Length and Upper Cutoff inputs. I also got rid of an extra division. The definition still doesn't work right, but should make more sense now.

Views: 2290

Attachments:

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service