Jun
29

3D - Pixelate

render2

This is a script that pixelates point clouds into a user-defined 3-dimensional grid. It also arrays same size boxes to the pixelated points. If used wisely, it could become a good tool to rationalize a nurb surface into many small boxes.

pixelate

It first pixelates the points into a wanted grid. Naturally, the geometry starts to lose its shape as the pixelating factor grows.

render

Then it populates the points with a box that you define.

—–

Option Explicit

‘Script written by Howard Jiho Kim / crtl-i.com

Sub Pixelate

Dim strObject, arrPoint, arrObjects, box_pt(7), box

arrObjects = Rhino.GetObjects(”Select points to pixelate”)

Dim multiplier_x, m1_x, m2_x, finalHeight_x, arrEnd(2)

multiplier_x = Rhino.GetReal(”Enter Pixelating Factor for X axis (0 for Non-Pixelation): “)

Dim multiplier_y, m1_y, m2_y, finalHeight_y

multiplier_y = Rhino.GetReal(”Enter Pixelating Factor for Y axis (0 for Non-Pixelation): “)

Dim multiplier_z, m1_z, m2_z, finalHeight_z

multiplier_z = Rhino.GetReal(”Enter Pixelating Factor for Z axis (0 for Non-Pixelation): “)

Dim box_yn

box_yn = Rhino.GetInteger(”Create boxes? (1-Yes, 2-No)”)

If box_yn = 1 Then

Dim box_x, box_y, box_z, box_mid_pt(2)

box_x = Rhino.GetReal(”Enter Box size-x: “)

box_y = Rhino.GetReal(”Enter Box size-y: “)

box_z = Rhino.GetReal(”Enter Box size-z: “)

box_pt(0) = Array(0,0,0)

box_pt(1) = Array(box_x,0,0)

box_pt(2) = Array(box_x,box_y,0)

box_pt(3) = Array(0,box_y,0)

box_pt(4) = Array(0,0,box_z)

box_pt(5) = Array(box_x,0,box_z)

box_pt(6) = Array(box_x,box_y,box_z)

box_pt(7) = Array(0,box_y,box_z)

box_mid_pt(0) = box_x/2

box_mid_pt(1) = box_y/2

box_mid_pt(2) = box_z/2

box = Rhino.AddBox(box_pt)

End If

If Not IsNull(arrObjects) Then

For Each strObject In arrObjects

arrPoint=Rhino.PointCoordinates(strObject)

Rhino.Print Rhino.Pt2Str(arrPoint, 3)

If multiplier_x > 0 Then

m1_x = arrPoint(0) / multiplier_x

m1_x = Rhino.Floor(m1_x)

m2_x = (arrPoint(0) - (m1_x*multiplier_x))*2

If m2_x > multiplier_x Then m1_x = m1_x+1

finalHeight_x = m1_x * multiplier_x

arrEnd(0) = finalHeight_x

ElseIf multiplier_x=0 Then

arrEnd(0) = arrPoint(0)

End If

If multiplier_y > 0 Then

m1_y = arrPoint(1) / multiplier_y

m1_y = Rhino.Floor(m1_y)

m2_y = (arrPoint(1) - (m1_y*multiplier_y))*2

If m2_y > multiplier_y Then m1_y = m1_y+1

finalHeight_y = m1_y * multiplier_y

arrEnd(1) = finalHeight_y

ElseIf multiplier_y=0 Then

arrEnd(1) = arrPoint(1)

End If

If multiplier_z > 0 Then

m1_z = arrPoint(2) / multiplier_z

m1_z = Rhino.Floor(m1_z)

m2_z = (arrPoint(2) - (m1_z*multiplier_z))*2

If m2_z > multiplier_z Then m1_z = m1_z+1

finalHeight_z = m1_z * multiplier_z

arrEnd(2) = finalHeight_z

ElseIf multiplier_z=0 Then

arrEnd(2) = arrPoint(2)

End If

Rhino.MoveObject strObject, arrPoint, arrEnd

If box_yn = 1 Then

Rhino.CopyObject box, box_mid_pt, arrEnd

End If

Next

If box_yn = 1 Then

Rhino.DeleteObject box

End If

End If

End Sub

Pixelate

Jun
26

Update on Erdos

It’s been a while. Here are some updates on the Erdos Museum.

081209_3

img_8678

_mg_8591

Photos by Shang Li

Feb
22

a new page: scripts

untitled-1

So finally, there’s a new page for the scripts :)

Feb
16

Diffuse Curve

This is a RhinoScript that I wrote about a few months ago in: http://crtl-i.com/blog/2008/12/diffuse-noise/

It will take a curve and diffuse it into many curves according to a few parameters:
devRate: deviation rate
vecLenMax: maximum length of a particle
vecLenMin: minimum length of a particle
noParticle: number of total particles

If vecLenMax and vecLenMin are the same, all the particles will have the same length. 

Option Explicit

Call Diffuse()

 

Sub Diffuse()

 

Dim devRate : devRate = 0.01

Dim vecLenMax : vecLenMax = 1

Dim vecLenMin : vecLenMin = 3

Dim noParticle : noParticle = 100

 

Dim aCrvs : aCrvs = Rhino.GetObjects(”Select Curves”, 4)

 

Dim i,n

Dim aPts()

Dim crvDom, crvParam, crvLen

Randomize

For i = 0 To UBound(aCrvs)

 

n = 0

Dim strCrv : strCrv = aCrvs(i)

 

crvDom = Rhino.CurveDomain(strCrv)

crvLen = Rhino.CurveLength(strCrv)

 

Rhino.EnableRedraw False

 

Do Until n = noParticle

 

