Rhino + Grasshopper: Polyline Attractor

Hey, it’s been a long time since our last post… We played with grasshopper lately. So this is a quick experiment:  a system of cylinders attracted by a polyline.

Few renders:

Polyline Attractor

This is the process:

  • Create a grid of points
  • Create polyline used as input
  • Use the “Curve CP” component to get the closest point on the curve for each point of the grid
  • Calculate the distance from each grid point to it’s corresponding point on the curve(the closest one)
  • Add controls: max radius, min radius, range
  • Create cylinders out of circles. Use the distance as a radius and extrusion depth

DOWNLOAD EXAMPLE:

Zip file containing the grasshopper definition, the rhino file and few renders:

Note: it is saved with version 0.6.0019

Grasshopper: Polyline Attractor Render

MORPHOCODE/LAB: Polyline Attractor

MORPHOCODE / LAB: Polyline Attractor


This post is tagged: ,

9 Responses

  1. Philip 11:21 am on October 19th, 2009

    Hey, a definition file would be great! I’ve been trying to figure this out myself, but can only seem to get it to work with point inputs :(

  2. morphocode 12:01 pm on October 19th, 2009

    Hi,

    we uploaded the definition.
    You could get it here: http://morphocode.com/lab/download/morphocodecom-polylineattractor.zip

  3. David 10:42 am on November 11th, 2009

    Morphocode,

    After unzipping the file and loading the Grasshopper definition, a message appears with the following “IO generated 26 messages…” and the definition was blank. Do you know why this happened? Thanks again.

  4. morphocode 2:40 pm on November 11th, 2009

    Hi David,

    We guess that this happens because you are using an older version of Grasshopper.
    Note that the definition was saved with version 0.6.0019 of the plugin, which is the latest build at the moment.

    Cheers :)

  5. stu 10:38 pm on February 6th, 2010

    this is good.
    but how would it be possible for the density of the circles to be ON the curve and decay as they move away? a “reverse” attractor?

  6. morphocode 10:17 am on February 12th, 2010

    hi stu,

    the density of the circles could be ON the curve.
    It’s all about how you define the relation between the distance from the curve to the cylinders and the radius of the cylinders

    To invert the density you have to use multiplication instead of division and play around with the range parameters

  7. davidd 5:00 pm on July 24th, 2010

    hi the link of definition say: You must be logged in to download this file.

    please again :)

  8. David H. 11:32 pm on August 30th, 2010

    Hello.. How can I download the definition? It will be welcome! Thanx

  9. morphocode 4:32 pm on August 31st, 2010

    Hi,

    you can login/register here:
    http://morphocode.com/wp-login.php

    Best

Leave a Reply