Board logo

标题: UF分形的画板实现4(esa.ufm) [打印本页]

作者: 柳烟    时间: 2010-8-30 16:15     标题: UF分形的画板实现4(esa.ufm)

dubeau0 Phi 0(1).gsp (25.13 KB)
未命名.JPG

图片附件: 未命名.JPG (2010-8-30 16:15, 32.46 KB) / 下载次数 2278
http://www.inrm3d.cn/attachment.php?aid=6905&k=49dff941d4850a75f08dfd6a8e33658e&t=1715641830&sid=m00Cnl



附件: dubeau0 Phi 0(1).gsp (2010-9-2 23:43, 25.13 KB) / 下载次数 4202
http://www.inrm3d.cn/attachment.php?aid=6906&k=421744ab0fc8e56c2c63e708c6facc4f&t=1715641830&sid=m00Cnl
作者: 柳烟    时间: 2010-8-30 16:21

这是一楼中UF中的代码
DubeauPhi0 {
; by Etienne Saint-Amant
; 2009/06
; Based on the article of Francois Dubeau that appeared on the Journal of
; Computational and Appied Mathematics 224 in 2009, pp. 66-76.
; doi:10.1016/j.cam.2008.04.014

global:
  ;$define DEBUG
init:
  ; factorial
  int func factorial(int i)
    int total
    total = 1
    while i >= 1
      total = total * i
      i = i - 1
    endwhile
    return total
  endfunc
  ; num function
  float func num(float delta, int i)
     float total
     float vardelta
     total = 1
     vardelta = delta
     while i >= 1
       total = total * vardelta
       vardelta = vardelta - 1
       i = i - 1
     endwhile
     return total
   endfunc
  ; binomial delta function
  float func binomialdelta(float delta, int i)
    float result
    if i == 0
      result = 1
    else
      result = num(delta,i)/factorial(i)
    endif
    return result
  endfunc
  z = pixel
loop:
  complex sumNum
  complex sumDenum
  int i
  sumNum = 0
  sumDenum = 0
  i = 1
  while i <= @p - 1
    sumNum = sumNum + binomialdelta(1/cabs(@n),i) * (z^@n/@r - 1)^(i-1)
    sumDenum = sumDenum + i * binomialdelta(1/cabs(@n),i) * (z^@n/@r - 1)^(i-1)
    i = i + 1
  endwhile
  zold = z
  z = z - ((z^@n - @r) * sumNum) / (@n * z^(@n - 1) * sumDenum)
bailout:
  |z - zold| >= @bailout
default:
  title = "Dubeau Phi 0"
  periodicity = 0
$IFDEF VER50
  rating = recommended
$ENDIF
  maxiter = 100
  param n
    caption = "Exponent"
    default = (3,0)
    hint = "Specifies the exponent of the equation that is solved by \
            Dubeau's method. Use real numbers (set the imaginary part \
            to zero) to obtain the correct Dubeau's Method"
  endparam
  param r
    caption = "Root"
    default = (1,0)
    hint = "Specifies the root of the equation that is solved. Use larger \
            numbers for slower convergence."
  endparam
  int param p
    caption = "Order of convergence"
    default = 2
    hint = "Must be a natural number greater than 2.  2 will generate a \
           standard Newton's method."
    min = 2
  endparam
  param bailout
    caption = "Bailout value"
    default = 0.00001
    min = 0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon a convergent orbit bails out while \
            iterating. Smaller values give more precise results but usually \
            require more iterations."
  endparam
}
作者: inRm    时间: 2010-8-30 21:46

1# 柳烟

漂亮!
作者: 柳烟    时间: 2010-9-2 23:37

dubeau0 Phi 0(2).gsp (31.14 KB)
未命名.JPG

附件: dubeau0 Phi 0(2).gsp (2010-9-2 23:37, 31.14 KB) / 下载次数 4201
http://www.inrm3d.cn/attachment.php?aid=6978&k=8b7e17410fae7ff6026fa47c6d050630&t=1715641830&sid=m00Cnl

图片附件: 未命名.JPG (2010-9-2 23:37, 32.89 KB) / 下载次数 2302
http://www.inrm3d.cn/attachment.php?aid=6979&k=61512090d01162896961b52922b6c462&t=1715641830&sid=m00Cnl


作者: 柳烟    时间: 2010-9-3 10:06

