🟢

Example: Folding Sunshade Panels in Grasshopper

This is a tutorial created by ParaStorm lab, an excellent YouTube channel to follow for Grasshopper tips and workflows. Be sure to subscribe to keep up with new tutorials and reward them for sharing their work.

This two part example shows how to create a folding sunshade panel (made from 6 folding triangular panels), then applies these shutters to a divided wall surface. This sunshade panel is inspired by the facade design at the Albahr Tower.

Part 1: Creating a Folding Sunshade Panel

The essential steps are:

  • 1:30 - Create a triangular grid on the XZ plane, then provide sliders to control the size of the grid, and the number of grid cells in the X and Y direction.
  • 2:05 - Set the number of grid cells in both the X and Y direction to 1, then get the edge curves of a single triangular grid cell that you’ll use to define the panel logic. Place a point at the midpoint of each edge curve of this single cell.
  • 2:20 - Create a polyline connecting this triangle edge midpoints, then scale it about the center of the triangle. This will be used later to position the bottom of the folding panels.
  • 3:25 - Create a resizable line perpendicular to the centerpoint of the face of the triangle.
  • 3:55 - Add more points at the midpoints of the polyline. All of these points will be connected later to form the folding panels.
  • 4:10 - Gather all the folding panel vertices using List Item nodes.
  • 4:45 - Add 12 lines to connect all the folding panel vertices.
  • 💡
    Watch carefully. This is easy to do, but you need to be precise as you connect the inputs.
  • 5:55 - Flex you input sliders to confirm that the panel edges are reshaping as expected.
  • 6:15 - Carefully merge groups of 3 lines to create 6 boundary surfaces by their edges.
  • 8:40 - Flex the triangular grid input sliders that set the X and Y extends to multiply this pattern and create a multi-panel wall.
  • 💡
    Note: If you want to apply this sunshade panel to an existing collection of triangular surfaces (on a panelized wall), leave the grid extents set to 1. You’ll use a different strategy — replacing the grid cell edges with the edges of your triangular panels.
  • 9:25 - Create an attractor point and remap the polyline scaling values (which positions the bottom edges of the folding panels) based on the closeness of each grid cell’s centerpoint to the attractor point.
  • 11:15 - Add multiple attractor points (if desired).

Part 2: Applying Folding Sunshade Panels to a Wall and Responding to the Sun Position

This second example illustrates a different approach — creating sunshade panels that fold open from the center (versus contracting toward the center, as shown in Part 1).

This example also shows the sunshade panels can respond to the sun’s position versus responding to attractor points.

The essential steps are:

  • Part 1 - Create a Single Folding Sunshade Panel
    • 0:20 - Create a triangular grid on the XZ plane, then provide sliders to control the size of the grid, and the number of grid cells in the X and Y direction.
    • 0:45 - Get the 3 edge curves, and place 2 movable points each edge curve of this single cell.
    • 1:16 - Create a resizable line perpendicular to the centerpoint of the face of the triangle.
    • 2:19 - Create 3 lines that connect the movable points on one edge of the triangle to the end of the perpendicular line.
    • 2:28 - Join these line curves and fillet them to create the edges of one of the folding panels.
    • 2:55 - Repeat these steps to create the two other folding panels.
    • 3:50 - Use List.Item to grab each of the folding panels individually, and rotate them about their bottom edges.
    • 5:00 - Use the edges of the folding panels to create boundary surfaces.
  • Part 2 - Extend the Single Panel Logic to Create a Wall
    • 5:45 - Adjust the grid extent sliders to extend the number of grid cells in each direction.
    • 💡
      Note: If you want to apply this sunshade panel to an existing collection of triangular surfaces (on a panelized wall), leave the grid extents set to 1. You’ll use a different strategy — replacing the grid cell edges with the edges of your triangular panels.
  • Part 3 - Add an Attractor Point to Control the Panel Rotation Angle
    • 6:28 - Create a bounding box around the entire grid of panels. This will establish the boundary for an attractor point controlled by an MD Slider.
    • 6:35 - Set up an attractor point and compute the distance to the centerpoint of each grid cell.
    • 7:00 - Remap these distances to the desired range of panel rotation angle values.
    • 7:55 - Move the attractor point to test the impact on the panel rotation angles.
    • 8:13 - Use another GraphMapper node to alter (amplify, diminish, or introduce a wave) to the response to the distance from the attractor point.
  • Part 4 -Control the Panel Rotation Angle based on the Sun Position
    • 9:21 - Add a Solar Arc node to specify sun’s position.
    • 9:30 - Use the Solar Arc node to compute the sun position for a specific latitude and longitude.
    • 💡
      You can scale the Arc and Sun to provide a easier visualization of the sun’s position.
    • 10:00 - Provide a slider as input to the Offset parameter to simulate the movement of the sun through the day.
    • 10:30 - Create a sphere to visualiaze the sun.
    • 10:45 - Move the center of the SolarArc and Sun left or right to match the centroid of the wall’s bounding box.
      • 11:21 - Add an area to grab the centroid of the wall’s bounding box.
      • 11:23 - Move the SolarArc and Sun to position them accurately relative to the centroid of the wall’s bounding box.
    • 11:50 - Use List Item, then create a Volume to grab the position of the centroid of the sun.
    • 12:59 - Create another Area to grab the centroid of the wall’s bounding box, then create a line that connects the centroid of the sun to the centroid of the bounding box.
    • 💡
      This line will indicate the most direct orientation of the sun to the sunshade panels.
    • 13:10 - Create a point using the centroid of the sun, then use this point to replace the attractor point created in Part 3.
    • 💡
      The panels will then use the sun position as the attractor point to control the panel rotation angle.
    • 13:20 - Use the input sliders to tune the panel’s folding response to the sun’s position as desired.