parametric realizations fall 2008

Entries from November 2008

final project _ initial script

November 20, 2008 · Leave a Comment

Call Main()
Sub Main()
Dim arrPlane, i, strCrv(), strInnerCrv(), strSrf(), strLftCrv, arrX, arrPt(), arrInnerPt(), counter
Dim strCrvv, strInnerCrvv, strLftCrvv, j, dblDist, arrTempPt, arrTempInnerPt
For i = 2 To 13
arrX = sin(i/15*3.14)*12
ReDim Preserve strCrv(i-2)
ReDim Preserve strInnerCrv(i-2)
ReDim Preserve strSrf(i-2)
arrPlane = Rhino.PlaneFromPoints (array(0,0,i), array(1,0,i), array(0,1,i))
strCrv(i-2) = Rhino.AddCircle (arrPlane, arrX)
strInnerCrv(i-2) = Rhino.AddCircle (arrPlane, arrX-1)
If i = 13 Then
Call Rhino.AddPlanarSrf (array(strCrv(i-2)))
Else
Call Rhino.AddLoftSrf (array(strCrv(i-2),strInnerCrv(i-2)))
End If
Next

Call Rhino.DeleteObjects (strCrv)
Call Rhino.DeleteObjects (strInnerCrv)
For j = -180 To 179 Step 30
counter = 0
For i = 1 To 14
arrX = sin(i/15*3.14)*12
ReDim Preserve arrPt(counter)
ReDim Preserve arrinnerPt(counter)
arrTempPt = Rhino.Polar (array(0,0,0), j, arrX)
arrPt(counter) = array(arrTempPt(0),arrTempPt(1),arrTempPt(2)+i)
arrTempInnerPt = Rhino.Polar (array(0,0,0), j, arrX-1)
arrinnerPt(counter) = array (arrTempInnerPt(0),arrTempInnerPt(1),arrTempInnerPt(2)+i)
counter = counter + 1
Next
strCrvv = Rhino.AddCurve (arrPt)
strinnerCrvv = Rhino.AddCurve (arrinnerPt)
strLftCrvv = Rhino.AddLoftSrf (array(strCrvv, strInnerCrvv))
Next
End Sub

Categories: Homework
Tagged:

parametric window tactile louvers (katie)

November 19, 2008 · Leave a Comment

2008_11_161Option Explicit
‘Script written by <insert name>
‘Script copyrighted by <insert company name>
‘Script version Monday, November 17, 2008 12:19:20 AM

Call Main()
Sub Main()
 Dim i, j, arrPt, arrPt2, strCrv, strPath, strSrf, strPoint, arrPoint
 Dim arrPoints : arrPoints = Rhino.Getobjects 
 Call Rhino.EnableRedraw (False)
 For Each strPoint In arrPoints
  arrPoint = Rhino.PointCoordinates (strPoint)
  For j = 1 To 10
   For i = -180 To 180 Step 45
    arrPt = Rhino.Polar (arrPoint, i, j,Rhino.WorldYZPlane)
    strCrv = Rhino.AddLine (arrPt, Array(arrPt(0)-j/2,arrPt(1),arrPt(2)))
    arrPt2 = Rhino.Polar (arrPoint, i+90, j/1.5,Rhino.WorldYZPlane)
    strPath = Rhino.AddLine (arrPoint,arrPt2)
    strSrf = Rhino.ExtrudeCurve (strCrv, strPath)
    Call Rhino.MoveObject (strSrf,Rhino.CurveMidPoint (strPath),Rhino.CurveStartPoint (strPath))
    Call Rhino.DeleteObject (strPath)
   Next
  Next
 Next
 Call Rhino.EnableRedraw (True)
End Sub

Categories: Homework
Tagged:

parametric lace_distanceBasedRecursion

November 17, 2008 · Leave a Comment

080731_layout_1 080731_layout_1

This rhinoscript subdivides triangular surfaces from multiple point attractors. There are two types of subdivision patterns which may be called; one derives from the mid points of each triangle, while the other divides from the quarter points. Both may be called at the sametime, or separately, within the function subdivideTriangle, the triangleLength for i & j may be adjusted for such calls.