DubeauPhi1 {
; by Etienne Saint-Amant
; 2009/06
; Based on the article of Francois Dubeau that appeared on the Journal of
; Computational and Appied Mathematics 224 in 2009, pp. 66-76.
; doi:10.1016/j.cam.2008.04.014

global:
  ;$define DEBUG
init:
  ; factorial
  int func factorial(int i)
    int total
    total = 1
    while i >= 1
      total = total * i
      i = i - 1
    endwhile
    return total
  endfunc
  ; num function
  float func num(float delta, int i)
     float total
     float vardelta
     total = 1
     vardelta = delta
     while i >= 1
       total = total * vardelta
       vardelta = vardelta - 1
       i = i - 1
     endwhile
     return total
   endfunc
  ; binomial delta function
  float func binomialdelta(float delta, int i)
    float result
    if i == 0
      result = 1
    else
      result = num(delta,i)/factorial(i)
    endif
    return result
  endfunc
  z = pixel
loop:
  complex sum
  int i
  sum = 0
  i = 0
  while i <= @p - 1
    print(1/cabs(@n),":",i,":",binomialdelta(1/cabs(@n),i))
    sum = sum + binomialdelta(1/cabs(@n),i) * (@r/z^@n - 1)^i
    i = i + 1
  endwhile
  zold = z
  z = z * sum
bailout:
  |z - zold| >= @bailout
default:
  title = "Dubeau Phi 1"
  periodicity = 0
$IFDEF VER50
  rating = recommended
$ENDIF
  maxiter = 100
  param n
    caption = "Exponent"
    default = (3,0)
    hint = "Specifies the exponent of the equation that is solved by \
            Dubeau's method. Use real numbers (set the imaginary part \
            to zero) to obtain the correct Dubeau's Method"
  endparam
  param r
    caption = "Root"
    default = (1,0)
    hint = "Specifies the root of the equation that is solved. Use larger \
            numbers for slower convergence."
  endparam
  int param p
    caption = "Order of convergence"
    default = 2
    hint = "Must be a natural number greater than 2.  2 will generate a \
           standard Newton's method."
    min = 2
  endparam
  param bailout
    caption = "Bailout value"
    default = 0.00001
    min = 0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon a convergent orbit bails out while \
            iterating. Smaller values give more precise results but usually \
            require more iterations."
  endparam
}
未命名.JPG
DubeauPhi1(1).gsp (21.07 KB)

图片附件: 未命名.JPG (2010-9-3 10:06, 34.64 KB) / 下载次数 2314
http://www.inrm3d.cn/attachment.php?aid=6980&k=f0737803daeeb36e0708df6e92570983&t=1715641830&sid=m00Cnl



附件: DubeauPhi1(1).gsp (2010-9-3 10:08, 21.07 KB) / 下载次数 4021
http://www.inrm3d.cn/attachment.php?aid=6981&k=0dc93007a00cb989891f554583c86f3c&t=1715641830&sid=m00Cnl
作者: 柳烟    时间: 2010-9-3 10:46

未命名.JPG
DubeauPhi1(2).gsp (23.61 KB)

图片附件: 未命名.JPG (2010-9-3 10:46, 29.31 KB) / 下载次数 2267
http://www.inrm3d.cn/attachment.php?aid=6982&k=f68997f54dbc16bbb1a856268346f6f2&t=1715641830&sid=m00Cnl



附件: DubeauPhi1(2).gsp (2010-9-3 10:46, 23.61 KB) / 下载次数 4135
http://www.inrm3d.cn/attachment.php?aid=6983&k=5410d84bd1df7182ba5c27bddda0eb2b&t=1715641830&sid=m00Cnl
作者: 柳烟    时间: 2010-9-3 19:50

DubeauPhiMixture.gsp (37.62 KB)
文件中的lambdy的横坐标lambdy-x与纵坐标lambdy-y设为(1,0),则为5楼图,若设为(0,1),则为1楼图,若为其它,则扫出其余的分形,自已扫去,有趣。
未命名1.JPG
未命名2.JPG

图片附件: 未命名1.JPG (2010-9-3 19:50, 30.15 KB) / 下载次数 2338
http://www.inrm3d.cn/attachment.php?aid=6990&k=38cbbb7acf24cc4fc2be157c273eb1a2&t=1715641830&sid=m00Cnl



图片附件: 未命名2.JPG (2010-9-3 20:24, 32.34 KB) / 下载次数 2290
http://www.inrm3d.cn/attachment.php?aid=6991&k=38680a3901d6488ec736ec13d8f644fd&t=1715641830&sid=m00Cnl



