Making Patterns

Making Patterns with Grasshopper

We will start this lesson from where we left off in the Intro to Grasshopper tutorial. If you are just joining us, in Rhino, we made a surface that is 80x45 mm and placed a point in the middle. I will shorten some of my instructions, so for example, instead of saying under the Parameter tab inside of  geometry panel theirs an point component, I will write Parameter Tab > Geometry > add Point. You can also double click on the work space and just type the tool name for an even quicker workflow, in this case Point

Adding our inputs

  1. Delete the Color swatch and Preview component from the previous Algorithm. We will use them later.
  2. Parameter tab> geometry> add the Point Component
  3. Right click the Point component and click on set one Point
  4. Select the point you made inside of rhino 
  5. Hide and lock the Rhino layers for right now 
  6. Hide the Rhino Grid for a cleaner look. Go to the Rhino command panel and type Grid
  7. Type h and press enter to hide grid

Making a point grid

Here we will make a simple grid of points based off our surface. We will use math to keep our grid the same ratio as our surface. 

Divide the surface

  1. Surface Tab > Utility > add the Divide Surface Component
  2. Connect the Surface output slot into the Divide Surface input slot

Add a number Slider

  1. Parameters Tab > Input > add a Number Slider
  2. Right click on the Number slider
  3. select Sliders type, change to Integer
  4. select Values and change the max to 20

do some math

  1. Duplicate the number slider 2 times. select > ctrl+C > ctrl +V 
  2. Math Tab > Operators > add two Multiplication Component 
  3. Change one slider to 16, another to 9 and the last one to 2
  4. Connect 16 to one slot A and 9 to the other.
  5. Connect 2 into both slot Bs

Hide what we don't need

  1. Select all the components except the Divide Surface component
  2. Press Spacebar and click on Disable Preview
  3. This helps keep the preview less cluttered.

Flatten our data

  1. In the Divide Surface component, you will see a little P in the output slot, this is where our Points are
  2. Right click on the P and select Flatten 

Measuring Distance

  1. Vector Tab > Point > add the Distance component
  2. Connect the Divide Surface output P to Distance input A
  3. Connect our Rhino Point output to input B

Understanding Domains

Domains are just a collection of numbers that are within the parameters we want.  So lets say you have a dice. That dice domain is 1-6. It's lower limit is 1 and upper limit is 6, these limits are called Bounds. Curves and surfaces have domains. A simple line has a domain of 0 - 1. If I wanted to make make a sub curve of that line, I can tell Grasshopper, I want a subcurve in the domain .3 to .7. This would shorten the curve on both sides. 

In math domains are incredibly important and valuable. It is the basis of scaling. Lets imagine we have a dice with 10 sides. You roll the dice 5 times and you get 7, 6, 8, 5, 6. The domain of that dice is 1-10 so we got 5 random numbers in that domain. Now these numbers are relative to each other and their domain. So if I take this information remap it to another domain, let's say 0-100, my numbers will become 70, 60, 80, 50 and 60. Here is an example of what that looks like. We will cover this more in detail on the next page.