Final Board, Script and Images, Diego Urrego, Mazdak Jafarian, Shadi Sajjad

Call Main()
Sub Main()
Dim k,l,u,v, strPt, arrPt, dblRnd, BBox, dblMaxHt, dblDif, strSrf
Dim arrSrfs : arrSrfs = Rhino.getobjects (“Select surface”)

Dim dblPer : dblPer = Rhino.GetReal (“Select your percentage”,0.85,,1)
Call Rhino.EnableRedraw (False)

For Each strSrf In arrSrfs

BBox = Rhino.BoundingBox (strSrf)
dblMaxHt = BBox(4)(2)-BBox(0)(2)
dblDif = dblPer * dblMaxHt
Dim intU : intU = 50

Dim intV : intV = 25

ReDim arrFrame(intU,intV)
ReDim arrPtNor(intU,intV)
ReDim arrPtNora(intU,intV)
ReDim arrPtFlip(intU,intV)
ReDim arrPtFlipa(intU,intV)
ReDim arrSrf(intU)
Dim UDomain : UDomain = Rhino.SurfaceDomain(strSrf, 0)
Dim VDomain : VDomain = Rhino.SurfaceDomain(strSrf, 1)
Dim UStep : UStep = (UDomain(1) – UDomain(0)) / intU
Dim VStep : VStep = (VDomain(1) – VDomain(0)) / intV

For l = 1 To intV-1
For k = 1 To intU-1

u = UDomain(0) + UStep * k
v = VDomain(0) + vStep * l
arrFrame(k,l) = Rhino.SurfaceFrame (strSrf, Array(U,V))
strPt = Rhino.AddPoint (arrFrame(k,l)(0))
arrPt = Rhino.PointCoordinates (strPt)
dblRnd = Random(arrPt(2),(dblMaxHt+BBox(0)(2)))
If dblRnd < (dblDif+BBox(0)(2)) Then
Call Rhino.DeleteObject (strPt)

Else
Call Rhino.AddCircle3Pt
(array(arrPt(0)+(1/16),arrPt(

1),arrPt(2)),
array(arrPt(0),arrPt(1)+(1/16),arrPt(2)),
array(arrPt(0)-(1/16),arrPt(1),arrPt(2)))
End If
Next Next
Next
Call Rhino.EnableRedraw (True)
End SubFunction Random(Min,Max)
Random = (Max-Min)*Rnd+Min
End Function


Advertisements

Man-kei Sham, Zheng-dong Qi’s distnace panels

ms3971b

Option Explicit
‘Script written by ms3971, zq2111
‘Script copyrighted by
‘Script version Saturday, December 12, 2009 6:23:58 PM

Call Main()
Sub Main()
Dim i,j,k, strAttractor, arrAttractor, testDistance, dblDistance
Dim arrStrAttractors : arrStrAttractors = Rhino.GetObjects (“Select points”,1)
ReDim arrAttractors(UBound(arrStrAttractors ))
Dim d : d = Rhino.GetInteger (“max distance of falloff?”, 5)
k=0
For Each strAttractor In arrStrAttractors
arrAttractors(k) = Rhino.pointcoordinates (strAttractor)
k=k+1
Next
For i = 1 To 17 Step 1
For j = 1 To 11 Step 1
dblDistance = d
For Each arrAttractor In arrAttractors
testDistance = Rhino.Distance (array(i,j,0), arrAttractor)
If testDistance < dblDistance Then
dblDistance = testDistance
End If
Next
Dim line1 ,line2,line3,line4,curve1,curve2,curve3,curve4, square
Dim x:x = dblDistance/11
'Call rhino.AddPoint (array (i,j,0))

