NCF参数化建筑论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6819|回复: 12
打印 上一主题 下一主题

[网络资源] RVB ATTRACTOR SERIES 02: GUMOWSKI-MIRA

[复制链接]
跳转到指定楼层
1m
发表于 2010-6-12 14:34:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Gumowski-Mira attractors were developed at the CERN research centre in 1980 by I. Gumowski and C. Mira while aiming to calculate the trajectories of sub-atomic particles. They create organic patterns resembling natural/marine forms.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享
2m
 楼主| 发表于 2010-6-12 14:35:48 | 只看该作者
Option Explicit
‘Script written by Elif Erdine

Call GumowskiMira()
Sub GumowskiMira()


Dim i


Dim x()


Dim y()


Dim pt()


Dim maxpoints


maxpoints = 5000



Dim
B


B = 1


ReDim Preserve x(maxpoints)


ReDim Preserve y(maxpoints)


x(i) = 0


y(i) = 5


i=0


Do While (i < maxpoints)


x(i+1) = B*y(i) + GM(x(i))


y(i+1) = GM(x(i+1)) – x(i)




ReDim Preserve pt(i)


pt(i) = Array(x(i), y(i), 0)




If IsArray(pt(i)) Then


Call Rhino.AddPoint(pt(i))


Dim plane


plane = Rhino.PlaneFromNormal(pt(i), Array(0,0,1))


Call Rhino.AddCircle(plane, 0.2)


End If


i = i+1


Loop


If IsArray(pt) Then


Dim ptcloud


ptcloud = Rhino.AddPointCloud(pt)


End If


Dim ptdel


ptdel =
Rhino.GetObjects(”select points to delete”, 1, , , True)


Call Rhino.DeleteObjects(ptdel)


End Sub
Function GM (ByVal x)

Dim A


A= 0.305


GM = A*x + 2*(1-A)*x^2 / (1+x^2)

End Function

[size=0.9em]Posted:
April 16th, 2009 under
Parametric Design.
Comments:
1




.RVB ATTRACTOR SERIES 01: ROSSLER ATTRACTORRossler attractor behaves similarly to Lorenz attractor. It’s formed by 3 non-linear ordinary differential equations. (
http://en.wikipedia.org/wiki/Rossler_map
)


3m
 楼主| 发表于 2010-6-12 14:36:41 | 只看该作者
Call Rossler()
Sub Rossler()
           
Dim x, y, z

           
Dim maxpoints

           
maxpoints = 8000

           
Dim h

           
h = 0.025

           
Dim p(2)

           
Dim ptnew()

           
Dim i

           
Do While (i<maxpoints)

                       
p(0) = p(0) + h* dx(p(0), p(1), p(2))

                       
p(1) = p(1) + h* dy(p(0), p(1), p(2))

                       
p(2) = p(2) + h* dz(p(0), p(1), p(2))


                       
Rhino.AddPoint(p)

                       
ReDim Preserve ptnew(i)

                       
ptnew(i) = p

                       
i=i+1

           
Loop



           
Call Rhino.AddCurve(ptnew, 3)

End Sub


Function dx(ByVal x, ByVal y, ByVal z)
           
dx = -y-z

End Function
Function dy(ByVal x, ByVal y, ByVal z)
           
dy = x + 0.4*y

End Function
Function dz(ByVal x, ByVal y, ByVal z)
           
dz = 0.31 + z*(x-5.3)

End Function

[size=0.9em]Posted:
April 16th, 2009 under
Parametric Design.
Comments:
none




.RVB CURLICUE FRACTALI’ve recently started using Rhino Scripting as a design tool in my research. I will be documenting here my learning process through the .rvb scripts.
This study shows the Curlicue Fractal, which generates quite intricate patterns. (http://mathworld.wolfram.com/CurlicueFractal.html)


4m
 楼主| 发表于 2010-6-12 14:38:00 | 只看该作者
Call Curlicue()
Sub Curlicue()
            Dim f
            Dim i
            Dim j
            Dim pi
            pi = Rhino.Pi
            Dim sqtwo
            sqtwo = 1.4142135623730950488016887
            Dim eulers
            eulers = 0.577215664901532860606512
            Dim golden
            golden = 1.618033988749894848204586
            Dim lntwo
            lntwo = 0.69314718055994530941
            Dim e
            e= 2.71828182845904523536028747
            Dim p(2)
            Dim ptCur()
            
            For j=0 To 50000*pi Step sqtwo*pi*2
                       
                        f = f + j
                        p(0)= p(0) + Cos(f)
                        p(1)= p(1)+ Sin(f)
                        p(2)=p(2) + Cos(f)*Sin(f)
                       
                        ‘Rhino.AddPoint(p)
                        ReDim Preserve ptCur(i)
                        ptCur(i) = p
                        i=i+1
                       
            Next
            Call Rhino.addcurve(ptCur, 3)      

End Sub

Posted: April 16th, 2009 under Parametric Design.
Comments: none

评分

参与人数 1强度 +3 照度 +30 收起 理由
skywoolf + 3 + 30 感谢分享

查看全部评分

5m
发表于 2010-6-12 15:24:56 | 只看该作者
强大!!!!!!!!
6m
发表于 2010-6-14 14:53:17 | 只看该作者
好    厉害的rvb.
7m
发表于 2010-6-14 23:57:26 | 只看该作者
来个打包的,xiexie
8m
发表于 2010-6-17 16:45:00 | 只看该作者
厉害。。。。
9m
发表于 2011-4-28 17:19:30 | 只看该作者
very good!!!
10m
发表于 2011-5-8 17:11:53 | 只看该作者
赞 , 厉害 !
11m
发表于 2011-5-28 00:20:01 | 只看该作者
貌似好深奥啊
12m
发表于 2011-7-1 16:24:44 | 只看该作者
学的好慢啊
13m
发表于 2011-7-15 09:01:52 | 只看该作者
赞一个 谢谢楼主

小黑屋|手机版|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 )    辽公网安备21021102000973号

GMT+8, 2024-4-28 01:57 , Processed in 0.068012 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表