Call them what you will, but there’s been a huge hype about them some time ago.
Grasshopper’s scripting capabilites are now a huge super cool feature, especially if you’re coding in visual studio (c#) and then pasting the shit or making dlls. I did this some time ago when i suddenly realized that you can declare your own static variables inside scripting nodes (and these guys hold up their values during the updating procedure). And the vector math is already there too.
Now, if somebody will be nice and implement some collision detection…
PS: I will upload the def. soonish (i have to clean it up a bit first). Ok i didn’t clean it up; here’s the link.
Here’s a new 10 day link: http://dl.transfer.ro/boidsT-Transfer_RO-16Nov-ad56f6.zip
Final link, stable and sound: http://improved.ro/Grasshopper/boidsTCAV.zip
I have been (re)invited to teach at the upcoming Parametric Design Workshop that’s going to take place at the HTWK Leipzig.
The line-up includes:
I’m on the speaker list at the Rule Based Design Symposium at the TU Berlin. Thank you Christophe for the invite!
(27.05.09) The Symposium takes place at 18:00 in the Geodätenstand 6 O.G. TU Berlin Hauptgebäude, Straße des 17. Juni 135, 10623 Berlin.
The Rule Based Design Symposium highlights contemporary academic and practice based research employing CAD, CAM, Coding/Web tools in addressing & communicating architectural design intents & constraints. The research spectrum ranges from theory to the digital crafting of buildings and their components.
Organized by Christophe Barlieb.
Flexibility in thought and expression is vital to all creative fields. The power of a new generation of parametric and bespoke CAD tools lies in the ability to negotiate and communicating the design intent clearly. This streamlining saves time, materials while integrating architecture, engineering and fabrication over the course of the entire architectural design process.
The symposium features research works by young contemporary academics in the fields of mathematics, architecture and fabrication
Time Speaker Affiliation Theme
18:00 Gisela Baurmann TU Berlin RBD Opening Statements
18:05 Kristoffer Josefsson TU Berlin Mathematics in Architecture
18:25 Dimitrie Stefanescu U.Bucharest Scripting Architecture
18:45 Christophe Barlieb TU Berlin Integration of Engineering & Design
19:05 Norbert Palz CITA Rapid Prototyping in Architecture
19:25 Martin Tamke CITA Fabrication of Architecture
19:45 Baurmann, Barlieb, Pfeiffer TU Berlin Discussion with Speakers & Public
More as a scripting experiment, when i was mucking about trying to make the delaunay triangulation work in grasshopper i somehow found the wonderfully complex qhull library which i promptly set to push and pull to get it to work with grasshopper. As advised on their website, the best way to do it is to call it as an external program, which is exactly what i’ve done: no files are written or read, no dos windows pop up, everything’s smooth.
Given that you don’t have many complex operations in grasshopper after the solution is generated, you’ll be able to handle quite an impressive amount of points (say 200 on my three-year old toplap) in real time. If you add the simple planarSrf operation, then say 60-70 and it gets sloppy.
What you’ll need to do to get things rolling:
0. Download the 3dvqhull definition and example file, and remember not to use it for commercial purposes, share-alike whatever you do with it and take the time to give the proper credits:
1. Download qhull, and unzip it in a folder of your choice.
2. Get going and search for “System.dll”. What you’re interested in is the 2.0 version which you’ll usually find in here: “C:\WINDOWS\Microsoft.NET\Framework\v2.0.5[...]\”. If you can’t find it, I’m amazed grasshopper works for you. Anyway, you can find and install it from here.
If it turns orange, it’s cool.
4. Write in the panel that is linked to the “path” input the full path to the qhull program qvoronoi. You don’t need to add the .exe extension, but you can do it if you feel confortable.
5. There’s just one more thing you should know: facets that contain the infinite vertex are omitted altogether, without remorse. So as to have as little facets tending towards infinitum, I always add the corners of the points bounding box to the input sites.
You can scale the bounding box in respect with its center, or you can just call the whole thing off – it’s your choice.
I think this just about covers everything. Take care and have fun.
PS: Qhull does more than voronoi. So if you have the time to explore and test, please do – the package is very powerfull and it can be used for more than this.
Works with quite anything (initially deisgned for surfaces).
Have fun with it. I still didn’t have the time to put this to a proper, nicely rendered use and it’s been almost a month now since it’s finished. Quite fustrating.
SPRscrpts is coming (with documentation). It brings to your Rhino 4 SuperShapes, SphericalHarmonics, SuperTori and Shells. Below is an illustration of what it can do (that’s the shell script at work).
Wanna be more inventive than Liebeskind, Ghery or Zaha?
Well, you easily can.
The following will generate quite a few possible shapes, some of which will surely look better than this.
‘Script written by didi stefanescu
‘Released under the Creative Commons Attribution-Noncommercial-Share Alike 3.0
”CHANGE THE RESOLUTION/DETAIL LEVEL BELOW ”
”BUT BEAR IN MIND THAT 128 IS QUITE HIGH ”
”SO IF YOU’RE ON A SLOWER COMPUTER YOU WOULD ”
”LIKE TO USE SOMETHING LIKE res = 64 ”
Dim res : res = 128
Dim PI : PI = Rhino.Pi()
Dim du, dv
Dim m0, m1, m2, m3, m4, m5, m6, m7
Dim colors : colors = True
du = PI * 2 / res
dv = PI / res
arrVertices = createVertices()
arrFaces = createFaces()
MESH = Rhino.AddMesh(arrVertices,arrFaces)
”CHANGE THESE PARAMETERS TO WHATEVER YOU LIKE”
”AS LONG AS THEY STAY INTEGERS ”
m0 = 4 : m1 = 1 : m2 = 5 : m3 = 2
m4 = 2 : m5 = 1 : m6 = 4 : m7 = 5
Dim u, v, i, j
Dim k : k = -1
For i = 0 To res Step 1
u = i * du
For j = 0 To res Step 1
k = k + 1
v = j * dv
ReDim Preserve arrVert(k)
arrVert(k) = sphHarmonics(u, v)
createVertices = arrVert
Dim i, j
Dim k : k = -1
For i = 0 To res – 1 Step 1
For j = 0 To res – 1 Step 1
k = k + 1
ReDim Preserve ArrF(k)
base = i * (res + 1) + j
arrF(k) = Array(base, base + 1, base + res + 2, base + res + 1)
createFaces = arrF
Function sphHarmonics(ByVal th, ByVal phi)
Dim r, x, y, z
r = sin(m0 * phi) ^ m1 + cos(m2 * th) ^ m3 + sin(m4 * phi) ^ m5 + cos(m6 * th) ^ m7
x = r * sin(phi) * cos(th)
y = r * cos(phi)
z = r * sin(phi) * sin(th)
sphHarmonics = Array(x, y, z)
Function colorMe(ByVal obj2Color)
Dim vert : vert = Rhino.MeshVertices(obj2Color)
Dim face : face = Rhino.MeshFaceVertices(obj2Color)
Dim color() : ReDim color(Ubound(vert))
Dim i, tempV
For i = 0 To Ubound(vert) Step 1
tempV = vert(i)
color(i) = RGB(abs(tempV(0)*200), abs(tempV(1)*200), abs(tempV(2)*100))
Call Rhino.AddMesh(vert, face, , , color)