Final Project: Visualizing Water Runoff Direction

As Landscape Architects, it is critical to design land forms that take water runoff directions into consideration and grade sites accordingly. The process of acquiring site data, analysis and calculations can be tedious. This project attempts to speed up watershed analysis and support the design process by coming up with a Grasshopper script that can work universally.

Initially, I started my project with acquired site LIDAR data and tried to process a mesh through a runoff script. Due to the large data and the time frame of this project, I decided to reduce the size of the rhino model by creating a hypothetical site instead. I used a point cloud as a base in the rhino model and created a surface in grasshopper. I generated contours to visualize the site as I change it. The number sliders for span and flexibility help in molding the surface to a realistic slope.

For the second part of the project, I initialized the water runoff script by creating a mesh. Then, I populated the geometry with random points (variable number sliders) to generate potential high points. The landscape mesh was then merged to a sphere mesh to generate a circle on the mesh and interpolate the lowest point. This was then plugged into a anemone loop to visualize the flow direction.

The two parts of this script when combined together forms a powerful tool that can be used during the design phase. Using the gumball tool in rhino, the spot elevations can be manipulated to redefine the contours. This restarts the anemone loop for the water runoff script and visualizes the new flow direction.

To enhance this script, it would be a good idea to add another component that visualizes flooding patterns (water accumulation). The number of streams can be predefined for that scenario, but I will need to figure out a way to manage several lists with variables if I want to keep the number sliders. For visualizing runoff at Earlham playground, I will first need to extract spot elevations from existing contours, then plug into this script to mold the site.

Final Project Installment 2: Visualizing Drainage of a Playground

In Installment 1, I imported a point cloud from LIDAR and created a mesh to plug into Grasshopper. Then, I trimmed the mesh to the site location and applied Mesh2Nurb before starting on Grasshopper. Before scripting, I extracted control points of the existing topography.

In this installment, I tested some scripts suggested by Generative Landscapes and AAD-Algorithms-Aided Design (Tedeschi) to manipulate control points of a surface. I started small by testing the script on a made-up base data as shown below-

Manipulating points

The points are plugged into patch component to construct a surface and sliders for span and flexibility are used to make corrections.

Manipulating points_patch.PNG

The brep/mesh to contour component helps in visualizing the slopes as seen below-

Generating Contours

The grasshopper script as seen below uses patch and contour with respective number sliders to make adjustments.

Editable Surface Script

As for manipulating control points to make grade changes, it can now be done easily on Rhino by selecting individual points and changing z direction using gumball.

Manipulating control points on rhino

Final Project Description

The goal of this project is to run and test flooding patterns of a specific site- Earlham Elementary School in Iowa. This will be done based on the rainfall pattern, drainage, existing and proposed topography. The site is located close to a parking lot that floods every year. Making a model on Rhino and simulating climate conditions will give us a better understanding of the site. The final product is envisioned to be in two components- existing and proposed.

Midterm: Moving Water

Water flow1;
Water flow2;
Water flow3;
Water flow4;
Water flow5;
Water flow6;
//Declare six objects

float x;
float y;
float a = 100;
int B;
//Declare variables

void setup () {
size (1600, 900);
colorMode(HSB, 100, 100, 100); //Changing HSB ranges for this program
B = color(180, 10, 50); //Assigning background color

//Construct water ripple objects
flow1 = new Water(color(0), 100, 900, 3);
flow2 = new Water(color(0), 150, 850, 6);
flow3 = new Water(color(0), 200, 800, 10);
flow4 = new Water(color(0), 100, 750, 12);
flow5 = new Water(color(0), 100, 650, 16);
flow6 = new Water(color(0), 100, 600, 20);
}

void draw () {
background(B);
//Run water ripples
flow1.move();
flow1.display();
flow2.move();
flow2.display();
flow3.move();
flow3.display();
flow4.move();
flow4.display();
flow5.move();
flow5.display();
flow6.move();
flow6.display();

//Moving Moon Loop
fill(100);
ellipse(a, 100, 100, 100);
a++;
if (a > width) {
a = 0;
}
}

//Define Class Water
class Water {
color c;
float xpos;
float ypos;
float xspeed;
Water(color tempC, float tempXpos, float tempYpos, float tempXspeed) {
c = tempC;
xpos = tempXpos;
ypos = tempYpos;
xspeed = tempXspeed;
}

//Static water
void display() {
//Shadows
stroke(0);
fill(0);
ellipseMode (CENTER);
ellipse (xpos, ypos, 7500, 100);

//Lighter toned water
stroke(70);
fill(70);
ellipse (xpos, ypos, 2500, 100);
}

//Dynamic water
void move() {
xpos = xpos + xspeed;
if (xpos > width) {
xpos = 0;
}
}
}

HW 5: 2D Array

int spacer;

void setup() {
size(500, 500);
spacer = 50;
strokeWeight (5);
noLoop();
}

void draw() {
background(255);
for (int y= 0; y < height; y+= spacer) {
for (int x= 0; x < width; x+= spacer) {
strokeWeight(5);
stroke(0);
point(x , y );

strokeWeight(1);
stroke(0);
line(x,y,x+spacer,y);
line(x,y,x,y+spacer);
}
}
}

HW4: Grids

Brute Force Lines:

void setup() {
size (500, 500);
background(255);
}

void draw() {
////vertical lines
//line(50, 0, 50, 500);
//line(100, 0, 100, 500);
//line(150, 0, 150, 500);
//line(200, 0, 200, 500);
//line(250, 0, 250, 500);
//line(300, 0, 300, 500);
//line(350, 0, 350, 500);
//line(400, 0, 400, 500);
//line(450, 0, 450, 500);

////horizontal lines
//line(0,50,500,50);
//line(0,100,500,100);
//line(0,150,500,150);
//line(0,200,500,200);
//line(0,250,500,250);
//line(0,300,500,300);
//line(0,350,500,350);
//line(0,400,500,400);
//line(0,450,500,450);

////resize with window
int a =width/5;
int b=height/5;

////vertical lines
line(a, 0, a, height);
line(a/2, 0, a/2, height);
line(a*1.5, 0, a*1.5, height);
line(a*2, 0, a*2, height);
line(a*2.5, 0, a*2.5, height);
line(a*3, 0, a*3, height);
line(a*3.5, 0, a*3.5, height);
line(a*4, 0, a*4, height);
line(a*4.5, 0, a*4.5, height);

////horizontal lines
line(0, b, width, b);
line(0, b/2, width, b/2);
line(0, b*1.5, width, b*1.5);
line(0, b*2, width, b*2);
line(0, b*2.5, width, b*2.5);
line(0, b*3, width, b*3);
line(0, b*3.5, width, b*3.5);
line(0, b*4, width, b*4);
line(0, b*4.5, width, b*4.5);
}

 

Brute Force Rectangles:

void setup () {
size (500, 500);
background(255);
}

void draw () {
//column1
rect(0, 0, 50, 50);
rect(0, 50, 50, 50);
rect(0, 100, 50, 50);
rect(0, 150, 50, 50);
rect(0, 200, 50, 50);
rect(0, 250, 50, 50);
rect(0, 300, 50, 50);
rect(0, 350, 50, 50);
rect(0, 400, 50, 50);
rect(0, 450, 50, 50);

//column2
rect(50, 0, 50, 50);
rect(50, 50, 50, 50);
rect(50, 100, 50, 50);
rect(50, 150, 50, 50);
rect(50, 200, 50, 50);
rect(50, 250, 50, 50);
rect(50, 300, 50, 50);
rect(50, 350, 50, 50);
rect(50, 400, 50, 50);
rect(50, 450, 50, 50);

//column3
rect(100, 0, 50, 50);
rect(100, 50, 50, 50);
rect(100, 100, 50, 50);
rect(100, 150, 50, 50);
rect(100, 200, 50, 50);
rect(100, 250, 50, 50);
rect(100, 300, 50, 50);
rect(100, 350, 50, 50);
rect(100, 400, 50, 50);
rect(100, 450, 50, 50);

//column4
rect(150, 0, 50, 50);
rect(150, 50, 50, 50);
rect(150, 100, 50, 50);
rect(150, 150, 50, 50);
rect(150, 200, 50, 50);
rect(150, 250, 50, 50);
rect(150, 300, 50, 50);
rect(150, 350, 50, 50);
rect(150, 400, 50, 50);
rect(150, 450, 50, 50);

//column5
rect(200, 0, 50, 50);
rect(200, 50, 50, 50);
rect(200, 100, 50, 50);
rect(200, 150, 50, 50);
rect(200, 200, 50, 50);
rect(200, 250, 50, 50);
rect(200, 300, 50, 50);
rect(200, 350, 50, 50);
rect(200, 400, 50, 50);
rect(200, 450, 50, 50);

//column6
rect(250, 0, 50, 50);
rect(250, 50, 50, 50);
rect(250, 100, 50, 50);
rect(250, 150, 50, 50);
rect(250, 200, 50, 50);
rect(250, 250, 50, 50);
rect(250, 300, 50, 50);
rect(250, 350, 50, 50);
rect(250, 400, 50, 50);
rect(250, 450, 50, 50);

//column7
rect(300, 0, 50, 50);
rect(300, 50, 50, 50);
rect(300, 100, 50, 50);
rect(300, 150, 50, 50);
rect(300, 200, 50, 50);
rect(300, 250, 50, 50);
rect(300, 300, 50, 50);
rect(300, 350, 50, 50);
rect(300, 400, 50, 50);
rect(300, 450, 50, 50);

//column8
rect(350, 0, 50, 50);
rect(350, 50, 50, 50);
rect(350, 100, 50, 50);
rect(350, 150, 50, 50);
rect(350, 200, 50, 50);
rect(350, 250, 50, 50);
rect(350, 300, 50, 50);
rect(350, 350, 50, 50);
rect(350, 400, 50, 50);
rect(350, 450, 50, 50);

//column9
rect(400, 0, 50, 50);
rect(400, 50, 50, 50);
rect(400, 100, 50, 50);
rect(400, 150, 50, 50);
rect(400, 200, 50, 50);
rect(400, 250, 50, 50);
rect(400, 300, 50, 50);
rect(400, 350, 50, 50);
rect(400, 400, 50, 50);
rect(400, 450, 50, 50);

//column10
rect(450, 0, 50, 50);
rect(450, 50, 50, 50);
rect(450, 100, 50, 50);
rect(450, 150, 50, 50);
rect(450, 200, 50, 50);
rect(450, 250, 50, 50);
rect(450, 300, 50, 50);
rect(450, 350, 50, 50);
rect(450, 400, 50, 50);
rect(450, 450, 50, 50);
}

 

For Loop Lines:

void setup() {
size (500,500);
background(255);
}

void draw() {
//horizontal
for (int a=width/10; a<width; a+=width/10) {
line(0,a,width,a);
}
//vertical
for (int b=height/10; b<height; b+=height/10) {
line(b,0,b,height);
}
}

 

For Loop Rectangles:

void setup() {
size(500, 500);
background(255);
}

void draw() {
for (int y = 0; y < width; y+= 50) {
for (int x = 0; x <= height; x += 50)
rect (x, y, height/10, width/10);
}
}

Array Lines:

int[] coordinates = { 50, 100, 150, 200, 250, 300, 350, 400, 450};

void setup() {
size (500, 500);
background(255);
}

void draw() {
//horizontal
for (int y=0; y<coordinates.length; y++) {
line (0, coordinates[y], width, coordinates[y]);
}
//vertical
for (int x=0; x<coordinates.length; x++) {
line (coordinates[x], 0, coordinates[x], height);
}
}

Array Rectangles:

int[] coordinates = {0, 50, 100, 150, 200, 250, 300, 350, 400, 450};

void setup() {
size(500, 500);
background(255);
}

void draw() {
for (int y = 0; y <coordinates.length; y++) {
for (int x = 0; x <coordinates.length; x++)
rect (coordinates[x], coordinates[y], height/10, width/10);
}
}

Grid_coding