附件: DubeauPhiMixture.gsp (2010-9-3 21:20, 37.62 KB) / 下载次数 4397
http://www.inrm3d.cn/attachment.php?aid=6993&k=f303137d62dc70ca452d7ce3ef36b1a9&t=1715641830&sid=m00Cnl
作者: 榕坚    时间: 2010-9-3 20:20

7# 柳烟


不错,比UF的效果好看。
作者: 柳烟    时间: 2010-9-4 14:36

加点变换,扫妙图。

图片附件: 未命名1.JPG (2010-9-4 14:36, 34.07 KB) / 下载次数 2132
http://www.inrm3d.cn/attachment.php?aid=7002&k=23c99af5ab16c132b5c2dbac7b6aa251&t=1715641830&sid=m00Cnl



图片附件: 未命名2.JPG (2010-9-4 16:31, 43.45 KB) / 下载次数 2187
http://www.inrm3d.cn/attachment.php?aid=7003&k=aedbf50d379afb507fd7051df6d6e1d2&t=1715641830&sid=m00Cnl


作者: 柳烟    时间: 2010-9-4 19:48

边学UF分形代码中的算法,又发了些奇思怪想,弄出的图:

图片附件: 未命名3.JPG (2010-9-4 19:48, 33.81 KB) / 下载次数 2210
http://www.inrm3d.cn/attachment.php?aid=7006&k=6a57eff3de8948958c903440986d3770&t=1715641830&sid=m00Cnl


作者: xiaongxp    时间: 2010-9-5 00:05

10# 柳烟
好看!
作者: 柳烟    时间: 2010-9-7 10:41

FnGlynn {
;
; Based on GLYNN, a formula by Jon Horner.
; Mutated Fractint and UF version by Bradley Beacham.
; See blb.txt for comments.
; 13 March 2003
;
global:
  power = @p1
  c = @p2
  fc = fn1(@p2)

init:
  z = #pixel

loop:
  if @FuncAffects == "Z"
    z = fn1(z^power) + c
  elseif @FuncAffects == "C"
    z = z^power + fc
  elseif @FuncAffects == "Whole"
    z = fn1(z^power + c)
  else  ;"Both"
    z = fn1(z^power) + fc
  endif

bailout:
  |z| <= @bailout

default:
  title = "FnGlynn"
  param p1
    caption = "Power"
    default = (1.5,0)
  endparam
  param p2
    caption = "Julia Seed"
    default = (-0.2,0)
  endparam
  param bailout
    caption = "Bailout value"
    default = 4
    min = 0
  endparam
  func fn1
    caption = "Function"
    default = ident()
  endfunc
  param FuncAffects
    caption = "Function Affects"
    enum = "Z" "C" "Whole" "Both"
    default = 2  ; "Whole" is the default
    hint = "What part of iterated function is affected by the user function? \
    Options are 'Z': [fn(z^power)] + c; 'C': z^power + fn(c); \
    'Whole': fn(z^power + c); and 'Both': fn(z^power) + fn(c)."
  endparam
}

FnGlynn.gsp (14.51 KB)
未命名1.JPG

附件: FnGlynn.gsp (2010-9-7 10:41, 14.51 KB) / 下载次数 2420
http://www.inrm3d.cn/attachment.php?aid=7059&k=06a82f749e19980de10a0effea828ad9&t=1715641830&sid=m00Cnl

图片附件: 未命名1.JPG (2010-9-7 10:41, 26.58 KB) / 下载次数 1122
http://www.inrm3d.cn/attachment.php?aid=7060&k=456e9697ac86cb4539d3bfc8ee5cf8f1&t=1715641830&sid=m00Cnl


作者: 榕坚    时间: 2010-9-7 10:59

12# 柳烟


可以再加大迭代次数,淡化等势圈。
作者: 柳烟    时间: 2010-9-7 19:30

13# 榕坚
按此建议,重新扫一张,并把一小块放大。
未命名.JPG

图片附件: 未命名.JPG (2010-9-7 19:30, 36.65 KB) / 下载次数 1070
http://www.inrm3d.cn/attachment.php?aid=7069&k=7805c9e7a4e484fcb4bb534cdd29b772&t=1715641830&sid=m00Cnl


作者: 榕坚    时间: 2010-9-7 20:38

这个分形有点象谢宾斯基分形图的味道。




欢迎光临 inRm3D: 画板论坛 (http://www.inrm3d.cn/) Powered by Discuz! 7.0.0