






























Chapter_2_The very Beginning
6	The very Beginning

















Chapter_2_The very Beginning


2_1_Method


By the time that you downloaded the Grasshopper, I am sure that you went 
through the website and
up to now you have some idea that what is it all about and how it works 
generally. You might have seen some of the on line video tutorials as well. 
If you have a look at the ”Grasshopper Primer” by Andy Payne of Lift 
Architects (which is addressed in the Grasshopper website), you will find 
almost
all basic understanding of working with components and some related 
subjects like vectors, different types of curves, surfaces and so on.

I would try not to repeat this great information and I recommend you to go 
through them, if you have not yet! So in the following chapters I would try 
to focus on different concepts and examples of Associative Modelling mostly 
related to architecture. In most cases I assumed that you already know the  
basic  understanding  of  the  ingredients  of  the  discussion  and  I  
would  not  go  through  the definition of the ‘degree of a curve’ although 
I will touch some.

To start the Grasshopper and have a general idea about it, the best to do 
is to go to the following link and check the Grasshopper web page. There is 
some useful information that gives you the basic understanding to start 
with. You can keep yourself updated by the discussions in the forum as 
well.
By the way here in this chapter I just briefly discussed about general 
issues of workplace and basics
of what we should know in advance.







http://grasshopper.rhino3d.com/
7	The very Beginning


2_2_The very basics of Grasshopper





2_2_1_Interface, workplace
Beside the other usual Windows menus, there are two important parts in the 
Grasshopper interface: Component panels and Canvas. Component panels 
provide all elements we need for our design and canvas is the work place. 
You can click on any object and click again on canvas to bring it to work 
place or you can drag it on to the work place. Other parts of the interface 
are easy to explore and we will  be  familiar  with  them  throw  using  
them  later  on.  (If  you  like  to  know  more,  just  go  to 
http://grasshopper.rhino3d.com/2008/05/interface‐explained_26.html for more 
details)






Fig.2.1. Grasshopper Component menu and Canvas.
8	The very Beginning


2_2_2_Components
There are different types of objects in Grasshopper component menu which we 
use to design stuff. You can find them under nine different tabs called: 
Params, Logic, Scalar, Vector, Curve, Surface, Mesh, Intersect and XForm.


Parameters are objects that represent data, like a point or line. We can 
define them manually from
Rhino objects as well. Components are objects that do actions with them 
like move, orientate, and decompose. We usually need to provide relevant 
data for them to work. In this manual I used the term component  to  talk  
about  any  objects  from  the  component  panel  to  make  life  easier!  
and  I always use <> to address them clearly in the text, like <Point>.














<Point> component




If  you  right‐click  on  a  component  a  menu  will  pop‐up  that  
contains  some  basic  aspects  of  the component. This menu called 
“context pop‐up menu”.





















Context pop‐up menu of <Pt> component
9	The very Beginning


Defining external geometries

Most  of  the  time  we  start  our  design  by  introducing  some  objects 
 from  Rhino  workplace  to  the Grasshopper; A point, a curve, a surface 
up to multiple complex objects to work on them. Since any object  in  
Grasshopper  needs  a  component  in  canvas  to  work  with,  we  can  
define  our  external geometries in canvas by components in the Params tab 
under Geometry. There is a list of different types of geometries that you 
can use to define your object.

After bringing the proper geometry component to the canvas, define a Rhino 
object by right‐click on the  component  (context  menu)  and  use  “set  
one  ...  /  set  multiple  …  “  to  assign  abject  to  the component. By 
introducing an object/multiple objects to a component it becomes a 
Grasshopper object which we can use it for any purpose. It means we can use 
our manually created objects or even script generated objects from Rhino in 
Grasshopper.


Fig.2.2. Different geometry types in the Params > Geometry menu









Let’s have a simple example.

We have three points in the Rhino viewport and we want to draw a triangle 
by these points. First we need to introduce these points in Grasshopper. We 
need three <point> components from Params > Geometry > Point and for each 
we should go to their context menu (right click) and select ‘set one point’ 
and then select the point from Rhino viewport (Fig.2.6).
10	The very Beginning



