Grasshopper Points

From TOI-Pedia

Introduction

LEVEL: INTRODUCTORY
Loading the player...


There is a logical order in the layout of the Tabs. The first type of geometry we encounter when we go from the left to the right will be the points. These points can be used for a variety of tasks. They can be made by :

  • Define them in Rhino and select them for a Point Parameter.
  • Making a point or points in Grasshopper when a Point Parameter is selected.
  • Making a point or points by defining the x , y and z axis of a Point Component which can be selected in the Vector Tabs.
  • Extracting a point or points from a 1 dimensional object like a curve
  • Extracting a point or points from a 2 dimensional object like a surface


The point in Grasshopper has multiple functions.

  • The point or points as a location
  • The point or points as a direction
  • The point or points as a basis for 1 dimensional objects like curves, polylines etc
  • The point or points as a basis for 2 dimensional objects,surfaces
  • The point or points as a basis for complex geometric relations.

Creating a point

point as parameter or vector

The world coordinate system is a 3 dimensional space and therefore we can define for a point 3 values. The x,y and z coordinates. A point defines a location in world space. Points can be made in many different ways.


Point as parameter

Point parameter defined in Rhino

We can use a parameter and create a point in Grasshopper. This option however also allows the definition of a point or points in Rhino. The parameter will only contain the data of the location of the point in world space. If the location of the point is changed in Rhino the parameter will be updated with the new location. The parameter enables you to define the point or points in the Rhino viewport. The input is therefore defined by where the cursor is clicked within the viewport. If the point is defined in Rhino and then selected for the Parameter, the points can still be moved within Rhino.

Point as vector

Point as vector, defined in Grasshopper

The point however also can be numerically defined in Grasshopper by connecting a numerical input to the action of creating a point or points. In the Vector tab we can find the Point option. This Point component has 3 inputs, one for every axis. These can be simply defined by typing them in, attaching either a number slider or a single number primitive. These values can be changed at any time. De alteration of the position of the point and all its relations will be re calculated throughout the network. When the point is created in this manner, it cannot be moved in Rhino.

Creating multiple points

Multiple points
Multiple inputs

The parameter can contain more than 1 point. If multiple points are selected in Rhino or generated in Grasshopper the parameter will contain them all. In that case the parameter will represent multiple locations in world space. Any action of a component will use the multiple points as input. The result is multiple actions on the same object. This property of using multiple inputs for a single action of a component is one of the more powerful tools within Grasshopper. It enables you to copy complex commands to a variety of objects.


For example: If multiple points are defined in Rhino and put in a point parameter, the parameter will contain multiple locations. When an object, a circle, has to be created, it needs a centre point, a radius and a plane on which it will be aligned. We can use the point parameter as input for the centre point. However because we have defined multiple points multiple circles will be created as a result. The action of creating a circle will applied to every point in the list of the parameter.


If the point is defined as a component, the input of the x, y and z coordinates have to be numerically defined. It is possible to define more than 1 number for each axis. Multiple numbers can be manually defined in the input menu of the component. The result is a list of multiple points.


Input lists

three methods

If the amount of input is increased for multiple channels the output will differ depending on the how the lists of the various channels are combined. There are three options of combining the list of the multiple inputs. These options can be accessed by right clicking the name of the component. The settings menu will appear. In this settings menu there are three options of combining the data from the input lists.


The first method of combining the input lists is the use of the "short list" In this case the shortest list of the inputs will dictate on how the lists are combined. It will take the shortest list en combine them with the other input lists. If the shortest list contains only 1 number, the output list will also contain one item. The rest of the X and Y numbers will be ignored. Shortestlist gr.jpg


The second is the standard setting of the "long list" In the case of the example we have 3 lists. The X input list with 6 numbers defined. The Y input list with 11 numbers defined and the Z list with 1 number defined. With the Longest List option , the output list will contain the same number of items as the maximum size of list of the input. In this case 11 numbers. The lists are combined by taking all first numbers of the list en combine them and then the second etc. If the list doesn't contain a second number it will use the last available number. The same goes for the 7th number , the x doesn't contain 7 numbers so it will use the last number of the list which is number 6. Longest list gr.jpg


The third method of combining the input lists is the " cross reference" . In this case all the numbers of the lists are connected to each other. So every number in list X will connect to every number of List Y and Z creating a net work of connections. This option can be used for creating point grids. Crossreference gr.jpg


Sets of numbers for input

Sequences

It is possible to manually input every x, y and z coordinate. However it can be more efficient to use a sequence of values as an input. In the Sets Tab we find various options to generate sets of values. The Sets tab contain the functions for manipulating and generating lists. There are three main types of sequences available for generating a set of values.

Range

The first is the Range. The Range component enables the user to define a range of values with a first and last number and the amount of steps. Large amount of values can be defined without to have manually type them in the list. The Range option can be effectively used when the domain is known and has to be divided.


Series

The second is the Series. The Series will enable you to define the starting value, the stepsize and the amount of steps. The series can be effectively used when the start value is known and the amount and size of the steps. In this case the domain is defined not by a value input but by the result of the start value, size of steps and amount of steps.


Random

The third is the Random option. With the Random component a random set of values is generated. The start and end value, the amount of values and the seed can be defined within the component.


combining Range, Series and Cross Reference

It is of course also possible to combine the components Range and Series to generate more then 1 domain. This will result in a set of points defined by multiple domains. However because we didn't define the first value of the domain only the last the resulting domains start all with 0.0. This results in an overlap of grids as can seen in the image.


combining two Serie components and Cross Reference

With the range option it is difficult to generate multiple non overlapping domains. The combination of two Serie components however can generate domains without overlap because you can define the first value of the domain. By defining the size of the domain smaller then the first value of the next domain a series of non overlapping grids are defined.


Data tree

The input data structure consists in this case of 4 domains with 4 values. Because they are cross referenced the the output data structure consists of 4 domains with 16 values. This results in a data tree structure with 4 branches ( the domains) and on each branch 16 values.


Mathematical definition of the value input

Math11 gr.jpg

The input of the series and range can be, like any other component manually defined. The components however also support the input of a variety of mathematical defined components. These can vary in complexity. From a simple sinusoid to the more complex mathematical description of the Möbius curve. The input data is mathematically redefined and offered as output.


Math gr.jpg
Point18.jpg

The mathematical description can vary not only in content but also in amount of variables. There are several options available. The mathematical description can be defined with 1, 2 ,3 or more variables. However there is also the option to extend beyond the embedded options of Grasshopper by scripting in Visual Basic or C#. These options will be discussed later in this wiki.


Math2 gr.jpg

Simple objects like a circle or a helix can quite easily mathematically defined. A circle is can be defined as f(x) = sin(t) and f(y) = cos(t) where t is within the range of 2Pi. A simple use of the function component will make it possible to draw a circle based on these formula's. The range of 2pi is defined by multiplying the range of 0 to 1 with 2 Pi. The cos for the X input and sin for the Y input will generate a circle. A helix can then easily be made by coupling the range to the Z value of the point component.


A well known curve is the Mobius curve. This curve can also be generated by using the function option in Grasshopper.

  • x=sin(x)*(-2+y*sin(x/2))
  • y=cos(x)*(-2+y*sin(x/2))
  • z=y*cos(x/2)


Mobius gr.jpg

Mathematics design gr.jpg

Mathematics design1 gr.jpg

Personal tools
Actions
Navigation
Tools