Intro to Grasshopper

Running Grasshopper

Grasshopper should already be installed on the all the IDeATE Windows laptops.
  1. In Windows start box select Rhinocerous 5 (64-bit).
  2. After Rhino starts up, close both RhinoCam tabs and minimize the help pane on the right.
  3. In the Rhino command box, type "Grasashopper" and hit Enter.
  4. Accept the license terms.
  5. Resize the Rhino and Grasshopper windows so they are next to each other and don't cover each other.

Making a Spiral Array

  1. To make a number slider, double click in the canvas to call up a search box and type "0 < 1 < 10".
  2. Make another number slider as "0 < 0.1 < 0.5". Put it below the first one.
  3. Make a third number slider as "1 < 50 < 200".
  4. Click on the Sets tab.
  5. Find the Sequence palette, and click on the down-arrow to reveal the entire palette.
  6. Click and drag a Series component on the canvas.
  7. Go to the Display pulldown menu and turn on Draw Icons and Draw Fancy Wires. Tun off Draw full Names. Try toggling the Draw Icons and Draw Full Names settings to see their effect.
  8. Hover over the S, N, and C labels (not the nodes) to get pop-up help.
  9. Connect the first slider to the series component's S (starting value) input by clicking on the slider's output node and dragging the mouse to the series component's S input node.
  10. Connect the second slider to the N (step size) input.
  11. Collect the third slider to the C (count) input.
  12. Replacing a connection: connect the first slider to the C input node and this replaces the connection from the third slider to the C input. (If you want to keep the old connection around, use shift-click when drawing the new connection.)
  13. Deleting a connection: put the mouse on the source node (watch the mouse pointer change shape), hold down the Control button, and draw the connection you want to eliminate.

    Using a Panel to View Data

  14. Hover over the series component's S output label and observe the data.
  15. Go tothe Params tab, and from the Input Palette, drag a Panel component on the canvas. Put it to the right of and below the Series component.
  16. Connect the Series component's S output to the Panel component's input. use the scoll bar to view the data.

    Navigating the Canvas

  17. The right mouse button translates.
  18. The scroll wheel (or Control-right button) zooms.
  19. The little navigation aide in the bottom right corner points toward your model.

    Points On A Circle

  20. Go to the Maths tab, and form the Trig palette insert a Cos component and a Sin component to the right of the Series component. Stack them one above the other.
  21. Connect the output of the series component to the inputs of the Cos and Sin components.
  22. Hover over the "y" output labels to see the values.
  23. Go to the Vector tab, and from the Point palette select a Construct Point component (first icon). Place it to the right of the Cos and Sin components.
  24. Connect the Sin component to the X input and the Cos component to the Y input. Leave the Z input unconnected.
  25. Hover over the Pt output and observe the values.
  26. Look in the Rhino window and you will see the points displayed. They form rouhgly 3/4 of a circle.
  27. Move the Count slider and observe the effect. Set the count to 20.
  28. Move the Step slider and observe the effect.
  29. Double click on the Step slider and type in the value 0.045.
  30. Right click on the Step slider and drag the "number of digits" slider from 1 to 2 digits.
  31. Set the slider parameters back to 1 / 0.1 / 50.

    Making a Spiral

  32. Go to the Maths tab and from the Operators palette, insert a Multiply component.
  33. Connect the Pt output of the Construct Point component to the A input of the Muliply component.
  34. Connect the S output of the Series compnent to the B input of the Multiply component.
  35. Look in the Rhino window and you'll see two sets of points.
  36. Click on a componen in the Grasshopper window; when the component turns green, so do its points. Points belonging to other components are shown in red.
  37. Right click on the Construct Point box and disable Preview to hide its points.
  38. Go to the Curve tab and from the Spline palette select Interpolate. Put the component to the right of and below the Multiply component.
  39. Connect the output R of the Multiply component to the vertices input (V) of the interpolate component.
  40. Observe the result in Rhino.
  41. Insert a Curve > Primitive > Line component above the Interpolate component.
  42. Connect the outputs of the Construct Point and Multiply components to the A and B inputs of the line component, respectively.
  43. Observe the result in Rhino.
  44. Increase the Count slider from 50 to 100 and observe the result.

    Making the Ellipses

  45. Disable preview for the Line component.
  46. Go to the Curve > Primitive palette and open the pulldown menu to see the full palette. Insert an Ellipse component.
  47. Connect the output R of the Multiply component to the point (P) input of the Ellipse component.
  48. Observe the result in Rhino.
  49. Hover over the E, F1, and F2 output labels of the ellipse to see the data.

    Scaling the Ellipses

  50. Inser a Maths > Polynomials > Square Root component below and to the left of the Ellipse component.
  51. Connect the Series component's S output to the input of the Square Root.
  52. Insert a Maths > Operators > Multiply component to the left of and below the Ellipse component. You may need to move things around to make room.
  53. Double click on the canvas and insert a number slider "0 < 0.40 < 1" above the Multiply component.
  54. Connect the number slider's output to the A input of the Multiply.
  55. Connect the Square Root component's output to the B input of the Multiply.
  56. Connect the output of the Multiply to the R1 input of the Ellipse.
  57. Observe the effect in Rhino.
  58. Create a second number slider "0 < 0.20 < 1".
  59. Insert another Multiply and connect the output of the new slider to the A input of the Multiply.
  60. Connect the output of the Square Root to the B input of the new Multiply.
  61. Connect the R output of the multiply to the R2 input of the Ellipse.
  62. Move the sliders to observe the effects in Rhino. Then set the slider values back to 0.4 and 0.2.

    Rotating the Ellipses

  63. Go to the Transform tab, and from the Euclidean palette's pulldown menu insert a Rotate component. Chose the second Rotate component: the one with no yellow plane in the icon.
  64. Connect the Ellipse component's E output to the geometry (G) input of the Rotate component.
  65. Connect the output of the point Multiply component to the center of rotation (C) input of the Rotate component.
  66. Also connect the point Multiply output to the final direction (T) input of the Rotate component.
  67. Final slider settings: 6 / 0.2 / 180.

    Saving As a DXF File

  68. Try clicking on an ellipse in the Rhino display. You can't select it.
  69. In Grasshopper, right click on the Rotate component and select Bake. Turn on the option to group the results.
  70. Now clicking on an ellipse in Rhino selects the entire array.
  71. Go to File > Export Selected and select the spiral.
  72. Hit enter to finish the selection.
  73. Save the file in AutoCAD DXF format as spiral.dxf.


Dave Touretzky
Last modified: Wed Apr 5 20:31:55 EDT 2017