Professional Documents
Culture Documents
workshop manual
EXLAB:BEND Introduction
EXLAB: BEND 8
Workshop Research Agenda 9
Elseware10
NURBS12
Grasshopper13
Elseware & Web Resources 14
Morning Schedule 16
Evening Schedule 17
Seminar Guides
Tutorial 1 -
Tutorial 2 -
Tutorial 3 -
Tutorial 4 -
Tutorial 5 -
Dissecting Datatrees 26
Datatree Resources 28
Tutorial 6 -
Tutorial 7 -
Planar Detailing 32
VB.NET Resources 34
Tutorial 8 -
Generative Detailing 36
Tutorial 9 -
Simulation 38
Tutorial 10 -
Algorithmic Environments 40
Python Resources 42
Project Outline
Birdcage Model 44
Vine Model 46
CNC Wire Forming 48
Fabrication Project 50
Presentation Template 52
BEND Exhibition 54
Thanks56
EXLAB: BEND
CNC wire forming is a well established industry that is typically used for the mass
manufacture of identical components. As such the delivery process is relatively
archaic, with clients supplying 2d documentation to the fabricator who instructs the
machine through a process of trial and error. Machine code is simplistic and this
workshop seeks to extend and contribute to the recent work of others (such as the
ACADIA paper by Park MacDowell and Diana Tomova) in harnessing the potential
automation of this process of code generation.
Elseware have developed a see-saw script that generates CNC gcode from splines,
and allows the forming process to be simulated from this code to avoid defects
produced by bending the part into the machine. By generating code automatically the
labour time for part production is reduced (eliminated), increasing cost efficiency for
unique parts. Part complexity is facilitated by rationalising curves into faceted splines,
allowing for double-curved geometries that would have been near-impossible to
fabricate through 2d documentation and limited labour resources.
The purpose of this book is to introduce students to the fundamentals of parametric
design in Grasshopper through a series of tutorials and exercises specific to the design
and CNC fabrication of a wire installation. In doing so we hope to contextualise some
of the more esoteric aspects of the Grasshopper environment and demonstrate how
designing with parametric tools has its own unique set of key concepts and stages.
Elseware
Gwyllim JAHN - completed his B.EnvDes at the University of Western Australia before
completing his Masters of Architecture at RMIT in 2010. He practiced at Minifie
Nixon architects and LAB Architecture Studio. He leads workshops and studios at
RMIT, Melbourne and Monash universities, extending his design expertise in complex
architectural geometry and behavioural systems, parametrics and digital fabrication.
Jas JOHNSTON - is the Digital Fabrication Facility Coordinator at the Faculty of
Architecture Building and Planning, University of Melbourne. He also tutors, assists
with design studios and facilitates workshops focused upon digital design techniques
through the Experimental Design Lab and digital fabrication techniques through the
FabLab. Jas is particularly interested in new forms of digital art and their interaction and
enhancement of architecture.
10
11
NURBS in Rhino
Rhino is a NURBS (Non Uniform Rational Bezier Splines) modelling package produced
by McNeel. Modelling using NURBS is well suited to describing complex geometries
for fabrication, as curved forms are not approximated to faces or segments as they
are when modelling using meshes/polygons (3ds Max, Maya) or splines (AutoCAD).
Instead curves and curved surfaces are described by interpolating between control
points. This characteristic of NURBS geometry is most evident by the fact that no
matter how far you zoom in on a nurbs curve or surface, it will never appear exactly flat
or faceted.
As such we have a lot of control over how we manipulate the parameters of objects
in Rhino, and how we use them to generate and connect to the geometries of
further objects. For example, curves and surfaces can be divided into exactly equal
segments, simplified accurately, used to precisely measure angles and curvature etc.
12
Grasshopper
Grasshopper is a plugin for Rhino that makes the history of all of your modelling
operations and geometric properties explicit to the designer (in early stages of
development it was called Explicit History). This flow of geometry and data is
represented as a graph of connected nodes, and is commonly referred to as a Visual
Programming Interface. Modification of a node in the graph causes this change to flow
through to all connected nodes downstream, updating the output of each of these
nodes. This allows designers to retrospectively modify parameters and operations
and instantly1 observe their influence on the final design, without the need to redraw
the geometry. Grasshopper (and other scripted design processes) allows you to draw
using data. A few key international practices whose designs will be discussed during
the workshop are:
Asymptote - (Hani Rashid)
http://www.asymptote.net
TheVeryMany - (Mark Fornes)
http://www.theverymany.com
Matsys - (Andrew Kudless)
http://www.matsys.com
Not always. Grasshopper creates a plethora of traps for beginners to fall into,
especially when generating polysurfaces or calculating intersections.
1
13
Elseware Resources
14
Web Resources
Grasshopper3d - Official grasshopper web page and resource for tutorials, events,
downloads and discussion.
http://www.grasshopper3d.com
Food4Rhino - Grasshopper and Rhino third party plugins. Kangaroo, Weaverbird,
GHowl etc can all be found here and are frequently updated.
http://www.food4rhino.com/
Designreform - Video tutorials on series, lists, datatrees and common grasshopper
functions.
http://designreform.net/learning/grasshopper
15
Morning Schedule
11
12
1pm
2
10am
9
3
8
4
7
Monday
Tuesday
Wednesday
Thursday
Interface
Geometry
Association
Data Structure
Monday
Tuesday
Industry
Planar Joinery
Wednesday
Generative
Applications
Joinery
Seminar
Exercises
Help/Fabrication
Lecture
Lunch/Drinks
16
Friday
Documentation
Thursday
Friday
Emergence
No Class
Evening Schedule
11
12
1
2
10
9pm
3
8
4
7
6pm
Monday
Tuesday
Wednesday
Thursday
No Class
Geometry
Association
Data Structure
Monday
Tuesday
Industry
Planar Joinery
Applications
Wednesday
Generative
Friday
Documentation
Thursday
Friday
Emergence
Interaction
Joinery
Workshop classes run from 10am - 1pm and 6pm - 9pm. Participants are free to
attend all classes.Classes are structured as a lecture/seminar, folowed by individual
and group design exercises. Participants are free to use the studio out of workshop
hours and time has been allocated for further software and fabrication help.
NOTE: There will be no evening class on the first Monday due to the guest lecture.
Likewise there will be no morning class on the final Friday - morning students should
attend the evening class for tutorials and workshop wrap up drinks. On all other days
evening sessions will run to the same schedule as morning classes.
17
Seminar: Walk through the grasshopper toolbars, context menus and icons. Learn
how to use parameter components to begin working with Rhino geometry in
Grasshopper. Generate a parametric loft from referenced geometry in Rhino, and from
points created in grasshopper. Use Panels to observe how Grasshopper components
process inputs and outputs, and to document the definitions workflow and learning
process.
Outcomes: Understand the advantages and disadvantages to generating objects
parametrically.
Develop an aptitude for using the graphical interface and viewing data.
Document a definition for later use.
Discussion: How might we use (or ignore) surface geometry in a wire bending project?
Why are certain functions and geometries ignored during the workshop? What are the
strengths and weaknesses of a parametric design process?
Exercises:
1 - Make a polyline from points
2 - Rotate with multiple angles using a Range
3 - Rotate with multiple axes using Plane Components
18
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
19
20
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
21
Seminar: At the beginning of this class, students have selected the outcomes of one
of the previous exercises with the intention of extending it for fabrication. The seminar
will present various approaches to associating parameters of one object (points,
images, graphs etc) with the properties of another - in this case polylines. This allows
designs to become responsive to conditions: sun angles, wind loads, ornamental
patterns, fabrication constraints etc.
Refer to Python Primer Section 8.3
Outcomes: Experiment with vectors, planes, transforms, images, functions and graphs
as means for creating relationships between geometrical properties of two objects.
Learn about surface (uv) and curve (t) space and how to map objects from one space
to another.
Discussion: Associating form with data allows architects and designers to evaluate
the strengths of their designs - a reduction in cost, a gain in structural efficiency, better
solar performance etc. What are other advantages to materialising the invisible?
Exercises:
1 - Create a 3d grid of points
2 - Move a list of points using a mathematical function
3 - Move a list of points using a graph
4 - Move a list of points using a random function
5 - Move a grid of points with surface UVs and an image sampler
6 - Create compound transforms with an attractor
22
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
23
The basic idea of the Grasshopper data structure (trees, as they are lovingly known)
is that you can take any algorithm and apply it to a larger amount of data. At least in
principle this is always possible. If you can make a line between two points, you should
be able to create a whole bunch of lines between a whole bunch of points. - David
Rutten
Seminar: Discuss analogous systems to Grasshoppers data structures. View and
manipulate lists and path objects using common Grasshopper components
Create a whole bunch of lines between a whole bunch of points.
Outcomes: Understand the limitations of Grasshoppers data structures compared to
a scripting environment. Be able to perform operations on specific items and lists of
items. Recognise how structure effects the operations and outputs of Grasshopper
components.
Discussion: Encourage students to search the Grasshopper forum and explore the
references on the following pages.
Exercises:
1 - Extract specific collections (items, branches)
2 - Transform with multiple attractors
3 - Draw curves through a grid of points in two directions
4 - Interpolate between a list of polylines
24
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
25
26
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
27
Datatree Resources
TU Delft wiki page - Pretty good description of the way grasshopper operates on data
and the differences between a visual programming environment and scripting.
http://wiki.bk.tudelft.nl/toi-pedia/Template:Grasshopper_Data_Tree_editing
Modelab primer files - Grasshopper definitions available for download that outline the
functionality of some of the common list and tree manipulation components.
http://modelab.nu/?cat=3
Pathmapper Help Thread - Discussion on the grasshopper forum with some very
useful images and explanations of how the pathmapper works.
http://www.grasshopper3d.com/forum/topics/path-mapper-help-1
28
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
29
Seminar: Use orient, textlabel and grid components to parametrically layout and label
3d geometry.
Explain various methods for breaking geometry into discrete units for documentation.
Break down the feed simulation definition step by step to understand the process of
iteratively measuring rotations, bends and feed lengths.
Outcomes: Following this class students will be confident in design, layout, and
documentation of 3d curve geometries for fabrication on the three axis jig.
Discussion: How could the process be optimised (reduce material waste and
fabrication time)? Is there an optimum balance between complexity/variation and ease
of construction? How can we use parametric tools to predict material behaviour?
Exercises:
1 - Find angles between segments of a polyline
2 - Find the length of each segment of a polyline
3 - Label a 3d model using text tags
4 - Orient objects to a grid
30
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
31
Seminar: It is often simpler (or the only option) to design a joinery logic between
parts after the overarching form has been finalised. An example of this is the waffle
grid structure, which approximates a surface geometry using perpendicular slices
and slots. Such a design process is linear and consequently error prone - the size,
curvature or topology of the surface, for instance, is not affected by the logic of the
slotted joint. In this class participants will be lead through a definition that rationalises
joints between 3d curves as linked, planar geometries.
Students will bring to class a model consisting of branching geometries (max 3
connecting parts per intersection). We will then apply joinery definition, and experiment
with the exposed parameters. Finally, students will attempt to further rationalise and
model additional joint geometries as per individual design goals.
Outcomes: Learn how to locally rationalise complex geometry with respect to specific
fabrication constraints. Understand that script components can be used to shortcut
requirements for complex definitions.
Discussion: Should the geometry of the joint become a defining aspect of the design?
How do parametric details (which have to be flexible enough to satisfy a range of
situations) differ from conventional details (which are commonly unique to a specific
situation)?
Exercises:
1 - Create a proximity network on a surface
2 - Create a script to find unique nodes in the network
3 - Fit circles through node points
32
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
33
VB.NET Resources
RhinoCommon SDK - This is the go to place to begin learning how to script in rhino. It
contains a reference for all rhino classes and interfaces, describing their properties and
methods with examples.
http://www.rhino3d.com/5/rhinocommon/
VB.net School - Reference for Visual Basic syntax, variable decleration, functions,
loops, conditional statements etc.
http://www.programmersheaven.com/2/VB-NET-School
Essential Mathmatics For Computation Design - An excellent document to use as a
reference for NURBS geometry, vectors, space syntax, matrix transforms, curvature
etc.
http://download.rhino3d.com/en/Rhino/4.0/EssentialMathematicsSecondEdition/
Grasshopper Tutorials - Further reference material. Also see the forum!
http://www.grasshopper3d.com/page/scripting-and-code-tutorials
34
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
35
Seminar: In this tutorial we will attempt to incorporate a parti for the joinery into the
elements which make up the design by using tangential connections and crimps.
Participants will be finalising their Model 2 designs and will be familiar with the
constraints of the fabrication process.
During the seminar participants will be introduced to the generative principles of
Lindenmayer (L) systems, and two implementations of the system in VB.net in
grasshopper. The first will extend earlier tutorials on strings and substitution in order
to create an abstract L system using defined rules. The second will replace abstract
characters with geometry to attempt to respond to the brief for the model.
Outcomes: Understand the difference between inherent joinery systems (where the
connection logic becomes a property of the part and thus determines the whole) and
post-processed joinery systems (where an algorithm determines locations for joints
and subsequently modifies the parts). Understand how iterative processes facilitate
intelligent components and relationships.
Discussion: Compare and contrast the two systems. How does Grasshopper limit
the potential of inherent joinery systems? How could the two joinery systems be
combined in a single project?
Exercises:
1 - Create a substitution script in VB.NET
2 - Create a recursive function that performs Transforms in VB.NET
36
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
37
Tutorial 9 - Simulation
Seminar: At this point in the workshop most of the design and fabrication constraints
will have been discussed and explored through a series of digital and physical
prototypes. We will now attempt to explore rule-based solutions to these constraints by
approximating the wires as a collection of fibres - similar to experiments done by Frei
Otto. This will allow the final form of the project to emerge from these rules.
The seminar will demonstrate a range of precedent projects exploring how natural
systems can inform architectural ones. Students will be introduced to how simple
physics operate via the examples in the Kangaroo Manual, and how to create dynamic
constraints and force objects. Participants will then be guided through the process of
rationalising a collection of polylines for simulation of a fibre network.
Outcomes: Understand how algorithms can produce complex designs that emerge
from simple rules and design constraints.
Develop a methodology for evaluating the strength of the chosen algorithm.
Discussion: Should all designers be able to code? How do we translate design
complexity to fabrication simplicity? What is lost in the process? How might designing
with Daniel Pikers pseudophysical materials facilitate a new design process?
Exercises:
Part 1 - Convert curves to spring objects
Part 2 - Create and control power-law force objects using a supplied script component
Part 3 - Generate a fibre network from existing site and programmatic constraints
38
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
39
Seminar: In the previous class students implemented an out of the box generative
system to produce complex and highly varied geometries. Participants will now be
introduced to the concepts and tools which allow expert designers and programmers
to write and control their own unique algorithmic environments. Students will leave the
grasshopper environment and will be exposed to IronPython, its advantages and limitations, and how it operates within Rhino.
Outcomes: Recognise when problems require an iterative process to find a solution.
Understand that such process can work as design generators as well as optimisers.
Introduction to Object Oriented principles and why they are essential to coding rule
based behaviours and environments.
Discussion: Anything that moves over time generates a path. What natural processes
or phenomena generate complex patterns or paths that may be hijacked by the architect working with wire? Demonstration of Marc Fornes work using IronPython.
Exercises - Requires Rhino 5.0 WIP:
http://download.rhino3d.com/Rhino/5.0/evaluationtimed/download/
Refer to Python Primer
40
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
41
Python Resources
42
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
43
Model 1 - Birdcage
Utilising the techniques learned in the tutorials during days 1-3 participants are asked
to design, fabricate and build a small bird cage. The bird cage is to be composed
of 2d bent wire profiles that radiate from a central axis connected by standardised
prefabricated brackets. This highly constrained design, fabrication and construction
process is intended to illustrate the possible formal variation using flexible modelling
techniques. As a starting point participants are asked to select from the list of
adjectives below in order to embody the form of their birdcage with a particular
purpose:
Twisted, Squeezed, Blown, Continuous, Squashed, Jagged, Punk, Gentrified,
Exuberant, Symmetrical, or another of your choosing.
Design, Fabrication and Construction Considerations:
Base and top connection bracket is standardised
Must use a set number of wire profiles in order to connect with brackets
Maximum length of the wire is fixed
Wire profiles must be 2D
Deliverables: (Due Thursday Wk1)
One completed model for photography and exhibition.
One set of drawings using supplied template.
Outcomes:
Introduction to flexible parametric design using Grasshopper
Illustration of workflow from parametric model to fabrication and the materialization of
the physical object.
Familiarisation with the process of CNC wire forming through the simulation of the
process using a (rudimentary) analogue 2d jig
Understand the advantages and limitations of using 2d components and joints
44
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
45
Model 2 - Frame
Participants are to design a model that expresses a series of events. This model will be
constructed using tangential connection details and/or the standardised bracket detail
from model 1, using 3D bent wire profiles. The design techniques required to produce
this model will be provided during tutorials 1 - 8
Consider what avarian architecture might look like. Imagine architecture as a series of
materialised events. Our material is wire and the events that may occur are:
Flocking, perching, singing, feeding, attracting, defending...
How might one type of bird interact with your model differently from another? How
might the site, the public or the environment impact on the design?
Deliverables: (Due Thursday Wk2)
One completed model for photography and exhibition. One set of drawings using
supplied template
Outcomes:
Translate 3d geometry for documentation
Understand the relationship between rule based design and rule based description
Optimise the fabrication process by simplifying 3d geometry
Speculate on the advantages and disadvantages of different joinery types
46
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________
47
The final project will be materialised using the digital fabrication process of CNC wire
forming. CNC wire forming is an established industrial fabrication process typically
used to produce wire products such as shopping trollies, display racks, hooks,
brackets and many other common wire products. To fabricate a component using
this process designers produce 2 dimensional documentation of the intended
components, often from a 3 dimensional model, which are then translated by the
fabricator into code to direct the CNC forming machine. This archaic process is
suggested due to the limitations of the process (described below) requiring each
component to be tested by the operator to ensure accuracy with the original design.
Because of this labor intensive approach products or components are produced
in large runs to achieve efficiency and affordability. Following this process however
prevents the use of the equipment to produce individually customised or designs of
high complexity in a cost effective manner.
Through testing with our fabrication partner, Ace Wire, using this optimised process
Exlab has been able to obtain fabrication quotes at 1% of the standard cost.
Ace Wire
Ace wire design and manufacture wire and metal products using a range of processes
including the latest technology in wire forming including range of 2d, 3d and robotic
CNC forming equipment.
Their CNC wire formed products are typically retail and display stands, handles, hooks,
rings, brackets, springs and links. i.e. mass produced large run items.
48
49
Fabrication Project
The workshop will focus on the design possibilities of using parametric tools to drive
a CNC wire forming process. The outcomes of the workshop will inform a final design
that will be completed following the workshop, installed at Elseware Studio and
presented as part of a public exhibition. Workshop participants are asked to consider
and contribute to the requirements for the final installation using the following brief:
Formal Brief:
Following the exhibition the feeder is to be installed in a public place. It must be
accessible to install, clean and replenish feed.
The geometry of the feeder should be designed to accommodate characteristics of
local bird life (see Feeder Descriptions as a starting point).
The feeder should provide a means of public display. It should include some mobile
elements and become activated/mobile while in use.
The feeder should prevent access to unwanted pests (rats, possums, crows).
Architectural Agenda:
The project also has a design agenda in order to explore the complexity made possible
by an automated design and fabrication process. As a starting point participants are
asked to consider the form of the feeder being:
At once open and closed, or acting as an aperture.
Comprised of multiple formal languages. A different function (or consider the events
from the second model) should generate a different form.
Contextual and site responsive. The structure of the feeder should in some way relate
to its immediate environment.
Expressive of a sequence of events.
50
Feeder Types
Tube feeders attract smaller, perching birds. As they effectively contain seed, they are
easily possum-proofed. They are long hollow cylinders that can be mounted on a pole
or hung from a tree or window. The tubes are mostly clear plastic and have perches
on each of several feeding ports so that multiple birds can feed at the same time. Tube
feeders allow the birds to see the seed inside and are virtually spill-proof.
Hopper feeders allow for a large amount of seed to be dispensed bit by bit to feeding
birds. These are universal feeders, catering to all sorts of birds. Hopper feeders are
refillable dispensers that typically provide some form of shelter for both the birds and
the feed in the form of a roof. These feeders attract a number of different types of birds
who like to perch or eat from tables.
Hoppers tend to attract all birds that wont feed at a tube feeder - they allow the bigger
birds to land in the feeder tray and eat comfortably. But, they have the disadvantage
of being accessible to animals - if big birds can land easily, then possums can access
your bird food as well.
Platform feeders are the simplest form of feeder; essentially a raised platform
containing seed. Platform feeders attract the largest number and variety of birds. These
feeders can be raised on legs or suspended anywhere, and are typically roofed to
provide shelter. Provision must be made for protection from predators using a clear
surrounds or barrier.
51
Exhibition Documentation
Presentation Template
For each project we will also utilise scripts and scripted components to develop
exhibition materials of design explorations. The template allows you to represent
multiple iterations of your parametric model in a single drawing by gradually increasing
the opacity of each iteration with the change of a number slider.
The online Grasshopper community aids the development of the software by adding
functionality, pointing out and fixing bugs and suggesting improvements. Some users
develop their own plugins, some of which are used in the workshop and others create
scripted components which are made available through their own websites and blogs.
This documentation process uses a scripted C# component developed by Giulio
Piacentino (who also created the mesh tools plugin WeaverBird) to bake iterations of a
design to separate layers.
This plugin, script and others can be found: www.giuliopiacentino.com
Then using a JavaScript written by Gwyl to alter the opacity of layers in Adobe Illustrator
to present your work in a supplied template.
52
BEND Exhibition
Student work will be curated for exhibition by following the presentation template
provided. The format is demonstrated on the right. The exhibition will showcase
both the digital exploration of the wire forming process through categorised prints of
each tutorial, together with the final fabricated project to be installed in the space. A
publication documenting this process will be available on the night.
The exhibition will be hosted at Elseware Studios in March. All are welcome.
54
55
Thanks
Acewire, for donating their time to discuss the CNC process and facilitating the
exploration of new and novel use of their machines.
SONA, for publicising the workshop.
Melbourne University, for donating equipment and assisting in promotion to students
and faculty staff members.
Roland Snooks, for donating his time to give a public lecture and kick off the
workshop.
Loren Adams, for providing photography and documentation.
56
57
Idea
58
Exercise
Reference a number of points from Rhino into
Grasshopper by creating the points in Rhinos
model space.
Add a POINT parameter component to the
Grasshopper canvas.
(PARAMS/GEOMETRY/POINT)
The point component displays with an orange
fill. This warning indicates that the component is
under defined and more information is required.
To assign the points you created in rhino to this
component, right-click on the component and
select set multiple points. Within rhino model
space select the points you wish to use to define
the polyline.
(CURVE/SPLINE/POLYLINE)
The V input indicates that the input requires the
points that will be the vertices of the polyline.
Click and drag on the output of the point
component to create a wire. Attach this to the V
input. Note that the path of the polyline follows
the order the points were selected. This is because
the data is stored in a list ordered in the sequence
the points were selected.
59
Exercise
When a component has multiple inputs it is
good practice to find out and experiment with
additional functionality.
In this case, the C input gives an option to
Close Polyline. Right-click on the input, go to set
boolean and select True.
(VECTOR/POINT/POINT XYZ)
This component allows the user to define a point
via its Cartesian coordinates. Connect a number
slider to one of the inputs to provide the required
data for the coordinates.
You can also double-click and enter a number into
the search by keyword
(I.e.. 3.5) To obtain a slider with that value set as
current
(PARAMS/SPECIAL/NUMBER SLIDER)
By right-clicking on a slider you can edit the
properties of the slider to control the type of
numbers (floating point, integers, even,odd),
degree of accuracy/rounding, the numeric domain
and the current value set.
60
Exercise
Copy and paste these components
(Ctrl+c, ctrl+v or holding alt+click/drag) to define 3
more points. Check in rhino to see them move as
you change a value on a slider.
Note that some inputs have default values
assigned to them. The default coordinates for the
x and y-axis are set to 0.0
(CURVE/SPLINE/POLYLINE)
Now connect the remaining 3 point xyz
components. To do this you will need to hold
down the shift key if you wish to connect multiple
wires to a single input.
Like when we referenced earlier, the order in
which points are connected to the polyline
determines the path of the polyline.
As mentioned above, most objects in cad software are created using combinations of primitive data types through
a hierarchy of the manipulation of this data. For example; points are used to define lines, lines are used to define
surfaces.
In this workshop participants will be manipulating lines through a range of processes to simulate wire profiles. This
tutorial introduces participants to the primitives required to define a line which will be expanded upon in future
exercises
61
Idea
62
Exercise
In Rhino front view model space draw a curve that
will become the profile to be rotated around an
axis. Also designate the origin of the axis of this
rotation using a Point.
Reference both the Curve and Point into
Grasshopper using a CURVE and POINT
component.
(PARAMS/GEOMETRY/CURVE,POINT)
Add a ROTATE 3D component to the canvas.
(CURVE/UTILITY/ROTATE 3D)
To specify the axis of rotation add a X UNIT
VECTOR component to the canvas and connect it
to the axis of rotation input (X). This will rotate the
curves on the YZ plane.
(VECTOR/VECTOR/X UNIT)
The amount the curve is to be rotated around
the axis can be specified by providing a rotation
angle in radians to the (A) input. This angle can be
passed into the (A) input via a slider.
(PARAMS/SPECIAL/NUMBER SLIDER)
Right click on the slider and select edit. Set the
slider to a max of 360 using floating numbers.
The slider must be converted into degrees for the
ROTATE 3D component to operate as expected.
(PARAMS/SPECIAL/SLIDER)
63
Exercise
The RADIANS component converts degrees into
radians allowing you to specify the rotation
angle in degrees. Place the radians component
between the slider and the rotate 3d component.
(MATHS/TRIG/RADIANS)
Now replace the single slider with a sequence of
numbers within a specified domain. To do this use
a range component and add a domain component
as well.
(SETS/SEQUENCE/RANGE)
(MATH/DOMAIN/DOMAIN)
Use PANEL components to set the minimum and
maximum bounds of your range. We want the
curve profile to rotate all the way around the
central axis, so set minimum to zero and maximum
to 360.
Note. When using a panel component in this way
make sure not to add extra lines (hitting enter) as
this will cause the domain component to fail.
(PARAMS/SPECIAL/PANEL)
Now set the number of steps within this range
with a number slider.
(PARAMS/SPECIAL/NUMBER SLIDER)
64
Idea
65
Exercise
In Rhino front view, draw a curve that will become
the profile to be rotated around an axis.
Reference the Curve into Grasshopper using a
CURVE geometry component.
(PARAMS/GEOMETRY/CURVE)
Add a ROTATE AXIS component and pass the initial
profile curve to the (G)eometry input.
(CURVE/UTILITY/ROTATE AXIS)
Use a PERP FRAME component to create a plane
perpendicular to the curve at a location we can
choose. Right-click on the (C) input and select
Reparameterize. This will be covered in detail in
later tutorials.
Add a number slider to the (t) input.
(CURVE/ANALYSIS/PERP FRAME)
(PARAMS/SPECIAL/NUMBER SLIDER)
From this single plane we can extract 3 axes of
rotation using an analysis component called
PLANE COMPONENTS.
(VECTOR/PLANE/PLANE COMPONENTS)
The ROTATE AXIS component requires a line
geometry as the axis, so use the origin point of
the plane and an axis to create a line. There are a
number of ways to do this, here we are using the
Start, Direction, Length line component.
Note that the length has a default value.
(CURVE/PRIMITIVE/LINE SDL)
66
Exercise
Now we have the axis for rotation we just require
the angle of rotation itself. Like the previous
tutorial we will use a RANGE component to create
a set of values.
(SETS/SEQUENCE/RANGE)
Set the domain of the range component between
zero and 360.
(MATH/DOMAIN/DOMAIN)
Specify how many numbers are in the range
sequence with a NUMBER SLIDER.
(PARAMS/SPECIAL/NUMBER SLIDER)
If you hover the mouse cursor over the (A)ngle
input of the rotation component you will see that
this angle is defined in radians. It is sometimes
easier to visualise in degrees so I often use
them and then translate to radians using a math
component.
(MATHS/TRIG/RADIANS)
This completes the first rotation transformation.
Now just choose another axis to create another
line, and pass it to another ROTATION AXIS
component. Then connect the geometry that has
been rotated once to the (G)eometry input.
(MATHS/TRIG/RADIANS)
67
Idea
68
Exercise
Create two curves in Rhino and reference them
into Grasshopper using two CURVE geometry
components.
(PARAMS/GEOMETRY/CURVE)
Select and add a BEZIER SPAN component. This
curve is created from both endpoints and the
tangential directions at the end points.
A tangent can be thought of as a straight line
that represents the direction of the curve at a
particular point.
(CURVE/SPLINE/BEZIER SPAN)
Evaluate the curves at a specific point with the
EVALUATE LENGTH component from the curve
analysis menu. You can evaluate via distance or
use the default which uses a length factor, where
the curve is reparameterised so that 0 (zero) is the
start of the curve and 1 is the end.
This will return to us a point as well as the
tangential direction of the curve at that location.
(CURVE/ANALYSIS/EVALUATE LENGTH)
Use a number slider to specify the which end of
each curve to draw the bezier curves from.
(PARAMS/SPECIAL/NUMBER SLIDER)
Connect the appropriate outputs to the bezier
span component. Depending on how far apart
you created the curves will determine how curved
the bezier is. This is because the vector from the
evaluation component is a unit vector, meaning it
has a direction and a magnitude of only one.
(PARAMS/SPECIAL/NUMBER SLIDER)
69
Exercise
To add further control to the bezier curve the
vector amplitude can be altered to change the
curvature.
(VECTOR/VECTOR/VECTOR AMPLITUDE)
Specify the magnitude with a slider.
(PARAMS/SPECIAL/NUMBER SLIDER)
70
Idea
71
Exercise
Reference a number of curves from Rhino into
Grasshopper by creating the curves in Rhinos
model space using the control point curve tools.
Add a CURVE parameter component to the
Grasshopper canvas.
(PARAMS/GEOMETRY/CURVE)
Add a REBUILD component onto the canvas.
Rebuilding a curve allows you to specify the
number of control points and the degree of
curvature. The affect of these parameters will
become clear when the definition is completed.
(CURVE/UTILITY/REBUILD)
Add a number slider to the canvas. By rightclicking on a slider you can edit the properties of
the slider to control the type of numbers (floating
point, integers, even,odd), degree of accuracy/
rounding, the numeric domain and the current
value set.
Set the slider to odd (O) with a maximum of 7.
Connect the slider to the degree input (D).
(PARAMS/SPECIAL/SLIDER)
As you increase the degree of curvature (D input)
the curve becomes smoother where a degree of
1 connects the curves control points by straight
lines.
(PARAMS/SPECIAL/SLIDER)
Add another number slider to the canvas. This
slider will be used to set the number of control
points used to define the curve.
Edit the properties of the slider to have a
maximum of 15 and a minimum of 2 (min must be
greater than or equal to 2 as a curve requires 2 or
more points to exist)
(PARAMS/SPECIAL/SLIDER)
72
Exercise
Add a CONTROL POINTS component to the canvas
and connect it to the rebuilt curves.
(CURVE/ANALYSIS/CONTROL POINTS)
Bezier curves are defined by a start and end point
and one or more control points that define the
curvature.
You will notice as the degree of the curve
increases the control points move further from the
curve creating a smoother representation of the
curve.
(PARAMS/SPECIAL/TOGGLE)
73
Idea
74
Exercise
Create two curves in Rhino model space to loft
and reference them into Grasshopper using a
single CURVE geometry component and Set
Multiple Curves.
(PARAMS/GEOMETRY/CURVE)
Use the loft component to create a surface. Note
that by right-clicking on the O input, the loft can
be changed to closed.
(SURFACE/FREEFORM/LOFT)
Iso curves are created from U and V parameters
of each direction of a surfaces domain. Specifying
these coordinates to an ISO CURVE component
returns a curve in each (U and V) direction.
(CURVE/SPLINE/ISO CURVE)
We will use a POINT XYZ component to create
some point coordinates.
(VECTOR/POINT/POINT XYZ)
We want to create a series of points with
coordinates between 0 and 1. The reason for
this will become apparent when we use them to
sample the surface.
Use two RANGE components with (D)omain set
between zero and 1.
v
(SETS/SEQUENCE/RANGE)
75
Exercise
Connect sliders to control the number of points
created.
(PARAMS/SPECIAL/NUMBER SLIDER)
Pass these point coordinates to the ISO CURVE
component.
The domain of the surface you created is
dependant on its dimensions. With Grasshopper,
it is preferable to be able to use definitions again
and again in differing situations to save the time
taken to create them. To do this, we want to alter
our script so that it works on any surface we
create in the future.
76
Idea
77
Exercise
Reference a group of curves from Rhino into
Grasshopper using a CURVE geometry component.
These curves will be used as the primitive input
to create the surface from and to extract the
isocurves.
(PARAMS/GEOMETRY/CURVE)
Add a LOFT component to the canvas and pass the
CURVE output to the curve (C) input of the loft
component.
This will create a nurbs surface flowing between
the primitive or defining curves.
(SURFACE/FREEFORM/LOFT)
Add a SECTION component to the canvas. This
component will solve intersection events between
a plane and a brep, in this case the lofted surface,
and will produce a curves and points where the
intersections occur.
For this component to work the planes to intersect
through the surface need to be created and
inputted into the component.
(INTERSECT/MATHEMATICAL/BREP/PLANE)
Add a BOUNDING BOX component to the canvas.
Pass the lofted surface (L) output to the geometry
(C) input.
The bounding box creates a box around oriented
geometry and will be used to specify where
these intersecting planes are to occur by placing
perpendicular planes along two perpendicular
edges of the box.
(SURFACE/PRIMITIVE/BOUNDING BOX)
To specify the edges of the box to be we will need
to decompose the box into its constituent points
and create lines along the desired edges.
This is achieved by using the BOX CORNERS
component.
(SURFACE/ANALYSIS/BOX CORNERS)
78
Exercise
To specify the edges to place the intersecting
planes on lines will be created between box
corners.
Add a LINE between two points component to
the canvas. As you connect different outputs of
the box corners component you can specify the
edges of the box to be used.
(CURVE/PRIMITIVE/LINE)
Perpendicular frames which the planes of
intersection will be located at can then be solved
along the curve at specified locations.
(CURVE/ANALYSIS/PERP FRAME)
To specify these locations we will create a range
of numbers within a numeric domain using the
RANGE component. The numbers within domain
will be spaced evenly to give equal distribution of
the intersection planes.
The domain (D) of the component is set to 0.0 1.0 By default. By connecting a slider to the (N)
input you can specify the number of steps, or
number of frames.
(SETS/SEQUENCE/RANGE)
Pass the output (F) of the PERPENDICULAR
FRAME component to the section plane (P) input
of the section component and section curves
through the surface will be created running in one
direction.
79
Idea
80
Exercise
Use the BREP (boundary representation)
geometry component to reference in a 3d solid
from Rhino.
A BRep can be thought of as similar to a
polysurface in Rhino. This component can also be
used to contain/convert a standard nurbs surface.
(PARAMS/GEOMETRY/BREP)
To section a BRep we need to find the intersection
between the solid and a flat plane or surface.
Creating surfaces solely for this purpose is
computationally expensive so we will use a
plane instead. A plane is the mathematical
representation of a flat surface, so the intersection
we require is in the mathematical drop down
menu.
(INTERSECT/MATHEMATICAL/BREP|PLANE)
We now need to create a plane to perform the
intersection.
At this stage which axes you select isnt important
for the definition to work properly, choose either a
vertical (yz/xz) or horizontal (xy) plane.
(VECTOR/PLANE/YZ-PLANE)
To add more variety to the possible outcomes
reference a point from Rhino to be the origin of
the initial intersection plane. This will be able to
be moved around in the model space at any time
for different results.
Right-click and select Set one point.
The location of the point will inform where the
section is taken.
(PARAMS/GEOMETRY/POINT)
To achieve the radial intersections of the solid we
need to rotate the intersection plane.
There are a number of rotation components to
choose from, in this case the tool which rotates in
a plane.
(TRANSFORM/EUCLIDEAN/ROTATE)
81
Exercise
Assign a plane for the rotation to occur in. Choose
a different plane to the one chosen for the section
plane.
(VECTOR/PLANE/XY-PLANE)
Connect the referenced point to this plane so that
the rotation occurs around the same origin point
that was assigned to the section plane.
(MATH/UTILITY/PI)
For an easily variable rotation value, connect a
slider to the pi component.
(PARAMS/SPECIAL/NUMBER SLIDER)
Create multiple sliders to achieve a number of
variable section planes. Ensure to hold the shift
key when connecting wires as the standard
connection method overrides those previous.
82
Idea
83
Exercise
Model a 2d or 3d chain link in the top view of
Rhino. This will be arrayed in 2 directions to create
a woven surface.
Use the CURVE geometry component to reference
the curve from Rhino.
(PARAMS/GEOMETRY/CURVE)
In Grasshopper, move is effectively the same as
copy as it creates a new geometry in the same or
a different location. To array a geometry, simply
move it a number of times.
(TRANSFORM/EUCLIDEAN/MOVE)
Geometry is moved with a vector which is defined
with a direction and a magnitude (ie. Move n far
in a m direction).
Use a unit vector (magnitude 1.0) In the direction
of the x-axis to move the original curve. You will
now see two curves. We can change the amplitude
(or magnitude) of this vector by assigning a factor
of multiplication.
(VECTOR/VECTOR/UNIT X)
Rather than using a series of numerical inputs
like sliders or integer parameters, use a series
component to generate a sequence of variables.
A series is a sequence of numbers where the first
number is defined (S), each subsequent number
in the series increases by a step size (N), and the
number of values in the sequence is constrained
(C).
(SETS/SEQUENCES/SERIES)
This component has default settings to generate a
series from 0 to 9, step size of 1. Ten links should
now be previewed in Rhino model space.
84
Exercise
The step size for your chain link is dependant
on its dimensions. There needs to be sufficient
overlap to link but also to appear taut.
Use a slider component to adjust the spacing of
the arrayed components.
(PARAMS/SPECIAL/NUMBER SLIDER)
Now create copies of this row of links in the other
direction to create a two dimensional array.
(TRANSFORM/EUCLIDEAN/MOVE)
This time use a unit vector component in the
y-axis direction.
(VECTOR/VECTOR/UNIT Y)
Connect the same series as was used in the initial
move and view the results. You will notice some
unexpected results. Instead of copying all of the
1d array up the distances specified it has moved
the first copy up zero, the second copy up 1.0 and
so on.
85
Exercise
Again, adjust the array to match the dimensions
of your chain link. You can also manipulate
your initial curve so that adjoining elements are
3 dimensional and properly intertwine / link
together.
(SETS/SEQUENCES/SERIES)
86
Idea
87
Exercise
Reference a profile curve from Rhino into
Grasshopper.
(PARAMS/GEOMETRY/CURVE)
We will use the orient tool to array the initial curve
around a circle. Connect the curve component to
the geometry input of the orient component.
Hover the mouse cursor over the other inputs to
see what the other inputs require.
(TRANSFORM/EUCLIDEAN/ORIENT)
Input A requires a plane which will be source
location for the orient command. To give this
plane an origin we can manipulate, we will
create a point in the same viewport of Rhino and
reference it into GH.
Create a Point geometry component and
reference the point from Rhino by right-clicking
and selecting Set one point
(PARAMS/GEOMETRY/POINT)
Create a plane in the YZ axis. This plane is infinite
but we can assign an origin point to be the one we
referenced from rhino. Then pass this plane to the
orient component input A to be the source plane.
(VECTOR/PLANE/YZ)
Now create the circle to orient our curve around.
Note that there are a number of components
for creating a circle. Select CIRCLE CNR which
requires a centre point, a normal (vector direction)
and an input radius.
(CURVE/PRIMITIVE/CIRCLE CNR)
88
Exercise
Create a point from x,y, z coordinates and pass
it into the centre point input for the circle. This
component has default values set to zero for all
inputs, so unless a variable is connected to one
of the inputs, a point will be created at the origin
point.
(VECTOR/POINT/POINT XYZ)
There is also a default value set for the normal
direction of the circle (a vector in the z direction)
which we will keep.
Create a number slider and connect it to the input
for the circle radius. You may need to right-click
on the slider and edit its properties to ensure it is
at an appropriate scale for the profile curve you
created earlier.
(PARAMS/SPECIAL/NUMBER SLIDER)
Input B of the orient component asks for the
final plane which the geometry will be oriented
to. In this case we will create multiple planes
which are perpendicular to the circle we created
so that our profile curve appears to revolve
around a central axis.
Add a perpendicular frames component.
(Note the plural)
(CURVE/DIVISION/PERP. FRAMES)
Connect these frames to the orient component to
be the goal locations of the orient command.
(PARAMS/SPECIAL/NUMBER SLIDER)
89
Idea
90
Exercise
Reference a Point from Rhino into Grasshopper.
To do this, first create a Point in Rhino. Then create
a Point parameter component in Grasshopper and
add it to the canvas. Right-click on the component
and select Set one Point. Select the Point in
Rhino.
(PARAMS/GEOMETRY/POINT)
To create a 2d grid of points use the Square Grid
component.
(VECTOR/GRIDS/SQGRID)
The number of grid cells but have default values of
5. Add number sliders to these inputs and rename
the sliders Rows and Columns by right clicking
on the component and by clicking and typing in
the top of the drop down menu. Rename the Point
component as Pt(reference).
(PARAMS/SPECIAL/NUMBER SLIDER)
To create the 3d grid, we will array the 2d grid
vertically using the Move component with vectors
in the Z direction.
(TRANSFORM/EUCLIDEAN/MOVE)
(VECTOR/VECTOR/UNIT Z)
Like the additional control we added to the
Square Grid component with number sliders,
multiple input values will be used to array the grid.
Use a Range component with a number slider
input for n- the number of steps.
(SETS/SEQUENCE/RANGE)
91
Exercise
To achieve the desired proportions for your grid
the output from the Range component (currently
between a domain of 0 and 1) needs to be
multiplied by an additional factor before being
passed to the Z Unit vector.
(MATH/OPERATORS/MULTIPLICATION)
The number of Move transformations achieved is
defined by the Layers slider going into the Range
component. The data structure of the 2d grid of
points however, causes an unexpected outcome.
Use a graft component so that each of the move
transformations are applied to every point.
For more information on this topic see Tutorial 4 Data Matching.
(SETS/TREE/GRAFT TREE)
The second example uses a Surface as the base
geometry. Reference a Surface from Rhino into
Grasshopper by right-clicking a Surface component
and selecting Set one Surface. Select the Surface
in Rhino.
(PARAMS/GEOMETRY/SURFACE)
To create a grid of points use the Divide Surface
component.
(SURFACE/UTIL/DIVIDE SURFACE)
The number of divisions in the u and v directions
of the surfaces domain are variable but have
default values of 10.
Add number sliders to these inputs and rename
the sliders Rows and Columns. Rename the
surface component as srf(reference).
(PARAMS/SPECIAL/NUMBER SLIDER)
92
Exercise
To create the 3d grid, we will move the grid of
points on the Surface in the direction of the
surface Normal, the direction perpendicular to it
at each point.
For clarity it is often useful to disable the preview
of previous components, in this case, the
referenced Point. Right-click on the component
and select the preview option. Repeat this to
enable again. (Shortcut ctrl+Q)
(TRANSFORM/EUCLIDEAN/MOVE)
To control the magnitude of the movement use
the vector amplitude component. This maintains
the original vector direction.
(VECTOR/VECTOR/AMPLITUDE)
Add a Range component with a number slider
input for n- the number of steps, for multiple
transformations.
(SETS/SEQUENCE/RANGE)
Use a multiplication component to scale the size
of the transformation to suit the size of your
surface.
(MATH/OPERATORS/MULTIPLICATION)
93
Idea
94
Exercise
Reference a Point from Rhino into Grasshopper.
(PARAMS/GEOMETRY/POINT)
Create a 2d grid of points with the Square Grid
component.
The number of grid cells have default values of 5
and a cell size of 1. Add number sliders to these
inputs personalise them.
(VECTOR/GRIDS/SQGRID)
Use a flatten component to remove the data
structure created by the component.
For more information on this topic see Tutorial 4 Data Matching.
(PARAMS/SPECIAL/NUMBER SLIDER)
Connect the points from the flatten component
to the geometry input of a move component.
(TRANSFORM/EUCLIDEAN/MOVE)
To affect a move transformation, the operation
requires the geometry to be moved and a vector
(direction and magnitude).
To begin, create a unit vector in the z direction. All
points should move up by 1 unit.
(VECTOR/VECTOR/UNIT Z)
95
Exercise
Rather than moving all points the same distance in
the z direction, we want to use a maths function
to generate difference across the moved field of
points.
Use a function component with 3 variable inputs (f
with an x, y and z)
(MATH/SCRIPT/F3)
The f input requires an expression to solve. We
will use a sine function to create outcomes which
fluctuate smoothly up and down.
Use a panel component to enter the expression
sin(x+y)*z and connect to the expression input.
(MATH/SCRIPT/F3)
To create differentiation across the moved points,
one of the inputs to the expression needs to be
varied. Use a range component leaving the default
domain as between zero and 1.
(SETS/SEQUENCE/RANGE)
As trigonometric (or circular) functions such
as sine, cosine and tangent are functions of an
angle we will make a transformation of the range
sequence as if it was in radians, to degrees.
(MATH/TRIG/DEGREES)
Use a list length component to return the total
number of points in our grid. This figure is then
passed to the n input of the range component
to match the number of points to the number
of different vector lengths we provide the move
component.
(SETS/SEQUENCE/RANGE)
96
Exercise
Finally, add two number sliders to the y and z
inputs. This will allow for user control over the
output size and range of numbers generated by
the math function.
(PARAMS/SPECIAL/NUMBER SLIDER)
97
Idea
98
Exercise
Reference a 2d surface in the xy-plane from rhino
into grasshopper.
(PARAMS/GEOMETRY/SURFACE)
To create a 2d grid of points use the divide
surface component.
(SURFACE/UTIL/DIVIDE SURFACE)
Add number sliders to the inputs of the surface
divide component and rename them.
(PARAMS/SPECIAL/NUMBER SLIDER)
Connect the points from the p output to the
geometry input of a move component.
(TRANSFORM/EUCLIDEAN/MOVE)
Create a unit vector in the z direction. All points
should move up by 1 unit.
(VECTOR/VECTOR/UNIT Z)
99
Exercise
To create differentiation among the moved points,
the magnitude of the move vector needs to
provide this change.
Add two graph mapper components. We will
sample these to affect the difference in vertical
movement in the x and y direction across the grid
of points.
(PARAMS/SPECIAL/GRAPH MAPPER)
When a graph mapper component is added the
default state has no graph loaded. To change this,
right-click on the component and select the select
a Graph Type from the sub-list of options.
(SETS/SEQUENCE/RANGE)
Use the multiplication component to combine the
sampled values.
(MATH/OPERATORS/MULTIPLICATION)
(SETS/TREE/GRAFT TREE)
100
Exercise
Finally, another multiplication operator is used to
moderate the final amplitude values for the move.
(MATH/OPERATORS/MULTIPLICATION)
101
Idea
102
Exercise
Reference a 2d surface in the xy-plane from rhino
into grasshopper.
(PARAMS/GEOMETRY/SURFACE)
To create a 2d grid of points use the Divide
Surface component. The number of divisions in
the u and v directions of the surfaces domain are
variable but have default values of 10.
Disable the preview for the referenced surface.
(SURFACE/UTIL/DIVIDE SURFACE)
Add number sliders to the inputs of the Surface
Divide component and rename them.
(PARAMS/SPECIAL/NUMBER SLIDER)
Flatten the tree structure of the list of points with
a flatten component.
For more information see Tutorial 4 - Data
Matching.
(SETS/TREE/FLATTEN TREE)
Connect the points from the flatten component
to the geometry input of a move component.
(TRANSFORM/EUCLIDEAN/MOVE)
103
Exercise
Create a unit vector in the z direction. All points
should move up by 1 unit.
(VECTOR/VECTOR/UNIT Z)
Rather than moving all points the same distance in
the z direction, we want to use a set of randomly
generated numbers to move the field of points.
Select the random generator from the sets menu
(SETS/SEQUENCE/RANDOM)
Use a list length component to return the total
number of points in our grid.
This figure is then passed to the n input of the
random component. This sets the number of
numbers generated, matching the number of
points to the number of different vector lengths
we provide the move component.
(SETS/LIST/LIST LENGTH)
Attach a number slider to the s input of the
random generator. This is the seed of the
generation and changing this will change the set of
numbers generated.
(PARAMS/SPECIAL/NUMBER SLIDER)
The domain of the set of numbers generated
is using the default values of 0 to 1 so add a
multiplication component to adjust the amplitude
of the vector length.
(MATH/OPERATORS/MULTIPLICATION)
104
Idea
Tutorial 3 - Move a grid of points using surface UVs and an image sampler
105
Exercise
Reference a 2d surface in the xy-plane from rhino
into grasshopper.
(PARAMS/GEOMETRY/SURFACE)
To create a 2d grid of points use the Divide
Surface component. The number of divisions in
the u and v directions of the surfaces domain are
variable but have default values of 10.
Disable the preview for the referenced surface.
(SURFACE/UTIL/DIVIDE SURFACE)
Add number sliders to the inputs of the Surface
Divide component and rename them.
(PARAMS/SPECIAL/NUMBER SLIDER)
Connect the points from the Divide Surface
component to the geometry input of a move
component.
(TRANSFORM/EUCLIDEAN/MOVE)
Create a unit vector in the z direction. All points
should move up by 1 unit.
(VECTOR/VECTOR/UNIT Z)
106
Exercise
Add the Image Sampler component from the
Special menu and connect the uv points output
from Divide Surface.
(PARAMS/SPECIAL/IMAGE SAMPLER)
The sampler comes without an image loaded.
Right-click on the component and click image...
To select an image from your computer.
(SETS/SEQUENCE/RANDOM)
Choose a channel to sample. This tutorial uses
Value (brightness). This can be changed at any
time generating different results.
(MATH/OPERATORS/MULTIPLICATION)
107
Idea
108
Exercise
This tutorial uses the definition from the earlier
tutorial Create a 3d Grid of Points.
(PARAMS/GEOMETRY/POINT)
(PARAMS/GEOMETRY/CURVE)
Begin by creating an ORIENT component.
Pt(reference) will be the source plane for this
transformation. The target planes will come from
the location of the points in the 3d grid.
(TRANSFORM/EUCLIDEAN/ORIENT)
Graft the grid points so each point is in a separate
list.
Pass the attractor point to the first input of a
VECTOR 2PT component.
(SETS/TREE/GRAFT TREE)
(VECTOR/VECTOR/VECTOR 2PT)
Create a vector from the attractor point to every
point in the grid.
109
Exercise
Create a plane at each point facing away from the
attractor using the plane normal component.
(VECTOR/PLANE/PLANE NORMAL)
Connect the planes to the orient component to
make them the target planes for the operation.
(TRANSFORMATION/AFFINE/SCALE)
We want to scale the arrayed curves relative to
the distance they are from the attractor point but
the actual distance would be too large a factor
so we will remap the values to a more applicable
domain.
Pass the vector lengths to the component as the
numbers to be remapped.
(MATH/DOMAIN/REMAP)
Set the source domain of the remap component
by finding the bounds (largest and smallest
numbers) of the distances. As each distance is
in a separate list we need to flatten the tree to
a single list so they are compared and return a
single domain. Right-click on the input and select
flatten.
(MATH/DOMAIN/BOUNDS)
110
Exercise
A multiplication operator with slider is used to
moderate the final scaling factors that now are all
between zero and 1.
(MATH/OPERATORS/MULTIPLICATION)
The transform component allows us to transform
a group of objects with a single transformation or
multiple transformations at once.
(TRANSFORM/UTIL/TRANSFORM)
Connect the Transformation Data outputs
from both the orient and scale components to a
Compound component.
Note that the data contained isnt scaled or
oriented geometry but a description of the
transformation.
(TRANSFORM/UTIL/COMPOUND)
Pass the reference curve into a group component.
(TRANSFORM/UTIL/GROUP)
Connect the Group and the Compound
Transformation to complete the definition.
111
Idea
112
Exercise
Reference a 2d surface in the XY-plane from Rhino
into Grasshopper. and create a 2d grid of points
use the divide surface component.
(SURFACE/UTIL/DIVIDE SURFACE)
Use the PANEL component and the PARAM
VIEWER to view properties of the data output
from the divide component. Not only can we see
the cartesian coordinates of the division points but
also that they are grouped into lists (or branches
in GH tree talk). In fact each row is on its own
branch, making 6 branches each containing 4
points.
(SETS/LIST/LIST ITEM)
Another way to extract pieces of data from a tree
is to extract an entire branch.
This is more complicated than just taking an
item from a list as it requires the complete path
describing it.
(SETS/TREE/TREE BRANCH)
The PANEL and PARAM VIEWER show that the
address of the first branch of our tree is {0;0;0}.
This is the syntax of the path structure we must
use to retrieve the branch and the data it contains.
113
(SETS/LIST/LIST ITEM)
114
(PARAMS/PRIMITIVE/DATA PATH)
(SETS/LIST/LIST ITEM)
(SETS/TREE/TREE ITEM)
115
Idea
116
Exercise
Create a point and a 2d surface in the xy-plane in
Rhino and reference both into Grasshopper using
their respective geometry components.
(PARAMS/GEOMETRY/SURFACE OR POINT)
To create a 2d grid of points use the DIVIDE
SURFACE component with number sliders
specifying number of rows and columns.
(SURFACE/UTIL/DIVIDE SURFACE)
Right-click on the s of the surface input. Select
reparameterize. This redefines the parameters
used to describe/analyse/transform the geometry.
In this case, it remaps the domain of the surface to
be between zero and 1 in both u and v directions.
The reparameterize icon will remain next to the
input while this function is activated.
(TRANSFORM/EUCLIDEAN/MOVE)
To remove the list structure created by the
SURFACE DIVIDE component and so that every
point will move independently, use the GRAFT
component to put all items in their own list.
(SETS/TREE/GRAFT TREE)
117
Exercise
Create vectors between each of the points in the
grid to each of the attractor points.
(VECTOR/VECTOR/VECTOR 2PT)
The AVERAGE component finds the arithmetic
mean of a set of values. This works with
vectors retaining both direction and amplitude
information.
Use this to embed association to each of the
attractor points to the transformation.
(MATH/UTIL/AVERAGE)
The values passed to the AVERAGE component
need to be mediated with a mathematical
function so that we can set a cutoff distance to
an attractors influence, a falloff in influence and
overall amplitude of the move transform.
Add a MULTIPLICATION operator.
(MATH/OPERATORS/MULTIPLICATION)
(MATH/SCRIPT/F2)
(PARAMS/SPECIAL/NUMBER SLIDER)
118
(SETS/DOMAIN/REMAP)
(MATH/SCRIPT/F2)
119
Idea
120
Exercise
This tutorial uses the definition from
Tutorial 04 - Part 02, Multiple Attractors.
(PARAMS/SPECIAL/PARAM VIEWER)
The PATH MAPPER component is used to
manipulate data structures through lexical
operations.
Double-click the component to open up the
expression editor.
(SETS/TREE/PATH MAPPER)
The source notation is the existing path structure
and should match what is shown in the param
viewer with variable alphabetic placeholders.
Ie {0;0;1;1} becomes {a;b;c;d} or {g;h;i;j},
Which placeholder letters used does not matter.
If you are using the data within the lists
themselves to manipulate the structure, this
should also be included.
ie. {0;1} N = 4 BECOMES {A;B}(i)
The target notation uses the same lexical
placeholders to represent the intended structure.
Changing the order of and removing placeholders
will change how data is grouped into branches.
121
Exercise
Looking closely at the param viewer diagram, we
can see that the rows of points are grouped when
the data path has three placeholders before being
split into individual branches.
(CURVE/SPLINE/POLYLINE)
A common request is to change the direction of
these polylines without extensive additional work.
By including a placeholder to represent the index
of data items in parentheses we can sort like
indices into lists (ie items with index 0 into the
first list and so on)
SOURCE CODE - {a;b;c}(i)
TARGET CODE - {a;b;i}(c)
122
Exercise
Note that now we have a list of points on each
branch the same length as the number of
branches we had previously, and vice versa.
(CURVE/SPLINE/POLYLINE)
123
Idea
124
Exercise
Create a number of curves in Rhino and move
them so that they are some distance apart.
Reference them into Grasshopper using a CURVE
geometry component.
Rename the component as keyframe curves.
(PARAMS/GEOMETRY/CURVE)
Rebuild the curves as polylines.
To do this, use the REBUILD component and
ensure the degree (input d) for the new curve is
set to 1. Either attach a integer component set to
1 or right-click the letter and go to set integer.
Use a number slider to set the resolution of the
new curve (number of control points).
(CURVE/UTIL/REBUILD)
To create the interpolation points between
succeeding curves we need to be able to compare
a curve to its neighbour. To do this we need to
make a list from the original with all items minus
the last, and one with all items minus the first.
Use two SHIFT LIST components with the shift
offset (input S) set to -1 and +1 respectively. Wrap
(W) must be set to false.
(SETS/LIST/SHIFT LIST)
Find the points of discontinuity along each of the
polylines.
(CURVE/ANALYSIS/DISCONTINUITY)
To create the between-points, we need to move
the first list of points in the direction of the second
using a MOVE component.
(TRANSFORM/EUCLIDEAN/MOVE)
125
Exercise
Create a vector between lists of points using
VECTOR 2PT.
(VECTOR/VECTOR/VECTOR 2PT)
Graft both the list of points and the list of vectors.
(SETS/TREE/GRAFT TREE)
Rather than a single vector the length of the
distance between the points we want a number
of between points, so use a MULTIPLICATION
operation to create vectors a fraction of the initial
magnitude.
(MATH/OPERATOR/MULTIPLICATION)
Use a RANGE component with default domain
(zero to 1). N input, controlled by an integer
number slider, will now control how many points
are interpolated between curves.
(SETS/SEQUENCE/RANGE)
Connect the range of vectors to the MOVE
component and view the points created.
126
Exercise
Connect the geometry output of the MOVE
component to a PARAM VIEWER. This will display
how the data is structured both in text form or
graphically using a tree diagram. Double-click the
component to toggle between these views.
The data is arranged in a number of lists, (or
branches in GH tree-talk) the number being
the product of the number of control points we
assigned to the rebuilt curves and the number of
(PARAMS/SPECIAL/PARAM VIEWER)
(CURVE/SPLINE/POLYLINE)
(SETS/TREE/PATH MAPPER)
The source notation is the existing path structure
and should match what is shown in the PARAM
VIEWER with variable alphabetic placeholders.
Ie {0;0;1;1} becomes {a;b;c;d} or {g;h;i;j},
The placeholder letters dont matter.
If you are using the data within the lists
themselves (as we will next) to manipulate the
structure, this should also be included.
Ie. {0;1} N = 4 becomes {a;b}(i)
The target notation uses the same lexical
placeholders to represent the intended structure.
To flip the direction of the polylines created in the
127
Exercise
Connect the moved points to the input and then
onto the polyline. The data matrix should now
have been flipped.
128
Idea
129
Exercise
The exercise will produce a definition that works
with any type of geometry, but as an example
create several points in rhino and reference them
into a POINT component. To remind ourselves
that the definition will work with other geometry,
connect the points to a GEOMETRY component.
Finally, connect the output of the geometry
component to a PARAM VIEWER to display its tree
structure.
(PARAMS/SPECIAL/PARAMVIEWER)
Next we use a neat trick in grasshopper to extract
the path objects from the viewer. If you connect
the param viewer output to a PATH component,
the path component will contain a list of all of the
branches in the tree. We then GRAFT this list, to
ensure that for each branch in our datastructure,
we can still map a list of indexes to it (This sounds
confusing - it will become more clear later in the
tutorial). Finally we connect our grafted list to a
PANEL component, which will convert any input
to Strings (text). This gives us half of the structure
information we need - telling us which branch our
geometry is on. We still need to find out which
index our geometry is located at on each branch.
(PARAMS/PRIMITIVE/DATAPATH)
(SETS/TREE/GRAFTTREE)
(SETS/LIST/LISTLENGTH)
(SETS/SEQUENCE/SERIES)
130
Exercise
Now we are going to use a function component
in order to present our data in a more readable
way (we are going to do the fairly menial task of
adding a space to the beginning of each of our
strings). This joining of one string ( ) to another
(the string representing the index of our geometry
in a list) is called concatenation, and using the
& syntax in a function component is one way to
achieve this in grasshopper.
(MATH/SCRIPT/F1)
(SETS/STRINGS/CONCATENATE)
131
Exercise
Finally, we are going to display this structure
information in the rhino viewport using a TEXT
TAG 3D component. Drop one of these onto
the canvas and take a look at its inputs. Most
importantly it requires a location (L) for the text
- we dont necessarily have this yet, and the text
to display (T) which will be the output of our
concatenated strings. Connect this to the T input.
(VECTOR/POINT/TEXTTAG3D)
(SURFACE/PRIMITIVE/BOUNDINGBOX)
(SURFACE/ANALYSIS/EVALUATEBOX)
132
Idea
133
Exercise
To begin with lets create a data structure similar
to earlier tutorials with the pathmapper. Draw
three curves in rhino, reference them into a
CURVE component, then divide the curves using a
DIVIDE CURVE component. This will give us a data
structure with three branches, and 10 points on
each branch.
(CURVE/DIVISION/DIVIDECURVE)
Now lets use the PATH MAPPER to flip the data
structure of the points. If we map from
{a;b}(i) -> {a;i}(b)
Grasshopper will create a new branch for each
index in the list of points, and place the old index
on this new branch. Therefore, all of the points
that were index 0 on several different branches
become one list on one branch. Our new tree
structure should have 10 branches with 3 points
per branch. Then use a CURVE component to fit
a curve through these newly structured lists of
points.
(SETS/TREE/PATHMAPPER)
134
Exercise
Time for another new component, CHARACTERS.
This component explodes a string into a list of
individual characters, something we will be doing
a bit of later on in VB.NET. We use it here to get a
list of each bit of information in the path object.
For example, a path defined as {0;1;5} (the 6th
point on the second curve) when exploded will
give a list as follows:
0. {
1. 0
2. ;
3. 1
4. ;
5. 5
6. }
Because this is essentially just a list of numbers,
we can either perform mathematical operations
on the information itself (addition, division,
multiplication), or we can shuffle the order of the
list around to produce different mappings.
(SETS/STRING/CHARACTERS)
Shuffling is exactly what we want to do. If you
think about it, in order to produce the same
mapping as the path mapper in the example
provided on the previous page, we need to take
whatever information we have at index (3) in our
list, and replace it with the information we have
at index (5). The simplest way to do this is to use
a script component - but dont get scared - we
are only going to write one line of code. Create a
VB.NET component, and right click its x input and
choose LIST ACCESS. Then double click the script
component and input the following line:
(MATH/SCRIPT/VBSCRIPT)
135
Exercise
Finally, we use a REPLACE BRANCHES component
to perform the actual mapping. This component
works by taking two lists of path objects one representing the original paths, and one
representing the paths they should be replaced
with. Connect our data to be mapped - the grafted
points, and the path object representing their
structure. Then connect the flattened list of new
paths to the component. The output should be a
list of points organised in exactly the same way as
our pathmapper - try it by connecting it to a curve
component.
(SETS/TREE/REPLACEBRANCHES)
136
Idea
137
Exercise
Firstly, we set up a set of data to pass to the
input of the script component. Reference some
curves from Rhino and use a REBUILD component
to rationalise them into segmented polylines.
Create a number slider to inform the number of
segments.
(PARAMS/GEOMETRY/CURVE)
(PARAMS/SPECIAL/NUMBER SLIDER)
(CURVE/UTIL/REBUILD)
Next, find the points of discontinuity of each of
these curves.
(CURVE/ANALYSIS/DISCONTINUITY)
Attach a PARAM VIEWER component to view the
data structure.
We have referenced 3 curves from Rhino and
rebuilt them with 13 control points so have
created 3 branches of data each containing 13
items.
(PARAMS/SPECIAL/PARAM VIEWER)
(PARAMS/SPECIAL/PANEL)
Pass this data stream into a VB.NET component.
Right-click the (X) input and select Tree Access.
(MATH/SCRIPT/VB SCRIPT)
138
Exercise
First we will create a comment to help work out
what we are doing and so that when others or
our future selves look back over the script it is
apparent what the script does.
139
Idea
140
Exercise
Reference one, or a collection of polylines into
grasshopper using a CURVE geometry component
(PARAMS/GEOMETRY/CURVE)
To decompose the polyline into a series of straight
segments we need to find points of discontinuity
(where the curve changes direction).
(CURVE/ANALYSIS/DISCONTINUITY)
Make a list from the original with all items minus
the last, and one with all items minus the first, use
two SHIFT LIST components with the shift offset
(input S) set to -1 and +1 respectively.
(SETS/LIST/SHIFT LIST)
Redraw the polyline as a series of lines drawn
between 2 points.
(CURVE/PRIMITIVE/LINE 2PT)
To find the angle between adjacent segments we
need to compare them, by creating two lists with
the segments to be compared sharing the same
index.
Use two SHIFT LIST components again with the
same shifting offset values.
(SETS/LIST/SHIFT LIST)
141
Exercise
Now we have the segments we can start to think
about comparing them to find the angle between.
We use the angle component but must understand
what the component actually does before we can
trust the results. This component compares two
vectors, so we know that the direction of the line
(how it was drawn) matters.
(VECTOR/VECTOR/ANGLE)
Both vectors should be originating at the same
point to get the correct angle between. This
means the direction of one of the vectors (which
we are translating from a line) needs to be
reversed.
(VECTOR/VECTOR/REVERSE)
Angles are returned in radians. The ANGLE
component also has an optional plane input to
ensure that the angle is taken in the manner you
would like. Ie you could find the angle between
two vectors in the XY plane only, as they would be
seen in plan.
(MATH/OPERATORS/MULTIPLICATION)
To try and ensure accuracy, we will supply a plane
as well as the vectors to be compared.
In the plane drop down menu there are a number
of geometric combinations that can be used to
create a plane. Select LINE + LINE. Add another
shift list component with shift offset set to -1.
(VECTOR/PLANE/LINE + LINE)
The SHIFT LIST component will give us the points
at the location where the angles are being
measured. Use the PLANE ORIGIN component to
locate them and pass the planes to the ANGLE
component.
(VECTOR/PLANE/PLANE ORIGIN)
Finally, use a degrees component to convert the
angle found from radians to degrees.
(MATH/TRIG/DEGREES)
142
Idea
143
Exercise
Reference one, or a collection of polylines into
Grasshopper using a CURVE geometry component.
(PARAMS/GEOMETRY/CURVE)
To decompose the polyline into a series of straight
segments we need to find points of discontinuity
(where the curve changes direction).
(CURVE/ANALYSIS/DISCONTINUITY)
The t output returns the parameters of the curve,
with each straight segment having a domain of
1. Use this to shatter the curve at the points of
discontinuity.
(CURVE/DIVISION/SHATTER)
Use the CURVE LENGTH component to measure
the length of each segment. The returned values
appear unitless, but this is inherited from the
properties of your Rhino file.
(CURVE/ANALYSIS/LENGTH)
To rationalise and add further information to this
list of values, use a function component with two
variable inputs to perform a number of string
operations.
(MATH/SCRIPT/F2)
144
Exercise
Using two PANEL components we can concatenate
strings to add notation describing the dimension
and as well as unit information.
(PARAMS/SPECIAL/PANEL)
Translating the decimal (or floating point) data
to an integer rationalises the documentation to a
reasonable level for fabrication.
145
Idea
146
Exercise
This exercise uses definitions from the previous
two tutorials:
Tutorial 05 - Part 01
Find angles between segments of a polyline
Tutorial 05 - Part 02
Find lengths of segments of a polyline.
(PARAMS/PRIMITIVE/STRING)
(PARAMS/GEOMETRY/CURVE)
To display data like strings in the Rhino model
space, Grasshopper has two TAG components.
One is 2d and displays in the XY-plane at the point
supplied and the other 3d tag can be assigned a
plane to be oriented to.
The string is supplied as text to display
(CURVE/ANALYSIS/POINT ON CURVE)
The orientation to display the text depends on the
geometry being dimensioned. Choose and supply
the points on curve as the plane origin points.
Text size can also be manipulated by right-clicking
on the S input and entering a value.
(VECTOR/PLANE/XZ PLANE)
147
Exercise
To display the angle information in Rhino we will
use two pieces of data from the analysis definition.
Pass the angle to a INTEGER data component and
the points from the bottom shift list to a POINT
geometry component as shown.
(PARAMS/PRIMITIVE/STRING)
(PARAMS/GEOMETRY/POINT)
Use a function with a single variable input
to perform another string operation to add
dimension information.
(MATH/SCRIPT/F1)
Supply the string to a 3D TAG component.
(CURVE/ANALYSIS/POINT ON CURVE)
Orient the tag as before.
(VECTOR/PLANE/XZ PLANE)
148
Idea
149
Exercise
This exercise uses the definition from
Tutorial 04 - Part 04
Interpolate between a list of polylines
(PARAMS/GEOMETRY/CURVE)
We will be orienting this list of curves using the
ORIENT component which uses source and target
planes.
(TRANSFORM/EUCLIDEAN/ORIENT)
The source planes will be frames taken
perpendicularly at the start of the curve. Use the
PERP. FRAME (note singular) with the evaluation
parameter set to zero.
(CURVE/ANALYSIS/PERPFRAME)
The target planes will be created from a grid of
points. Use a rectangular grid component and
create number sliders to manipulate the size of
the grid cells.
(VECTOR/GRIDS/RECTANGULAR)
150
Exercise
To ensure there is always enough cells in the
grid to orient curves to we will use a FUNCTION
component.
if(sqrt(x) > int(sqrt(x)), int(sqrt(x))+1, int(sqrt(x)))
This is a complicated way of rounding the numbers
we have.
(PARAMS/PRIMITIVE/STRING)
(PARAMS/GEOMETRY/POINT)
Use a LIST LENGTH component to return the
number of curves in the list. The function
component then defines the grid dimensions to be
just more than the square root of this figure.
(SETS/LIST/LIST LENGTH)
Flatten the list of cell curves and use the AREA
component to find the centre point of each cell.
This is our target plane as the ORIENT component
assigns a plane in the XY-axis at this point.
(SURFACE/ANALYSIS/AREA)
If the ORIENT component has more target planes
that curve geometries it repeats the orientation of
the final curve to the additional planes. To remove
these, right-click on the component and select
shortest list. Now when the curves run out, the
orient component stops.
151
Idea
152
Exercise
Use the CURVE tool in Rhino to draw three closed
curves. Use the MOVE tool in Rhino to move two
of the curves vertically to create a top, middle and
bottom of our loft. Reference all three curves into
a grasshopper CURVE parameter component.
(PARAMS/GEOMETRY/CURVE)
Place a LOFT component on the canvas. The
component will interpolate a surface through the
inputted curves, and the order in which they are
referenced is important.
(SURFACE/FREEFORM/LOFT)
Place a FREEFORM CLOUD and NUMBER SLIDER
on the canvas. This component creates points on
the surface of a given geometry. It is useful for
very quickly generating points on a shape without
needing to define a grid or a UV mapping. You
should see a random cloud of points on your
lofted surface.
(VECTOR/GRIDS/FREEFORM CLOUD
Now we are going to use a PROXIMITY 3D
component to draw lines between the points
in the cloud based on a the distance between
them and a maximum number of neighbours.
In this tutorial we simply want to generate an
arbitrary network as quickly as possible, but
proximity is also useful for triangulating fields
and diagramming relationships between nodes among other things.
(MESH/TRIANGULATION/ PROXIMITY3D)
Lastly a little clean up. Right click on the G input of
the proximity component and choose Set Number
to set it to 2. This should prevent grasshopper
from creating more than 3 lines from each point,
a key constraint to the rest of the definition. Then
add a REMOVE DUPLICATE LINES component (from
kangaroo). This remove double ups in our network
that would otherwise break future tutorials.
(KANGAROO/UTILITY/REMOVEDUPLICATELINES)
153
Idea
154
Exercise
Use the outputted network of curves from the
previous exercise, and connect them to a CURVE
PARAMETER component in order to organise
your definition. Using these separate parameter
components at key moments in a definition makes
it slightly easier to identify where you can replace
an input with something else. (Later tutorials)
(PARAMS/GEOMETRY/CURVE)
Use and END POINTS component to get the start
and end points of every inputted curve. Next
use a REMOVE DUPLICATE POINT component
(from kangaroo) to generate a list of unique point
locations. This is extremely useful for search
algorithms. Imagine having 5 apples on a bench
and being asked to pick the closest apple. Easy?
Now image 4 of the 5 apples being in EXACTLY the
same place. How do you choose the closest apple?
(CURVE/ANALYSIS/END POINTS)
(KANGAROO/UTILITIES/REMOVEDUPLICATEPTS)
Now we jump into setting up our VB SCRIPT
component. By default this component has two
inputs, x and y, but you can add as many inputs
and outputs as you like. Connect them as shown,
and then we can get on to telling the component
how to read the data that we are providing it.
(MATH/SCRIPT/VBSCRIPT)
155
Exercise
First things first. You are going to write a script
that other people are going to want to read, share,
extend and credit you for. Make sure they know
who you are. Use () apostrophes to comment
code in VB. Comments are lines that the computer
doesnt read - you do. Be careful with syntax make sure you type each line very carefully and
watch out for spelling and grammar errors.
b = outCrvs
c = outParams
156
Exercise
Now we create another loop - nested inside our
first one. For every single point in the list, we are
looping through every single curve in order to find
the two or three that share an end point with the
one we are checking.
We also create a path object here, in order to
create a tree structure that remembers which
point we are working on. That way once the script
has finished running, we will have a datatree that
is organised with each branch representing a node
in our network, and containing a list of lines that
connect at that node. Tedious, but clever.
157
Exercise
Here we use another method of the Curve
object to find the closest point on the curve
(tCrv.ClosestPoint). Methods have
specific parameters called arguments. For the
closest point method, we need to provide some
information on which point we want to check
from (pts(i)), the parameter of the curve which
represents the closest point on the curve (t), and
the maximum distance to bother searching. In
this case the max distance is very small as we are
only really interested in points that are already on
the curve (distance 0). This ClosestPoint method
sets the value of t, but it is also a Conditional
statement. If no points are found that are less
than 0.01 away, then the method returns false.
This is useful, because we can use the function to
find only the curves that terminate at a node (our
grand aim).
158
Exercise
Next we add another conditional statement to
make sure we are only working with the start
point of a curve, and if not, flip it. This code
prevents our script outputting geometry that is
difficult to work with using standard grasshopper
components.
Finally, we use another method of the Curve
object to find the parameter of a specific distance
along a curve (tCrv.LengthParameter).
Once this is done, all we need to do is add our
objects to the dataTrees we created at the start
of the scripting tutorial. Adding is a method of
the dataTree object, and has two parameters. The
object to be added (tCrv, tDist), and the
path to store the object at (p).
159
Idea
This exercise uses the output from the script created in Part
02 to define the size and locations of circular geometries
around nodes. Circles are used because grasshopper has
some convenient tools for fitting circles through three points
and thus they are always planar, allowing us to easily define
a connection between 3d lines. However, this limits the
geometry of the network as it is not always possible to fit a
circle through more than 3 points/connecting lines.
The exercise demonstrates how to create a flexible definition
that accounts for 2 and 3 intersections at a node. This
requires breaking the definition into two halves using dispatch
components.
160
Exercise
Continue the definition from the previous exercise
by using the data from the script component with
an EVALUATE CURVE component. This will find the
point and tangent at a set parameter on a curve.
(CURVE/ANALYSIS/EVALUATECURVE)
Next we need to find out if we have two or three
connecting lines at the node, as this will effect how
we generate our circles. We use a LIST LENGTH
component to test how many lines we have at each
node. Then we use an EQUALITY component to
test if we have 2 lines. This component generates
boolean values (true if 2, false if not), which we can
use as an input for a DISPATCH component.
(SETS/LIST/LISTLENGTH)
(MATH/OPERATORS/EQUALITY)
(SETS/LIST/DISPATCH)
The dispatch component takes an input List (L)
and an input pattern (P). In this way, we can use
one pattern to dispatch any data we like, so long
as they share the same structure. We use two
dispatch components, one dispatches our curves,
and one dispatches our points.
The A output of the dispatch will be lists that have
true value to the pattern (in this case, true values
are lists that have exactly 2 curves). The B output
will be lists that have a false value (anything other
than 2 curves). Later on in our definition we will
fit a circle through a list of points. When we have
3 connecting lines at a node, this will conveniently
produce a clean, reasonably sized circle. But if we
only have two nodes, it will fit an enormous circle
through those two points. What we are trying to
do here is generate a third point for this case, that
will result in a reasonable sized circle.
(SETS/TREE/CLEANTREE)
161
Exercise
Finally, we are going to create vectors
(VECTOR2PT) between the two points on our lines
that will define the circle, and our new point that
was created by the eval curve component. We
then AVERAGE the vectors to find a new vector
that will MOVE our point out from the node
location an equal amount from each of the other
points. We can then connect this new moved
point, and the points from our cleaned dispatch
(A) to a FIT CIRCLE component. The points from
our (B) dispatch are good to go. Voila!
(VECTOR/VECTOR/VECTOR2PT)
(MATH/UTIL/AVERAGE)
(CURVE/PRIMITIVE/CIRCLEFIT)
162
Idea
163
Exercise
Firstly, we set up the inputs for the script
component. Use PANELS to quickly create the
rules for the Lsystem. We define the rule using a
String of characters. Inside the script we can use
string methods to split the string into two parts at
the comma, in order to distinguish between the
identifying character (e.g. a) and the substitution
rule (abc). Connect all the rules to a string
component for organisation.
Also create a number slider to tell the script how
many iterations to run.
(PARAMS/SPECIAL/PANEL)
Next, add the VB SCRIPT component. Connect the
first string to the x input as the starting condition.
Connect the rules strings to the y input, and right
click the y input and choose list access. We will
also need to tell the script component the type of
object we are supplying, so choose type hint and
set it to String. Lastly, connect the slider to the z
input.
(MATH/SCRIPT/VBSCRIPT)
Rename the inputs. Change the x input to
initString. Change the y input to rules, and the z
input to iterations. Now we are ready to write the
code, so double click the component to open the
script editor.
164
Exercise
First things first. You are going to write a script
that other people are going to want to read, share,
extend and credit you for. Make sure they know
who you are. Use () apostrophes to comment
code in VB. Comments are lines that the computer
doesnt read - you do. Be careful with syntax make sure you type each line very carefully and
watch out for spelling and grammar errors.
165
Exercise
Inside of this function area, we begin writing the
code that defines the function, in a similar way
to how we might define a variable. We use the
Function keyword to tell VB we are creating
a new function, followed by the name of the
function (createLSystem) that will be used to
call the function elsewhere in our script. Then we
define the variables to be used as parameters for
the function, and specify whether they are passed
to the function ByVal (objects that are read
as values and cannot be modified by the script)
or ByRef (objects that are read by reference
and can be modified.) Then we add the line End
Function to tell the script when our function is
over.
The first time the function runs, this last string will
be the initial input to the system (if you followed
the tutorial, this will be a).
Next we subtract one from our iterations variable
(iter), and we can use this later as a check for
our function to tell it when to stop running. Finally,
we create a new variable called nextString
that will be used to store the next generation of
the lsystem.
166
Exercise
Now we create the guts of the function, which
is a loop that iterates over all of the characters
in the previous generation of the lsystem
(lastString.Length - 1), and then finds
the appropriate substitution rule.
The script does this using another loop, which
iterates through all of the possible rules
(r.count() - 1). For each rule, it splits the
string at the comma (r(j).split(,)),
which creates two new strings, one for characters
to the left of the comma (which will be identifiers
for our rule) and one for characters to the right of
our string (the substitution characters). We then
use a conditional statement to check if the first
character of the rule (If(rule(0) = c)) is the
same as the character we are currently trying to
substitute. If it is, then we set the value of our new
substitution string to being equal to the second
part of our rule (rule(1)).
Once we have found the appropriate substitution,
we can add this to our nextString string.
(nextString = nextString +
substituteString).
167
Exercise
Once we have finished the loop through all
of the characters in the previous generation,
we can add the new string to our lsystem(t.
add(nextString)).
Up to this point, the script is not recursive, that is,
it does not continue to call itself. The next few lines
add a conditional statement that check to see if
the code needs to continue running (If(iter >
0)). If this condition is met, then the function calls
itself again. Because some variables are passed by
reference, the function will continue to add to the
data in the t list, which we passed to the function
using our original tree object.
Connect the A output of the script to a panel to see
your LSystem.
168
Idea
169
Exercise
Firstly, we set up the inputs for the script
component. Use a panel component to define the
pattern for the recursion script. Create a slider to
define the number of iterations of the function,
and a curve component to reference the list of
curves to use in the script.
Note - the pattern is used to specify which curve
to use. For example, 012 will use curve 0, then
curve 1, then curve 2, then repeat. For this reason,
the pattern cannot specify a curve index that
is greater than the number of curves you have
referenced.
--------------------------Recursive Chain
elseware
gwyllim jahn
copyright 2012
--------------------------create an output tree and add our first string
Dim crvList As New list(Of Curve)
crvList.add(crvs(0))
Dim currentIter As Integer = iterations
Dim chars As Array = pattern.ToCharArray()
run the recursive function and output
the final tree
createChain(crvList, crvs, currentIter, chars,
iterations)
a = crvList
170
Exercise
The function definition should look similar, we are
simply passing in all the variables we need and
assigning any that we want to modify by reference
(ByRef). Next we subtract one from our variable
that keeps track of the number of times the
function has run, so that we can stop once we hit
zero. Then we can proceed to get the last curve in
the chain, in order to begin adding to it.
171
Exercise
Next we get on to the transforms. We create a
Plane object for both our last curve and the
next curve we are adding. The plane objects are
created using the FrameAt method of the Curve
class. This method creates a plane at the specified
parameter of a curve. For our last curve, we use the
end of curve (lastCrv.Domain.Max), whilst for
our next curve, we use the start (0).
Then we create a Transform object with which
to store our transform information. We use the
PlaneToPlane method of the transform class to
orient an object from one plane to another. We
can then use the Transform method of our next
curve to pefform the reorientation.(nextCrv.
Transform(reorient)).
Finally, we add our new curve to the list of curves in
the chain, and perform the recursive check to see if
we need to call out function again. Youre done!
172
Idea
173
Exercise
We begin by referencing some curves drawn
in rhino (or created in some other way using
grasshopper) into a curve component.
(CURVE/DIVISION/DIVIDELENGTH)
Next we EXPLODE the polyline to get the
individual line segments. We could just as easily
create these segments using a combination of shift
list and line components - it is up to you. Next we
make sure that we have not accidentally produced
any duplicate lines (this will break kangaroo) using
kangaroos REMOVE DUPLICATE LINES component,
and connect the output to a line component for
ease of use later.
(CURVE/UTILITIES/EXPLODE)
(KANGAROO/UTILITIES/REMOVEDUPLICATELINES)
Now lets add the KANGAROO PHYSICS component
and take a look at its inputs. Flatten the FORCE
OBJECTS input, as kangaroo only accepts single
lists of force objects - these we will create in a
minute. The component also has inputs for anchor
points - points that remain fixed, specific settings,
geometry, and a reset toggle. Connect our line
component to the geometry input, and create a
new BOOLEAN TOGGLE to turn the simulation on
and off.
(PARAMS/SPECIAL/BOOLEANTOGGLE)
(KANGAROO/KANGAROO/KANGAROOPHYSICS)
174
Exercise
Add a SPRINGS FROM LINE component to the
canvas. Connect our lines to the Connection input
- this will tell kangaroo how construct the springs.
If we also connect the lines to the Rest Length
input of the springs component, kangaroo will
use the Length of the line as the rest length. This
simulates rigid behaviour as the two ends of the
spring will attempt to maintain the same distance
apart throughout the simulation.
(KANGAROO/FORCES/SPRINGSFROMLINE)
(KANGAROO/UTILITIES/REMOVEDUPLICATEPTS)
(CURVE/ANALYSIS/ENDPOINTS)
(PARAMS/SPECIAL/TIMER)
175
Idea
176
Exercise
We are going to extend the definition from the
previous exercise (Grouped as grey in the image
below) , so open it up and create a VB SCRIPT
component near the divide length components.
We will use the points from this component for
our script, so connect them to the X input, and
rename the input pts. Then right click the input,
choose TREE ACCESS, and specify the type hint
as POINT. You can rename the VB component to
something else as well if you like, I have called
mine VB Attract Fibres.
--------------------------Attract Fibres
elseware
gwyllim jahn
copyright 2012
--------------------------Dim outLines As New list(Of Line)
For i As Integer = 0 To pts.Paths.Count() - 1
loop code here
Next
a = outLines
177
Exercise
Next we create another loop that will iterate
over all the points on the current branch (pts.
Branch). We will create lines from each of
these points to every other point on every other
line - but NOT to points on the current line. This
functionality could be achieved with normal
grasshopper components, but it is simpler with
script.
We create another two loops to iterate over all
other branches (curves in our network), and
all the points on each branch. Then we extract
the appropriate curves for each line, using list
notation. pts.Branch(pts.Paths(i)).
item(j) Uses the branch method to extract a
particular branch from a tree based on where we
are at in our loop. Then the item method extracts
an item from the current branch.
Finally, we can create our line object, and add it to
our output list.
--------------------------Attract Fibres
elseware
gwyllim jahn
copyright 2012
--------------------------Dim outLines As New list(Of Line)
For i As Integer = 0 To pts.Paths.Count() - 1
For j As Integer = 0 To pts.Branch(pts.Paths(i)).Count() - 1
loop through all the branches again,
dont use previously used branches, or this branch
For k As Integer = (i + 1) To pts.paths.count() - 2
loop through all the pts on the branch
For l As Integer= 0 To pts.Branch(pts.Paths(k)).Count() - 1
make the line and add it to the list
Dim sPt As Point3d = pts.Branch(pts.Paths(i)).item(j)
Dim ePt As Point3d = pts.Branch(pts.Paths(k)).item(l)
Dim tLine As New Line(sPt, ePt)
outLines.add(tLine)
Next
Next
Next
Next
a = outLines
178
Exercise
Once we have finished creating the lines with our
script component, we can use these lines to define
the connections for our POWER LAW component.
This component works in a similar fashion to a
spring component, except that forces are always
positive (attraction) or negative (repulsion).
Connect the line output to the Connection input
of the power law component, set the EXPONENTS
input to -1, and connect sliders to STRENGTH and
CUTOFF. These inputs will be dependant on the
size of your model.
(KANGAROO/FORCES/POWERLAW)
179