Fig.2.3. Set point from Rhino in Grasshopper component







Fig.2.4. The Grasshopper canvas and three points defined in the canvas 
which turned to (x) in the
Rhino  workplace.  I  renamed  the  components  to  point  A/B/C  by  the  
first  option  of  their  menu  to recognize them easier in Grasshopper 
canvas.
11	The very Beginning


Components and connections

There are so many different actions that we can perform by components. 
Generally a component takes  some  data  from  another  source  (like  
parameters)  and  gives  the  result  back.  We  need  to connect the 
component which includes the input data to the processing component and 
connect the result to the other component that needs this result and so on.

Going back to the example, now if you go to the Curve tab of components, in 
the Primitive section you will see a <line> component. Drag it to the 
canvas. Then connect <point A> to the A port of the
<line> and <point B> to the B port (just click on the semi‐circle and drag 
it up to the other semi‐circle
on the target. You can see that Rhino draws a line between these points).


Fig.2.5. Connecting the <point> components to the <line> component by 
dragging from output of the
<point B> to the input of the <line>.




Now  add  another  <line>  component  for  <point  B>  and  <point  C>.  Do 
 it  again  for  <point  C>  and
<point A> with the third <line> component. Yes! There is a triangle in 
Rhino.


Fig.2.6. The <line> components draw lines between <point> components. As 
you see any component
could be used more than once as the source of information for other 
actions.
12	The very Beginning



Fig.2.7.  Now  if  you  change the  position  of  the points  manually  in  
Rhino  viewport,  the  position  of
points  in  Grasshopper  (X  ones)  and  the  triangle  will  change  
accordingly  and  you  do  not  need  to redraw your lines any more.

As you can see in this very first example, the associative modelling 
technique made it possible to manipulate  the  points  and  still  have  
the  triangle  between  these  points  without  further  need  to 
adjustment. We will do more by this concept.




Input / Output

As  mentioned  before,  any  component  in  the  grasshopper  has  input  
and  output  which  means  it processes the given data and gives the 
processed data back. Inputs are at left part of the component and  outputs  
at  right.  The  data  comes  from  any  source  attached  to  the  input  
section  of  the component and the output of the component is the result of 
that specific function.

You have to know that what sort of input you need for any specific function 
and what you get after that. We will talk more about the different sort of 
data we need to provide for each component later on. Here I propose you to 
hold your mouse or “hover” your mouse over any input/output of the 
components. A tooltip will pop up and you will see the name, sort of data 
you need to provide for the component, is any predefined data there or not, 
and even what it for is.





Fig.2.8. Pop‐up tooltip
13	The very Beginning


Multiple connections

Sometimes you need to feed a component by more than one source of data. 
Imagine in the above example you want to draw two lines from point A to 
point B and C. you can use two different <line> components or you can use 
one <line> component and attach both point B and C as the second point of 
the <line> component. To do this, you need to hold Shift key when you want 
to connect the second source of data to a component otherwise Grasshopper 
would substitute it (Fig.2.12). When holding shift, the arrow of the line 
appear in a green circle with a tiny (+) icon while normally it is gray. 
You can also use Ctrl key to disconnect a component from another (or use 
menu) to disconnect
an existing unwanted connection. In this case the circle around the arrow 
appears in red with a tiny
(‐) icon.


Fig.2.9. Multiple connections for one component by holding shift key




Colour coding

There  is  a  colour  coding  system  inside  the  Grasshopper  which  
shows  the  components  working status.


Fig.2.10. The colour coding.

Any  gray  component  means  there  is  no  problem  and  the  data  
defined  correctly/the  component works correctly. The orange shows warning 
and it means there is at least one problem that should
be solved but the component still works. The red component means error and 
the component does
not work in this situation. The source of the error should be found and 
solved in order to  make
14	The very Beginning


component works properly. You can find the first help about the source of 
error in the component’s context menu (context menu > Runtime 
warning/error) and then search the input data to find the reason  of  the  
error.  The  green  colour  means  this  component  selected.  The  
geometry  which  is associated with this component also turns into green in 
Rhino viewport (otherwise all Grasshopper geometries are red).