Option Explicit
‘Script written by heath west & mark bearak
‘Script version 17 November 2008 13:57:37

Call distanceBasedRecursion()
Sub distanceBasedRecursion()

Dim triangle, fallOffDist, intPts
Dim j, k, strAttractor, strTriangle, arrPt, arrAttractor, testDistance, dblDistance, strCrv, arrCrvs, dblCrvLength, dblCurrentLength
Dim triangleLength, vertexPts, i, centerPt, triangleCrv, srfParam, srfNormal, arrTri, arrAttPt, arrCrvCnt, dblDist

Dim arrtriangle : arrtriangle = Rhino.GetObjects(“select the triangles”,8)
Dim arrStrAttractors : arrStrAttractors = Rhino.GetObjects (“select the points”,1)
Dim arrParameters: arrParameters = array(“Fall Off Distance”)
Dim arrValues: arrValues = array(“2″)
Dim arrResults: arrResults = Rhino.PropertyListBox(arrParameters, arrValues, “Distance Based Recursion” )

If IsArray(arrResults) Then
fallOffDist = arrResults(0)
End If

Call Rhino.enableredraw (False)
ReDim arrAttractors(UBound(arrStrAttractors ))
k=0

For Each strAttractor In arrStrAttractors
arrAttractors(k) = Rhino.PointCoordinates (strAttractor)
k=k+1
Next

For Each strTriangle In arrtriangle
arrPt = Rhino.SurfaceAreaCentroid (strTriangle)
arrCrvs    = Rhino.DuplicateSurfaceBorder (strTriangle)
dblCrvLength = 0

For j = 0 To Ubound(arrCrvs)
dblCurrentLength = Rhino.CurveLength (arrCrvs(j))
dblCrvLength = dblCrvLength + dblCurrentLength
Next

dblDistance = fallOffDist

For Each arrAttractor In arrAttractors
testDistance = Rhino.Distance (arrPt(0), arrAttractor)
If testDistance < dblDistance Then
dblDistance = testDistance
End If
Next

arrTri = Rhino.DuplicateSurfaceBorder (strTriangle)

For Each triangleCrv In arrTri
triangleLength = Rhino.CurveLength(triangleCrv)
arrAttPt = Rhino.PointCoordinates(arrStrAttractors(0))
arrCrvCnt = Rhino.CurveAreaCentroid (triangleCrv)
dblDist = Rhino.Distance (arrCrvCnt(0),arrAttPt)

If dblDistance < fallOffDist+0.1 Then
subdivideTriangle(strTriangle)
Else
End If
Next
Next
Rhino.EnableRedraw (True)
End Sub

Function subdivideTriangle(strTriangle)
Dim triangleLength, vertexPts, centerPt, triangleCrv, srfParam, srfNormal, arrTri, nMin, nMax, i, j, fallOffDist
arrTri = Rhino.DuplicateSurfaceBorder (strTriangle)

For Each triangleCrv In arrTri

Dim midpt0, midpt1, midpt2, midpt3, midpt4, midmid3, midmid4, quarterPt0, quarterPt1, quarterPt2, quarterPt3, quarterPt4
Dim triangle0, triangle1, triangle2, triangle3, triangle4, triangle5, triangle6, triangle7
triangleLength = Rhino.CurveLength(triangleCrv)
centerPt = Rhino.CurveAreaCentroid(triangleCrv)
srfParam = Rhino.SurfaceClosestPoint(strTriangle, centerPt(0))
srfNormal = Rhino.SurfaceNormal(strTriangle, srfParam)
vertexPts = Rhino.PolylineVertices(triangleCrv)

midPt0 = Array(((vertexPts(1)(0) + vertexPts(0)(0)))/2, ((vertexPts(1)(1) + vertexPts(0)(1)))/2, ((vertexPts(1)(2) + vertexPts(0)(2)))/2)
midPt1 = Array(((vertexPts(2)(0) + vertexPts(1)(0)))/2, ((vertexPts(2)(1) + vertexPts(1)(1)))/2, ((vertexPts(2)(2) + vertexPts(1)(2)))/2)
midPt2 = Array(((vertexPts(0)(0) + vertexPts(2)(0)))/2, ((vertexPts(0)(1) + vertexPts(2)(1)))/2, ((vertexPts(0)(2) + vertexPts(2)(2)))/2)

quarterPt0= Array((midPt0(0) + centerPt(0)(0))/2, (midPt0(1) + centerPt(0)(1))/2, (midPt0(2) + centerPt(0)(2))/2)
quarterPt1= Array((midPt1(0) + centerPt(0)(0))/2, (midPt1(1) + centerPt(0)(1))/2, (midPt1(2) + centerPt(0)(2))/2)
quarterPt2= Array((midPt2(0) + centerPt(0)(0))/2, (midPt2(1) + centerPt(0)(1))/2, (midPt2(2) + centerPt(0)(2))/2)

For i=0 To UBound(arrTri)
If (triangleLength > RandomNumber(2,3)) Then

triangle0 = Rhino.AddSrfPt(Array(vertexPts(0), quarterPt0, quarterPt2))
triangle1 = Rhino.AddSrfPt(Array(vertexPts(1), quarterPt1, quarterPt0))
triangle2 = Rhino.AddSrfPt(Array(vertexPts(2), quarterPt2, quarterPt1))
triangle3 = Rhino.AddSrfPt(Array(quarterPt0, quarterPt1, quarterPt2, quarterPt0))

subdivideTriangle triangle0
subdivideTriangle triangle1
subdivideTriangle triangle2
subdivideTriangle triangle3

Rhino.DeleteObjects(Array(strTriangle, triangleCrv))
End If
Next

For j=0 To UBound(arrTri)
If (triangleLength > RandomNumber(3,4)) Then

triangle4 = Rhino.AddSrfPt(Array(vertexPts(0), midPt0, midPt2))
triangle5 = Rhino.AddSrfPt(Array(vertexPts(1), midPt1, midPt0))
triangle6 = Rhino.AddSrfPt(Array(vertexPts(2), midPt2, midPt1))
triangle7 = Rhino.AddSrfPt(Array(midPt0, midPt1, midPt2, midPt0))

subdivideTriangle triangle4
subdivideTriangle triangle5
subdivideTriangle triangle6
subdivideTriangle triangle7′comment out this line to produce a sierpiński triangle

Rhino.DeleteObjects(Array(strTriangle, triangleCrv))
End If
Next
Next
End Function

Function RandomNumber(nMin, nMax)

RandomNumber = Null

If Not IsNumeric(nMin) Then Exit Function
If Not IsNumeric(nMax) Then Exit Function

If nMin >= nMax Then Exit Function
Randomize

RandomNumber = Int((nMax – nMin + 1) * Rnd + nMin)

End Function

Categories: Homework
Tagged:

Toad Stool by Adrian, Rika, Sonal

November 14, 2008 · Leave a Comment

 

stool1

Pseudo code

_input height

_adjust width (of base and top) according to height

_input number of sections

_loop depending on number of sections

_generate curves for sections

_generate surface from curves

_offset surface

_rotate sections around a point (angle based on number of sections)

_draw ellipse for seat based on width of top of sections

_make surface from ellipse, extrude

_get top profile of stool from rotated stool, use to cut notches in seat

_lay out for contour cut for mill

Categories: Homework
Tagged: , ,

Thad Nobuhara Project: Rings

November 13, 2008 · Leave a Comment

Proposal: To develop a set of rings

Shown

(1) Bone Spicule Ring, (2) Sphere, (3) Sticks, (4) Pipes

Not shown

(1) Topo rings (faceted landscape spanning four fingers), (2) Woven Ring, (3) Web Ring, (4) Abbreviated ‘T’ and ‘N’ ring set

Pseudo Code

_Generate boundary box for max ring dim

_Draw Construction lines

_Draw profile or unit (ex: spheres)

_sweep or project onto surface

_Boolean Finger Hole

Construction Method

_ 3D printed Plastic

ring-3_resized

sphere-ring_resized

sticks-ring_resized

