openobject.org

Responsive Roof

From Physical Programming

Creates a parametric surface that adjusts it’s shape in response to the position of a reference point.

This tutorial uses the Rhino Explicit History Plugin. See the Links page for more information.

By: Rory Hyde
Date: 23.03.08
Version: Uses Alpha 4 release (Jan 31st)

Download example .wrm file

Completed Explicit History graph arrangement Image:ResponsiveSurface_EHgrab.jpg

Steps

  1. Add reference point: Add a “Point” to the Rhino model space. Drag a “Point” component (vector menu) to the Explicit History (E.H) graph. Rename it “refPt”. Right click on refPt in the E.H graph, select “Set one Point” and select the point in Rhino model space.
  2. Add range generator: Drag a “Range” component (scalar menu) into the E.H. graph. By hovering over the “D” and “N” letters on the component we can see that it requires a domain interval (a start and end value) and an integer representing the number of steps.
  3. Add domain interval variable: Drag an “Interval” component (scalar menu) into the E.H graph and rename it “srfSize”. Right click it and select “Set one interval” with a start value of 0 and an end value of 50. This will determine the size of our surface in the X and Y directions. Connect srfSize to the “D” (Domain) input on the Range component.
  4. Add number of steps variable: Drag an “Integer” component (scalar menu) into the E.H graph. Rename it “nPts”. Right click it and set the value to 9. Connect the nPts output to the Range “N” input.
  5. Add point grid: Drag a “Point from XYZ Coordinates” component into the E.H graph. Rename it “ptGrid”. Connect the R output of the Range component to the X and Y inputs of ptGrid. Right click on ptGrid and set the data stream matching to “Cross Reference”. A 10 x 10 grid of points should now be visible in the Rhino model space.
  6. Add vertical lines to each point: Drag a “Line SDL” component (Curve menu) into the E.H graph. “Rename it vertLines”. Connect the “Pt” output of the ptGrid component to the “S” (start point) input of vertLines. If you zoom right in, there should be a line one unit long attached to each point.
  7. Set line lengths to be relative to distance to refPt: Drag a “Distance” component (vector menu) into the E.H graph. Connect the ptGrid and refPt outputs to Dist inputs A and B. Connect the Dist output to the “L” input of vertLines. The vertLines should now have a length that is equal to the distance from it’s point in ptGrid and the refPt.
  8. Add points to end points of vertLines: Drag a “Curve Ends” component (curve menu) into the E.H graph. Rename it “endPts”. Connect the vertLines output to the endPts input.
  9. Add surface through endPts: Drag a “Surface from Points” component (surface menu) to the E.H graph. Connect the “E” output of endPts into the “P” input of srfGrid. This component also requires that we tell it how many points will be used to make up the surface in the U direction (U and V are like X and Y for surfaces), to do this we need to add 1 to the output of the nPts component (because arrays start at zero). Drag an “Add” component (scalar menu) into the E.H graph. Connect the nPts output into the “A” input of the new Add component. Right click on the “B” input and set it to 1. Connect the output from the Add component to the “U” input of srfGrid.
  10. Hide construction objects: Right click on each visible object except for refPt and srfGrid, and uncheck the “Preview” option to hide it in the Rhino model space.
  11. Play: Move the refPt around to recalculate the surface, adjust the other input parameters, create a falloff by passing the distance results through a function, add multiple refPts, etc.

Completed Rhino model Image:ResponsiveSurface_All_sml.jpg

Completed Rhino model with hidden construction objects Image:ResponsiveSurfaceHidden_sml.jpg

Return to Tutorials.
Return to Physical Programming Main_Page.