Based on this post, the problem of modeling tree-like fractal shapes is still a good question for early years of computational design education. Last time, I used Rhino’s macro to study these kind of fractals in an “impossibly” limited interface, but this time both vb.net and Anemone are introduced to students. First, using a Vb.net component that creates “the binary tree”: Here is the Grasshopper definition if you would like to see the simple vb.net loop in there: [GHX: 0.9.0076] (Don’t left click on the link, right click and “save the file” to your computer). Then, […]

## vb.net

Here is the simple Grasshopper definition [GHX: 0.9.0072] that activates Rhinoceros’ camera by given parameters. Camera position is determined by the “point oriented” method here. This means that you have to have a target point for the camera first. In fact, I was trying to find a suitable command for getting the actual camera position of Rhinoceros but I think it is impossible (for now). I couldn’t track the camera object by its ID number also. There are some Grasshopper components that deal with this issue however. The simple code inside the vb.net […]

This simple vb.net component controls Rhino viewport background without a need to enter it’s options panel. It is used to change viewport background color and grid visibility quickly within Grasshopper. Here is the definition file: [GHX: 0.9.0056]. In order to be able return to default settings, I put a “default” toggle. Just click on it to “false” state, then the Rhino background color can be changed by the B input. This component also handles the grid. However I couldn’t find a working method to hide and show the Rhino grid within […]

Just a quick tip as I thought might be useful in some cases. Generating random numbers in architectural scripting is not too catchy thing for designers. It is for sure, we want every parameter to be under our control (as if it were possible!). I was thinking about that in Grasshopper. A dataflow graph such as in Grasshopper regenerates whenever necessary (a change on an input value “fires” every connected component), therefore random number component requires your action (for example changing a seed value using a slider) in order to […]

[GHX:0.8.0066] Here is today’s improvement on my metronome with timer component, which started here. It’s very easy to tell Grasshopper about seconds and organize it according to it. Using an interval smaller than 1 seconds, this small script catches every second and returns a different value. However, it’s much harder to implement smaller values than seconds. It seemed easy at first sight but getting accurate results smaller than seconds require working with milliseconds. You can output current milliseconds value but there is another mechanism needed if I want to tell Grasshopper […]

This is probably the most simple definition on this site but I think it’s very useful. Timer is a special component of Grasshopper that is significant in terms of real-time sketching paradigm. This basic use of timer includes a 1 second update to a Vb script. Inside of the script, system date’s seconds are returned, so we see a real-time increasing number at the output A. Beyond this point, It’s up to your imagination, how you can use that number. When I was a kid, we used to write programs […]

[GHX: 0.8.0066] This is the continuation of my scripting experiment within Grasshopper. Like minimum spanning tree algorithm, this is also a famous problem of computational geometry. I’m now coding faster and understanding the namespace easier in Grasshopper. This time, challenge was to implement Dijkstra’s algorithm of shortest paths. Again, it’s a quite useful algorithm, I even plan to use it in my current project. Although there is a faster alternative, Shortest Walk, I’m happy with this result. Like minimum spanning tree, this script also possibly contains bugs and miscalculations. E.g. in […]

This was a tough job for me to understand scripting in Grasshopper. After over a hundred hours of Rhinocommon and Grasshopper SDK studies, and lots of dead ends, I was finally able to tell Grasshopper to calculate minimum spanning tree of any given curve network. The problems of minimum spanning tree and shortest path in graphs are very interesting for me because of their clear logic and wide area of applications in design. However Grasshopper seems to be incapable of implementing such algorithms using it’s native components. I tried to […]

I tried different approaches to draw platonic solids using Grasshopper’s native components. However, it seems impossible now. In geometric definition, platonic solid is a set of points, distributed on a sphere with equal distances. If the set contains 12 points, then it’s an icosahedron. I found lots of information about these objects and mathematicians seem to love analyzing them. They created different approaches to build an icosahedron. One of them is very suitable to implement on Grasshopper’s VB component. They defined exact relative coordinates of each point. This was a […]