pipes_resized

Categories: Homework
Tagged: , ,

final project _ initial idea

November 13, 2008 · Leave a Comment

I would like to make a mesh fabric light with cardboard. This mesh surface will be a layer of light filter to create random projections on the wall.

referecing image
scrap lights from graypants

Categories: Homework
Tagged:

foamy pictures

November 13, 2008 · Leave a Comment

We have done two partial tests in the CNC, equivalent to a beer for each one. Tested both transparency and endmills, we now have explored some fundamental parameters for the further development of the moke-up model for our modular (modular-parametric, parametric-modular) cealing. The built models made us realize the importance of the lines drawn by the mill, considering the fact that the surfaces can be defined by curves. We will take this fact into account when wrapping up the final script.  The two tests show a certain tendency to carve too thin sections in unexpected areas of the model, where the material easily breaks so that we will need to fix the minimum thickness for a propper transparency effect to be achieved.dsc_0198dsc_0209

Categories: Homework · I+A+S
Tagged: , ,

Final Project Description

November 13, 2008 · Leave a Comment

We would like to make furniture which has various heights and curvatures on its surface. Initiating with the idea that different height and curvature can make various function, parametrically generated furniture allows continuous but function-various surface. It can be used as table, chair or shelve in each part.

We start to think about the rib structure rather than continuous section cut in a sense that it takes more strength with less material. If the rib-structuring method lets better strength, it is also possible that we can use lighter material and, accordingly, a different machine which is easy to deal with.

*Referencing Images

#1 from SoftOfficeNYC

9 101

#2 from SoftOfficeNYC

41 5

#3 from Matthias Pliessni

matthias-pliessnig matthias-pliessnig2

Categories: I+A+S
Tagged: ,

Initial Script

November 12, 2008 · Leave a Comment

initial state

Script: initial state

Option Explicit
‘Script written by Adolfo Nadal, Ignacio Senra, Sergio Gomez
‘Script copyrighted by <insert company name>
‘Script version viernes, 07 de noviembre de 2008 11:26:37

Call Main()
Sub Main()
Dim i, j,k,l, strPt(),strtmpPt(),arrPt()
Dim Light, strLights, arrLights()
strLights = Rhino.GetObjects(“Lights”,1)
Dim thresholdDist
Dim testDist
Dim scalefactor

‘PROCESS INPUT POINTS SUCH AS LIGHT SOURCES
If IsNull (strLights) Then
Rhino.Print “light sources were required… creating n random sources”
Dim n : n = CInt(Ceil(arbitraryValue(1,4)))
Dim x,y,z
ReDim strLights(n-1)
ReDim arrLights(n-1)
For l = 0 To n-1
x = arbitraryValue(0,20)
y = arbitraryValue(0,13)
z = arbitraryValue(0,-2)
strLights(l)= Rhino.AddPoint(array(0.1*x,0.1*y,0.1*z))
arrLights(l)= array(0.1*x,0.1*y,0.1*z)
Next
Else
For k=0 To Ubound(strLights)
ReDim Preserve arrLights(k)
arrLights(k) = Rhino.PointCoordinates(strLights(k))
Next
End If

‘CREATE LAYERS
AddLayers
Rhino.ObjectLayer strLights,”Lights”
Rhino.EnableRedraw False