line1 = rhino.Addline (array(i-1+x,j-1),array(i-x,j-1))
line2 = rhino.addline (array(i,j-1+x),array(i,j-x))
line3 = rhino.AddLine (array(i-x,j),array(i-1+x,j))
line4 = rhino.addline (array(i-1,j-x),array(i-1,j-1+x))
curve1 = rhino.AddFilletcurve (line2,line1,x)
curve2 = rhino.AddFilletcurve (line3,line2,x)
curve3 = rhino.addfilletcurve (line4,line3,x)
curve4 = rhino.AddFilletcurve (line1,line4,x)
square = rhino.JoinCurves(array(line2,curve1,line1,curve4,line4,curve3,line3,curve2))
Call rhino.DeleteObjects (array(line1,line2,line3,line4,curve1,curve2,curve3,curve4))
'If testDistance < 1 Then
'Call rhino.DeleteObjects (square)
'End If
If dblDistance < d Then
Call Rhino.ScaleObject (square(0), array(i,j,0),array(dblDistance*0.2,dblDistance*0.2,dblDistance*0.2))
End If
Call Rhino.RotateObject(square(0),array(i,j,0), testDistance*30)
Call cpscro(square(0))
Next
Next

End Sub

Function cpscro(strObject)
Dim l, arrNewSq, arrCntCrv
For l = 1 To 6
arrNewSq = Rhino.CopyObject (strObject,array(0,0,0),array(0,12*l,0))
arrCntCrv = Rhino.CurveAreaCentroid (arrNewSq)
Call Rhino.RotateObject (arrNewSq, arrCntCrv(0),l*10)
Call Rhino.ScaleObject (arrNewSq,arrCntCrv(0),array(1-l*0.1,1-l*0.1,1-l*0.1))
Next
End Function

script

Option Explicit
‘Script written by <Aren Bogossian-Mark Bearak>
‘Script copyrighted by <Parametric Realizations>
‘Script version Wednesday, December 02, 2009 9:50:02 PM

Call Main()
Sub Main()
 Dim k,l,u,v, arrParam, arrNormal, arrNewPt
 Dim strSrf : strSrf = Rhino.getobject (“select surface”)
 Dim intU : intU = 12
 Dim intV : intV = 24
 ReDim arrFrame(intU,intV)
 ReDim arrPtNor(intU,intV)
 ReDim arrPtFlip(intU,intV), x(intU,intV), arrnewobject(intU,intV)
 ReDim arrMP(intU,intV)
 Dim UDomain : UDomain = Rhino.SurfaceDomain(strSrf, 0)
 Dim VDomain : VDomain = Rhino.SurfaceDomain(strSrf, 1)
 Dim UStep : UStep = (UDomain(1) – UDomain(0)) / intU
 Dim VStep : VStep = (VDomain(1) – VDomain(0)) / intV
 For l = 0 To intV
  For k = 0 To intU
   u = UDomain(0) + UStep * k
   v = VDomain(0) + vStep * l
   arrFrame(k,l) = Rhino.SurfaceFrame (strSrf, Array(U,V))
   arrParam = Rhino.SurfaceClosestPoint(strSrf, arrFrame(k,l)(0))
   arrNormal = Rhino.SurfaceNormal(strSrf, arrParam)
   arrPtNor(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*0.5,arrFrame(k,l)(0)(1)+arrNormal(1)*0.5,arrFrame(k,l)(0)(2)+arrNormal(2)*0.5)
   arrPtFlip(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*-0.5,arrFrame(k,l)(0)(1)+arrNormal(1)*-0.5,arrFrame(k,l)(0)(2)+arrNormal(2)*-0.5)
   ‘Call Rhino.AddPoint (arrFrame(k,l)(0))
   ‘Call Rhino.AddPoint (arrPtNor(k,l))
   ‘Call Rhino.AddPoint (arrPtFlip(k,l))
   If l>2 And (l Mod 3 = 0) Then
    x(k,l) =  Rhino.AddPolyline (array(arrFrame(k,l)(0),arrPtNor(k,l-1),arrPtNor(k,l-2),arrFrame(k,l-3)(0),arrPtFlip(k,l-2),arrPtFlip(k,l-1),arrFrame(k,l)(0)))
    
   End If
  Next
 Next
