Blending curves with grasshopper

Blending curves in grasshopper allows for an infinite range of new components between two set curves – exactly like Rhino’s meancurve tool. The workflow is to divide the two curves, create a function to move respective points between their coordinates and then paint the blend variables using an image sampler component. These curves can them be swept, lofted, applied to a surface, whatever your little heart desires.

The first step is to draw two curves in rhino, reference them into grasshopper and attach them to a divide component. Be sure to divide each curve into equal segments as we will be blending between these two points. We then attach a simplify tree component. This takes the tree structure and removes un-necessary branches. A Path Mapper component could easily perform a similar function.Repeat the divide surface procedure as of the last tutorial. The UVs are flattened (rightclick the sampler and choose flatten) and attached to the image sampler component. You need to use the following settings for the sampler – these clamp the image to the surfaces domain, test for brightness and autoupdate.

We then attach the samplers output to a graft component. As per the last tutorial, this ensures that we blend each curve once per sampled point on the surface. This is fed into a function as outlined in the image. This component takes 3 inputs – the points from the first curve, the points from the second curve, and the list of numbers from the image sampler which are all between 0 and 1 (as a measure of the images brightness). The function then outputs all the points from curve 1 if z is 0, all the points from curve 2 if z is 1, and a gradient between.

You should now be able to see a bunch of different points corresponding to the different values coming from your image sampler. The tree structure of these points should be sound, and so connecting the functions output to a curve component generates seperate curves, and not one long mess. The final step is to take these curves and place them on your surface using an orient component.

We take the points output from our divide surface component (or create a new Surface Frames component to orient normal to the surface) and we graft it. This ensures a single curve per surface point. These grafted points are then inputted to the target plane input of the orient component.  Grasshopper automatically generates x-y planes, we do not need to create them.

We extract the end point of our curves and attach this to an x-z plane. I drew my curves roughly in the x-y plane, and so using an x-z as a reference will make them stand up. These planes are then attached to the reference input. Finally attaching the curves should create a variable grid across the surface. The following image uses a Surface Frames component to orient the curves normal to the surface.

~ by ledatomica on March 13, 2010.

One Response to “Blending curves with grasshopper”

  1. […] This post was mentioned on Twitter by Marta Krivosikova, SungWha Na. SungWha Na said: [the leda atomicus] Blending curves with grasshopper :: http://bit.ly/dFgH97 #gh3d […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: