Grasshopper

algorithmic modeling for Rhino

Hi There

bit of a noob request but..

Im looking for a clean setup for:

-Populating a 2D area with points

-then adding attractor points

-then creating objects with the random points (not attractors) as centres

-then scaling the size of the objects based on their proximity to the attractors

there are many tutorials with similar ideas but not quite the way i want it

any help would be much appreciated

p.s i will be applying the pattern to curved surfaces, what function does this best without morphing the pattern?

Views: 2800

Replies to This Discussion

send files with specifics

How do you want your attractors to behave. Is it always the nearest attractor which determines scaling factors or is it all of 'em at the same time? What about falloff functions, linear, inverse square, something else?

--

David Rutten

david@mcneel.com

Tirol, Austria

https://api.ning.com/files/vSHpMmX2RvK4lCk-nyTwDhyT1u8HhSVxkMW*ZtyOka4a**25yeSl8K1Lyk-NfnCqjV3eLC01NR2DIuf-5bOg3HEF79p1fBtY/voro.jpg

_

_

this is close to what im trying..

_

except that the voronoid centres will define a simple rectangle centre that i will define and multiple attractors will be in play. each point should scale according to its closest attractor and the further away from the attractor the smaller the scale of the polygon.

_

_

hope that helps to explain

_

_

_

That didn't answer either of the questions I asked though. To wit:

  1. Do all the attractors affect every point or is only the closest one relevant?
  2. What equation describes the scaling factor as a function of distance?

--

David Rutten

david@mcneel.com

Tirol, Austria

oh right.. only the closes attractor should affect each particular object

the standard size of the squares will be 500x500mm

and the equation should perhaps be something like..

0 to 2000mm away from attractor = scale by 2

2000-4000mm away = scale by 1.5

4000 and more remains standard.

.hope that helps and thanks for your time btw :-)

The discontinuous scaling behaviour makes it a bit more involved, but here you go:

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

oh wow..thanks so much..that looks perfect.. ill pop that in straight away :-)

when i try to operate this gh definition on a boundary like this
there is something does not work ,,neither the attraction points have no effect nor the spheres are shown
i cant figure out what is missing

any ideas plz ?

Not easy to say without the script. Most of people here are not wizard, nor NSA. We have no access to your computer !!! 

Just an idea your scale seems to be big so distances also. Try to change range of distances or scale down eveything.  

ill try to be clearer..not always sure of the right terminology..

>> Populate 2D

>> attractor points that pull Populate 2D points closer (strength through slider perhaps)

>> Populate 2D points form centers of standard rectangle polyline

>> Rectangles scaled by a factor based on their distance to nearest attractor (closer to attractor, bigger square) with the possibility to flip to (closer to attractor, smaller square)

Take a look at Nudibranch.

I am sure that the AttractorValues Component has everything you need.

As for the surface mapping, thing there is a map to surface component.

Best,

M

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service