End Sub

———–

Option Explicit
‘Script written by <Aren Bogossian>
‘Script copyrighted by <Aren Bogossian>
‘Script version Wednesday, December 02, 2009 10:08:10 PM

Call Main()

Sub Main()
 
 Dim arrObjects, arrMP, i
 

 arrObjects = Rhino.GetObjects(“Select curves to offset”)

 If IsArray(arrObjects) Then
 
  For i = 0 To UBound(arrObjects)
   
  
   arrMP = Rhino.CurveAreaCentroid(arrObjects(i))
   
   If IsArray(arrMP) Then
    
    Dim arrNewobject
    
    arrNewobject = Rhino.OffsetCurve(arrObjects(i), arrMP(0), 0.1, ,2)
  
    Rhino.ObjectLayer arrNewobject,”offset”

   End If
 
  Next

 End If
 
End Sub

———————-

Option Explicit
‘Script written by <insert name>
‘Script copyrighted by <insert company name>
‘Script version Monday, December 2, 2009 7:00:42 PM

Call Main()
Sub Main()
 Dim k,l,u,v, arrParam, arrNormal, arrNewPt
 Dim strSrf : strSrf = Rhino.getobject (“Select surface”)
 Dim intU : intU = 8
 Dim intV : intV = 48
 ReDim arrFrame(intU,intV)
 ReDim arrPtNor(intU,intV)
 ReDim arrPtNora(intU,intV)
 ReDim arrPtFlip(intU,intV)
 ReDim arrPtFlipa(intU,intV)
 ReDim arrSrf(intU)
 Dim UDomain : UDomain = Rhino.SurfaceDomain(strSrf, 0)
 Dim VDomain : VDomain = Rhino.SurfaceDomain(strSrf, 1)
 Dim UStep : UStep = (UDomain(1) – UDomain(0)) / intU
 Dim VStep : VStep = (VDomain(1) – VDomain(0)) / intV
 For l = 0 To intV
  For k = 0 To intU
   u = UDomain(0) + UStep * k
   v = VDomain(0) + vStep * l
   arrFrame(k,l) = Rhino.SurfaceFrame (strSrf, Array(U,V))
   arrParam = Rhino.SurfaceClosestPoint(strSrf, arrFrame(k,l)(0))
   arrNormal = Rhino.SurfaceNormal(strSrf, arrParam)
   arrPtNor(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*0.5,arrFrame(k,l)(0)(1)+arrNormal(1)*0.5,arrFrame(k,l)(0)(2)+arrNormal(2)*0.5)
   arrPtNora(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*0.25,arrFrame(k,l)(0)(1)+arrNormal(1)*0.25,arrFrame(k,l)(0)(2)+arrNormal(2)*0.25)
   arrPtFlip(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*-0.5,arrFrame(k,l)(0)(1)+arrNormal(1)*-0.5,arrFrame(k,l)(0)(2)+arrNormal(2)*-0.5)
   arrPtFlipa(k,l) = array(arrFrame(k,l)(0)(0)+arrNormal(0)*-0.25,arrFrame(k,l)(0)(1)+arrNormal(1)*-0.25,arrFrame(k,l)(0)(2)+arrNormal(2)*-0.25)
   ’Call Rhino.AddPoint (arrFrame(k,l)(0))
   ’Call Rhino.AddPoint (arrPtNor(k,l))
   ’Call Rhino.AddPoint (arrPtFlip(k,l))
   If l>5 And (l Mod 6 = 0) Then
    If k Mod 2 = 0 Then
     arrSrf(k) = Rhino.AddPolyline (array(arrFrame(k,l)(0),arrPtNor(k,l-2),arrPtNor(k,l-4),arrFrame(k,l-6)(0),arrPtFlip(k,l-4),arrPtFlip(k,l-2),arrFrame(k,l)(0)))
    Else
     arrSrf(k) = Rhino.AddPolyline (array(arrFrame(k,l-2)(0),arrPtNora(k,l-3),arrPtNora(k,l-4),arrFrame(k,l-5)(0),arrPtFlipa(k,l-4),arrPtFlipa(k,l-3),arrFrame(k,l-2)(0)))
    End If
    If k>1 And (k Mod 2 = 0) Then
     Call Rhino.AddLoftSrf (array(arrSrf(k),arrSrf(k-1),arrSrf(k-2)),,,2)
    End If
   End If
  Next
 Next
