Sunday, April 1, 2012

GH: LINE ATTRACT / REPEL

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
GRASSHOPPER LINE ATTRACT / REPEL


This definition gives attraction or repulsion forces to a curve and can switch between the two

LOGIC
1. Pull the source points to their closest point on a curve(s)
2. Measure the distance between source points and points on the curve
3. Manipulate the strength and coverage area of the forces
4. Create a switch to choose between attraction or repulsion forces
5. Use the data to control some variable (scale, height, movement, rotation, ect)  

GH Version
0.8.0066

Tip
Attraction and repulsion based on distance are a major concept of associative modeling.
Try adding multiple curves by right clicking on the curve parameter and selecting set multiple curves.
This also works with curve based text from rhino. Variations in the "strength & coverage" mathematics 
such as adding sin functions, multiplications, or other functions can make the attractor / repeller have 
new and interesting results.Do not forget, the results of attractors / repellers can be used to control 
virtually anything, here we control dimensions of a box, try it for many things. 












Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

3 comments:

  1. hi michael, it there a way to manipulate the script so that the curve is moving up or down in the z axis and the boxes grow accordingly? for example, growth around flow of water down a hill

    ReplyDelete
  2. Hi

    What should be added to use that on surface ?

    ReplyDelete
  3. Thanks for the script! I'm looking to have multiple attractor curves that can *each* have their own intensity. Making separate instances of the curve component through to the min. component just results in one curve component recognized. What am I doing wrong?

    ReplyDelete