crvParam = (RN(0.00, 1.00)) * (crvDom(1))

 

ReDim Preserve aPts(n)

aPts(n) = Rhino.EvaluateCurve(strCrv, crvParam)

Dim devPt : devPt = aPts(n)

Dim devX : devX = crvLen * devRate * RN(-1,1) + devPt(0)

Dim devY : devY = crvLen * devRate * RN(-1,1) + devPt(1)

Dim devZ : devZ = crvLen * devRate * RN(-1,1) + devPt(2)

Dim devPt2 : devPt2 = Array(devX, devY, devZ)

Dim rndPt : rndPt = Array(RN(-1,1), RN(-1,1), RN(-1,1))

Dim rndPt2 : rndPt2 = Rhino.PointAdd(devPt2, rndPt)

 

If n >= 1 Then

Dim vecDir : vecDir = Rhino.AddLine(devPt2, rndPt2)

Dim vecLen : vecLen = RN(vecLenMin, vecLenMax)

Dim Xform : Xform = Rhino.XformScale(devPt2, vecLen)

Rhino.TransformObject vecDir, Xform, True

End If

 

n = n + 1

 

Loop

 

Rhino.EnableRedraw True

Next

End Sub

 

Function RN (nMin, nMax)

RN = Null

Randomize

RN = (nMax - nMin) * Rnd + nMin

End Function

Feb
12

Avicular Colonies

 

This is what we submitted for the Evolo Skyscraper competition. Our design imagines of a world where birds evolve to nest skyscrapers. We didn’t end up winning any prizes, but it was a fun process nonethless. You can view the winners at: evolo-arch.com

dsample-01-noise-mesh-array

ff

growh

section

materials

2_final

 

Our final boards can be viewed here:

0223 02232

 

Concept Statement:

This is a proposal for a skyscraper that perhaps will emerge in the near future, which will surface without the contribution of human effort.  Although it will be the unintended side effect of technological progress, and therefore can ultimately be considered the result of human activity. It is a skyscraper nested by birds, out of man-made materials including cars, missiles, buses and tanks and other detritus of the human population. Our materialist and capitalist society tells us that if it is economical and convenient enough, then it is permissible to destroy nature and wipe out natural habitats. Will nature’s environmental refugees continue to face extinction, or, as this structure proposes, will they innovate in their adaptation to survive in this world that is changing faster than ever?

Birds are known to be incredibly capable of adapting to adverse environments. They have continued to evolve in human habitats (or habitats that men have taken over) and have become stronger. Bower birds recognize plastic and metal scraps and decorate their nests with bottle caps, straws and other trash thrown away by people.  Many species have adapted their wings to maneuver through tall skyscrapers and they have become comfortable dwelling within the human-made architectural spaces. They are becoming like us. Male Lyre birds imitate the sounds of their environment in order to attract a mate, even if those sounds include man-made noises such as sounds of camera shutters, car alarms, or the high-powered chain saws of foresters intent on destroying their habitat of trees.

What next? If they learn to flock in bigger colonies and learn to use heavier materials for building their nests, being the excellent architects they already are, what could limit them? To imagine birds building skyscrapers out of humanity’s disposable culture seems laughable. But history is full of ideas and inventions that sounded ridiculous at the moment. Who would have imagined thousands of years ago, when people used to live in huts built of mud and straw, that one day, there would be towering skyscrapers filling the sky? Just as mankind started constructing taller buildings to accommodate the growing population and crowded living conditions, birds, the master builders, will soon need to implement a new typology of nesting as their survival mechanism. As they are losing surface area, birds will need to start extending vertically for higher density. In fact, it is their very anatomic design which defies gravity, that allows them to reside in vertical structures better than human beings, who were designed to circulate merely on two dimensions.

The evolved skyscraping nests will emerge in a few selective areas where birds still recognize as their habitats. An ideal place for the avicular colonies to build their first structures would be the demilitarized zones, where wildlife is unintentionally reserved. There is a long stretch of this DMZ in Korea, the Korean Demilitarized Zone, separating the Korean peninsula in half. Humans have not entered this land for half a century. Unlike the other places in the world, more and more non-human species thrive in the DMZ. It is ironic to see how animals have found their own little Eden in between the war zones. The avicular colony will build an ineffably grand skyscraper and it will be created with piles upon piles of men’s failed dreams and broken hopes in preserving this earth.

Jan
05

Random / Order - Growth

I recently purchased a book which turned out to be one of the most amazing books I have ever come across: “A New Kind of Science” by Stephen Wolfram. The entire book is available online for viewing at: http://www.wolframscience.com/nksonline/toc.html

I have been reading a chapter on randomness, which is why I have been writing scripts that heavily depends on random number generator. These are the results of a growth algorithm that explores a territory that is somewhere in between being random and ordered. 

Dec
21

Diffuse / Noise

A new script that I have been writing based on a script found in: 
http://ncertainties3.wordpress.com/explicit-protocols/adam/181008_weldedwire/

The script diffuses any curve into smaller pieces of lines depending on a few parameters.

Merry Christmas, btw :)

 

Some tests:

 

Dec
08

Colony

This is still under a lot of progress. Just exploring ways to randomly populate a surface with mesh objects in this case with bikes and tanks.

Nov
24

Erdos Museum - MAD

One of the first buildings that will be finished that I worked on. A real physical mesh that can’t be spun around by a click of a mouse. Can’t believe it’s actually standing :)

Photos by Shang Li

Nov
14

NY - Korea

These are some polaroid shots by an artist friend from New York. He’s been living in Korea for a little more than a year now. Enjoy what a New Yorker sees in Korea.

All photos by Duke Donohue.