Preview

The components that produce objects in Rhino have the ‘Preview’ option in 
their menu. We can use
it to hide or unhide it in the scene. Any unchecked preview make the 
component black part become hatched. We usually use preview option to hide 
the undesired geometries like base points and lines
in complex models to avoid distraction.






2_2_3_Data matching
For many Grasshopper components it is always possible to provide a list of 
data instead of just one input. So in essence you can provide a list of 
points and feed a <line> component by this list and draw more lines instead 
of one. It is possible to draw hundreds of objects just by one component if 
we provide information needed.




Look at this example:

I have two different point sets each with seven points. I used two <point> 
components and I used
‘set multiple points’ to introduce all upper points in one component and 
all lower ones in another component as well. As you see, by connecting 
these two sets of points to a <line> component, seven lines  being  
generated  between  them.  So  we  can  generate  more  than  one  object  
with  each component (Fig.2.14)


Fig.2.11. Multiple point sets and generating lines by them.
15	The very Beginning


But what would happen if the number of points would not be the same in two 
point (data) sets?

In  the  example  below  I  have  7  points  in  top  row  and  10  points  
in  the  bottom.  Here  we  need  a concept  in  data  management  in  
Grasshopper  called  ‘Data  matching’.  If  you  have  a  look  at  the 
context menu of the component you see there are three options called:

Shortest list Longest list Cross reference
Look at the difference in the Figure 0.15




Fig.2.12. Data matching A: shortest list, B: longest list and C: cross 
reference
16	The very Beginning


It is clear that the shortest list uses the shortest data set to make the 
lines with, and the longest list uses the longest data set while uses an 
item of the shortest list more than once. The cross reference option 
connects any possible two points from the lists together. It is very memory 
consuming option and sometimes it takes a while for the scene to upgrade 
the changes.

Since  the  figures  are  clear,  I  am  not  going  to  describe  more.  
For  more  information  go  to  the following link: 
http://grasshopper.rhino3d.com/2008/06/description‐of‐data‐stream‐matching.h
tml









2_2_4_Component’s Help (Context pop‐up menu)
As it is not useful to introduce all components and you will better find 
them and learn how to use them gradually in experiments, I recommend you to 
play around, pick some components, go to the components context menu 
(right‐click) and read their Help which is always useful to see how this 
component works and what sort of  data it needs and what sort  of output it 
provides. There  are other useful features in this context menu that we 
will discuss about them later.







Fig.2.13. Context pop‐up menu and Help part of the component
17	The very Beginning


2_2_5_Type‐In component searching / adding
If you know the name of the component that you want to use, or if you want 
to search it faster than shuffling  the  component  tab,  you  can  
double‐click  on  the  canvas  and  type‐in  the  name  of  the component 
to bring it to the canvas. For those who used to work with keyboard 
entries, this would
be a good trick!


Fig.2.14.  Searching  for  line  component  in  the  component‐pop‐up  menu 
 by  double  clicking  on  the
canvas and typing the name of it. The component will be brought to the 
canvas.




2_2_6_Geometry Preview Method




Fig.2.15.  In  order  to  enhance  the  working  speed  and  get  faster  
updates,  whenever  your  project
becomes heavy to calculate, use the Wireframe Preview option. It is always 
faster.
18	The very Beginning


2_3_Other Resources


There are so many great on‐line resources and creative ideas that you can 
check and learn from them. Here are some of them:

Main Grasshopper web page:

http://grasshopper.rhino3d.com/2008/06/some‐examples‐of‐grasshopper.html




Some resources on McNeel Wiki WebPages: 
http://en.wiki.mcneel.com/default.aspx/McNeel/ArchitectureCommunity.html 
http://en.wiki.mcneel.com/default.aspx/McNeel/ExplicitHistoryExamples.html
(Links to other resources)




As mentioned before, the Grasshopper Primer from Lift Architects:

http://www.liftarchitects.com/journal/2009/1/22/the‐grasshopper‐primer.html




And hundreds of on‐line video tutorials which you can search easily.
