Showing posts with label codeMonkey. Show all posts
Showing posts with label codeMonkey. Show all posts

January 30, 2009

just finished - Dubai Competition_#02

1

1

after half a year's running
finally we finished the Dubai Competition
from design, scripting, modeling, to rendering and layout
here's some shot of the layout
i've no idea if there will come any result for the competition it's self
opposite with more than 4000 competitor
but really
i got a lot in the progress

January 5, 2009

happY neW yeaR ! - a basic rhino script tutorial - with code & files

hey every body
happy new year to all


it's a script with fuction :
"isPointInSurfaces(arrStrObject, arrPoint)"
"randRange(min, max)"
the aim is generate random position points in a certain cage made of several closed polysurfaces

here's the video tutorial:



here's the code:

Option Explicit
'Script written by popabczhang
'Script copyrighted by popabczhang
'Script version 2008-12-31 17:34:50

Dim i,j
Dim xx:xx=0
Dim yy:yy=1
Dim zz:zz=2

Call happYneWyeaR()

Sub happYneWyeaR()
Dim i
Dim arrTmpPt(2)

Dim arrPts()
i=0
Do While i <= 2999

Randomize
arrTmpPt(xx) = randRange(0,700*100)/100
arrTmpPt(yy) = randRange(0,90*100)/100
arrTmpPt(zz) = randRange(0,1*100)/100
If isPointInSurfaces(Rhino.ObjectsByName("cage"),arrTmpPt) Then
ReDim Preserve arrPts(i)
arrPts(i) = arrTmpPt
rhino.AddPoint arrTmpPt
rhino.Print "point(" & i & ")"

i = i+1
End If
Loop
End Sub

Function isPointInSurfaces(arrStrObject, arrPoint)
Dim blnTemp:blnTemp = False
For i = 0 To UBound(arrStrObject)
If Rhino.IsPointInSurface(arrStrObject(i), arrPoint) Then
blnTemp = True
End If
Next
isPointInSurfaces = blnTemp
End Function

Function randRange(min, max)
Randomize
randRange = min+rhino.Floor(Rnd*(max-min))
End Function

here's the files ( 3dm & rvb ) :
http://popabczhang.googlepages.com/happY_neW_yeaR.zip

December 24, 2008

Grasshopper - Rhino Scripting - Dubai competition_#01

this is about another project i'm doing now
Dubai '08 - ThyssenKrupp Elevator Architecture Award
i do it with my professor of TongJi University and another friend together
the project is located in the center park of Dubai main city
and actually it's mainly a structure but not a volumed building
to make it special with others
we decide to use a special kind of structure called "
Tensegrity" to transparent it
and it should collect the most amount of solar energy
at the same time avoid the wind loads and free the space as much as possible
so with these conditions, what will it look like? you will know very soon
of cause this time i'll make it in Rhino and Grasshopper to generate the whole
complicated system
but very soon i start to realize that Grasshopper can not deal
with the Multi-in-multi operations but only Multi-to-multi methods
for example, you can not generate 3 curves from 3 group of points
by only 1 grasshopper operator
but it can be easily treated as stream control in Rhino Scripting
such as "For...Next" or "Do ... Loop"
so, both Grasshopper and Rhino Scripting is necessary
Grasshopper is for visualized or geometric operations
and Rhino Scripting for Multi relationships system
like control points (big amount) position generation


anyway it's still on the way
here are some trying and progress for this project:

080804 - 080816:
still scripting in Flash, output Rhino Macros commands to modeling
getting ready to generate random position, random size, random noised shapes












081130 - 081214:
discussed a lot and the main concept principally decided
grasshopper and rhino scripting to approach the goal










and there are a lot of problem interesting issue i met
during the progress
we can talk about it later separately

November 22, 2008

something

some unexpected products during work and some rhino scripting trying:

- ball series

actually they a some essential elements for boolean during my grasshopper work on a real project(later i'll introduce), quite strange, ehn?

- rhino script named Voronoi (by Gabe Smedresman 2005)

it can seprate a solid to cells according center points, actually it's a series of boolean when you run it. anyway, interesting scripting. have fun!