End Sub

model

Final Board

final images//

Option Explicit
‘Script written by maurizio, biayna, farzam
‘Script copyrighted by architecture.collective
‘Script version Wednesday, December 17, 2009 9:28:25 AM

Call Main()
Sub Main()
 Dim strObject : strObject = Rhino.GetObject (“Select your surface”,8)
 Dim arrPt : arrPt = Rhino.GetPoint (“Select your attractor”)
 Dim counter : counter = 0
 Call MakePyramid(strObject,arrPt,counter)
End Sub

Function MakePyramid(strObject,arrPt,counter)
 Dim arrCrvs, i, j, dblTempDist, strClSrf, dblScale
 Dim dblDist : dblDist = 10000
 Dim nLow : nLow = 0.5
 Dim nhigh : nHigh = 2
 Dim intRnd : intRnd = RandomHeight (nLow,nHigh)
 ‘Call Rhino.Print (intRnd)
 Dim strCrv, arrPta, arrParam, arrNormal, arrNewPt, arrPLVs
 ReDim strsrf(2)
 ReDim arrCntPt(2)
 strCrv = Rhino.DuplicateSurfaceBorder (strObject)
 arrPLVs = Rhino.PolylineVertices (strCrv(0))
 arrPta = Rhino.CurveAreaCentroid (strCrv)
 arrParam = Rhino.SurfaceClosestPoint(strObject, arrPta(0))
 arrNormal = Rhino.SurfaceNormal(strObject, arrParam)
 arrNewPt = array(arrPta(0)(0)+arrNormal(0)*intRnd,arrPta(0)(1)+arrNormal(1)*intRnd,arrPta(0)(2)+arrNormal(2)*intRnd)
 strSrf(0) = Rhino.AddSrfPt (array(arrPLVs(0),arrPLVs(1),arrNewPt))
 strSrf(1) = Rhino.AddSrfPt (array(arrPLVs(1),arrPLVs(2),arrNewPt))
 strSrf(2) = Rhino.AddSrfPt (array(arrPLVs(2),arrPLVs(0),arrNewPt))
 Call Rhino.DeleteObject (strObject)
 Call Rhino.DeleteObject (strCrv(0))
 For i = 0 To UBound(strSrf)
  arrCrvs = Rhino.DuplicateSurfaceBorder(strSrf(i))
  arrCntPt(i) = Rhino.CurveAreaCentroid(arrCrvs(0))
  counter = counter + 1
  Call Rhino.AddTextdot (counter,arrCntPt(i)(0))
  dblScale = arrCntPt(i)(0)(2)
  dblScale = dblScale / 2
  If dblScale > 0.9 Then dblScale = 0.9
  If dblScale > 0 Then
   Call Rhino.ScaleObject (arrCrvs(0),arrCntPt(i)(0),array(dblScale,dblScale,dblScale))
  End If
  ‘Call Rhino.DeleteObject (arrCrvs(0))
 Next
 
 For j = 0 To UBound(arrCntPt)
  dblTempDist = Rhino.Distance (arrCntPt(j)(0),arrPt)
  If dblTempDist < dblDist Then
   dblDist = DblTempDist
   strClSrf = strSrf(j)
  End If
 Next

 If dblDist > 1 Then
  Call MakePyramid(strClSrf, arrPt,counter)
 End If
 
End Function

Function RandomHeight(Min,Max)
 RandomHeight = (Max-Min)*Rnd+Min
End Function

[final board] jeong min, seo-hong, dong cheol

installation board_121709_final_FINAL