2010年9月12日 星期日

Voronoi....(Grasshopper or RhinoScript + PointSet Reconstruction)

這次運用Rhino 免費外掛程式
PointSet Reconstruction
製作Voronoi造型
運用此外掛
可在短時間之內生成
voronoi 及 三角化造形
Uses Rhino Plug-in, PointSet Reconstruction
to populate Voronoi graphic and form.
While Using PointSet Reconstruction,
we could make voronoi and triangular shape
really quick.
首先我們使用Grasshopper裡面的在
Vector分類下的Spherical Cloud
取得點後
再使用
PointSet Reconstruction裡面的
Voronoi Diagram(3D)
產生3D Voronoi
First, we use the "Spherical Cloud" function
under the "vector" to populate
random points on the sphere,
than we use the Voronoi Diagram(3D)
to make the 3D voronoi.  

insert 一個圓球在3D Voronoi裡
並將球體外的面去掉
產生Voronoi球

Insert a sphere into the 3D Voronoi
and cut off the surface outside the sphere
to make this Voronoi Sphere 

再來嘗試使用RhinoScript
撰寫Random Point功能
再使用Voronoi Diagram(3D)功能
同樣產生3D Voronoi.
RandomPoint 程式如下
Second we try to populate random points
by Rhinoscript, and also use the
Voronoi Diagram(3D)
to make the 3D Voronoi.
the scripts are below:
Dim ptNumbers:ptNumbers = 19
ReDim arrPts01(ptNumbers)
ReDim arrPts02(ptNumbers)
ReDim arrPts03(ptNumbers)
Dim n
Dim i

Dim xN:xN = 10
Dim yN:yN = 10
Dim zN:zN = 10


For n=0 To ptNumbers
arrPts01(n) = Array(Rnd()*10,Rnd()*10,Rnd()*10)
arrPts02(n) = Array(Rnd()*10,Rnd()*10,Rnd()*10)
arrPts03(n) = Array(Rnd()*10,Rnd()*10,Rnd()*10)
Next



Call Rhino.AddPoints(arrPts01)
Call Rhino.AddPoints(arrPts02)
Call Rhino.AddPoints(arrPts03)


將3D Vornoi 從中拉開
如同山谷般的空間感

Seperate the 3D Voronoi from the middle
, we could see the Valley Space between the
3D Voronoi.



再來嘗試PointSet Reconstruction
裡面的各種Voronoi功能
可貼於Surface上 或是球體上
但生產出來的
多為骨架線條
或是MESH
雖仍可編輯但較難處理

Then we try to use other voronoi function
like, voronoi diagram(2D), it could
projext the voronoi to the surface or sphere,
but the outcome are lines or mesh.
the outcome could be re-edited, but it's not so friendly


最後也是亂數script產生點後
利用他的Delaunay Triangulation
產生三角化的面

Last, we use script to populate the random points
and use "Delaunay Triangulation" to make
triangular surface

沒有留言:

張貼留言