‘CREATE POINT GRID FOR CIRCLES
Rhino.CurrentLayer(“Points”)
Dim arrPlane, arrCircles(),arrtmpCircles(), arrCloseLight,dblLength
For i= 0 To 20
thresholdDist = 10
For j = 0 To 13
ReDim Preserve arrtmpPt(j)
arrtmpPt(j) = array(0.1*i,0.1*j,0)
For Each Light In arrLights
testDist = Rhino.Distance (arrtmpPt(j), Light)
If testDist < thresholdDist Then
thresholdDist = testDist
arrCloseLight = Light
End If
‘IF THE SCALE FACTOR IS LOCATED HERE, A MORE UNIFORM PATTERN OCCURS
’scalefactor = (1/(100*(dblLength)))
Next
dblLength = Rhino.Distance(arrCloseLight,arrtmpPt(j))
‘IF THE SCALE FACTOR HAPPENS TO BE CALCULATED HERE, MORE GRADUAL RESULTS WILL HAPEN
scalefactor = 2*(1/(100*(dblLength)))
If dblLength = thresholdDist Then
Rhino.Print “they are the same” & i & ” ” & j & ” “
End If
If dblLength = testDist Then
Rhino.Print “they are the same…2…” & i & ” ” & j & ” “
End If
arrPlane = Rhino.PlaneFromFrame(arrtmpPt(j),array(0.1*i+1,0.1*j,0),array(0.1*i,0.1*j+1,0))
ReDim Preserve arrtmpCircles(j) : arrtmpCircles(j)=Rhino.AddCircle(arrPlane,scalefactor)
Next
ReDim Preserve arrPt(i)
arrPt(i) = arrtmpPt
‘ReDim Preserve strPt(i)
’strPt(i) = Rhino.AddPoints(arrPt(i))
ReDim Preserve arrCircles(i)
arrCircles(i) = arrtmpCircles
Next

‘WE NEED TO CONVERT THE NESTED ARRAY arrCircles INTO A 1-DIMENSIONAL ARRAY
Dim counter, p, m, arrCirclesIntersection()
counter = 0
For p = 0 To Ubound(arrCircles)
For m = 0 To Ubound(arrCircles(l))
ReDim Preserve arrCirclesIntersection(counter)
arrCirclesIntersection(counter) = arrCircles(p)(m)
counter = counter +1
Next
Next

‘NOW WE CAN PASS THE DATA TO THE FUNCTION
MultipleDifferences arrCirclesIntersection

‘FINALIZE SCRIPT AND WRAP-UP
Rhino.CurrentLayer(“Script”)
Rhino.Print “Done”
Rhino.EnableRedraw True

End Sub

Function arbitraryValue(min, max)
Randomize
arbitraryValue = Int((max – min + 1) * Rnd + min)
End Function

Function AddLayers
If Not IsLayer(“Script”) Then
Rhino.AddLayer “Script”,RGB(0, 0, 0),True,False
End If

If Not IsLayer(“Lights”) Then
Rhino.AddLayer “Lights”,RGB(128, 0, 128),True,False,”Script”
Rhino.LayerLinetype “Polylines”, “Continuous”
End If

If Not IsLayer(“Points”) Then
Rhino.AddLayer “Points”,RGB(0, 0, 0),True,False,”Script”
Rhino.LayerLinetype “Polylines”, “Continuous”
End If
End Function

Function MultipleDifferences(strCrvs)

Rhino.Print “calculating intersection for ” & CStr(Ubound(strCrvs)^2) & ” curves. Please wait…”
Dim strCrv1, strCrv2, strCrvresult
Dim i, j
For i=0 To Ubound(strCrvs)
strCrv1=strCrvs(i)
For j=0 To Ubound(strCrvs)
strCrv2=strCrvs(j)
strCrvresult = Rhino.CurveBooleanDifference (strCrv1,strCrv2)
If Not IsNull(strCrvresult) Then
strCrv1 = strCrvresult(0)
‘ERASE ALL INBETWEEN STEPS IN THE CALCULATION OF SUCCESIVE DIFFERENCES
If j < Ubound(strCrvs) And i <> Ubound(strCrvs) Then
Rhino.HideObjects strCrvresult
Else
‘FOR THE LAST CURVE IT WORKS DIFFERENTLY
If i=Ubound(strCrvs) Then
If j<Ubound(strCrvs)-1 Then
Rhino.HideObjects strCrvresult
End If
End If
End If
End If
If j Mod 50 = 0 And i Mod 40= 0 And i>0 Then
Rhino.Print (i/Ubound(strCrvs)) & “% completed”
End If
Next
Rhino.EnableRedraw True
Rhino.EnableRedraw False
Next
Rhino.Print “completed”
Rhino.DeleteObjects strCrvs

End Function

Categories: Homework · I+A+S
Tagged:

material prototype

November 12, 2008 · Leave a Comment

Categories: Homework
Tagged: