Multiple Point Vector Field – Example 6.2
As explained in the previous example, vectors are not geometry in and of themselves, but are used to influence geometry, by orienting it, moving it, etc. In the last example we oriented rectangles. In this example, we will use referenced points to move control points on a curve so that those points are redrawn. Basically, each control point on each curve will find which of the several referenced points are closest to it, and then will reorient itself based on the strength of the vectors and the distance to the control point.
Step One – Initial Setup
This example starts by drawing a data structure similar to Exercise 1.3. If you change the way X and Y are grafted you will be able to change the orientation of the bands. You should have a fairly dense grid for this example. You can also draw a square grid and use the “Flip Matrix” component to change the orientation of the bands. Draw random points in the field this creates and reference these multiple points into a point container. Here the random points are shown in blue. Finally, these points will be linked together using the “InterpolateCurve” component. We can go ahead and draw that now.
Step Two – Find Vector Between Each Point and Closest Point from Rhino
Using the “Closest Point” component, find which of the points in the referenced point cloud is closest to each of the grid points. Determine the vector between them using the “Vector 2Point” component. You can display these vectors if you’d like.
Step Three – Move Grid points away from closest points as a factor of distance-
This is where it gets a bit tricky with a bit of math, but it is similar logic to what was discussed in many of the Attractor scripts (Part 2), especially Example 2.3. We are now going to move the points away from the “Repulser” points, with more movement for those points closer to the Repulser. The basic logic, then, is to take the distance and invert it.
To do this, plug your grid points into the “Move” component. This time instead of moving them X or Y or Z, we will use our vector which we established in step two. To do this, use the “Amplitude” component. Plug the vectors from “Vector2Pt” into the “V” slot.
We now have the correct direction for the movement, but the strength (the Vector Amplitude or the Vector Length) needs to be modified, in this case, inverted. To do this we need to do a bit of Math 😛 We will first divide the distance by a variable which will determine the Fallout of our effect and then subtract this result from a variable slider number which will determine the Radius of Effect for our script. Don’t worry if these terms don’t make sense yet…I just made them up myself and you can play with them later to see what they do. The last thing is to use the Max component to reset any values less than zero (negative values) back to 0, since we don’t want things moving in the opposite (negative) direction. Now we plug this result into amplitude for our vector and the hard work is done.
Step Four – Rewire to put Interpolate Curve through the moved points.
Now we are going to rewire our “Interpolate Curve” component to draw a curve through each of the points that were moved away from the original rows. If the data structure was set up right and not messed with, everything should be working alright.
Optional Steps – You can do some things to make the pattern more interesting. In this case, I added a “Cull Pattern” and a random number generator to randomly get rid of lines (you could also use “Random Reduce”. One other thing I did was offset the curves and create a surface between the original and offset curve to give the lines some thickness. I colored these surfaces white, and added a black plane in the background. You can see some variations in the results below…
When I started drawing this I didn’t have any particular project in mind, but as the design progressed I started to notice the results were looking a lot like the Superkilen project in Copenhagen. I’m not sure if they used grasshopper for this or not, but this or a similar process could have been used by BIG Architects and Topothek1 Landscape Architects.
And here is the Grasshopper Script…