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) / 下载次数 2777
http://forums.netpad.net.cn/attachment.php?aid=6905&k=4f5e3e2d18a86264d7f83ddeeeb0438c&t=1765231906&sid=FiwGIR



附件: dubeau0 Phi 0(1).gsp (2010-9-2 23:43, 25.13 KB) / 下载次数 4963
http://forums.netpad.net.cn/attachment.php?aid=6906&k=93cee5d6e55d03c24e7edf1b694533ae&t=1765231906&sid=FiwGIR
作者: 柳烟    时间: 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) / 下载次数 4962
http://forums.netpad.net.cn/attachment.php?aid=6978&k=7f4e07dfc63467276147e8380eb25587&t=1765231906&sid=FiwGIR

图片附件: 未命名.JPG (2010-9-2 23:37, 32.89 KB) / 下载次数 2814
http://forums.netpad.net.cn/attachment.php?aid=6979&k=fbd1a404b492688db85f1bb9a4a6214e&t=1765231906&sid=FiwGIR


作者: 柳烟    时间: 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) / 下载次数 2815
http://forums.netpad.net.cn/attachment.php?aid=6980&k=61e06dc5e8a0b29192710daf6c44c07f&t=1765231906&sid=FiwGIR



附件: DubeauPhi1(1).gsp (2010-9-3 10:08, 21.07 KB) / 下载次数 4757
http://forums.netpad.net.cn/attachment.php?aid=6981&k=c1e54a105904ee6cb499a35a666121fd&t=1765231906&sid=FiwGIR
作者: 柳烟    时间: 2010-9-3 10:46

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

图片附件: 未命名.JPG (2010-9-3 10:46, 29.31 KB) / 下载次数 2778
http://forums.netpad.net.cn/attachment.php?aid=6982&k=b5104884808bd3c74e80e577d44b8d01&t=1765231906&sid=FiwGIR



附件: DubeauPhi1(2).gsp (2010-9-3 10:46, 23.61 KB) / 下载次数 4879
http://forums.netpad.net.cn/attachment.php?aid=6983&k=4ef5a36a79e7bfaa848dc0f4a503a4da&t=1765231906&sid=FiwGIR
作者: 柳烟    时间: 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) / 下载次数 2835
http://forums.netpad.net.cn/attachment.php?aid=6990&k=cdb4d54c89213709acbb0941e9775141&t=1765231906&sid=FiwGIR



图片附件: 未命名2.JPG (2010-9-3 20:24, 32.34 KB) / 下载次数 2789
http://forums.netpad.net.cn/attachment.php?aid=6991&k=1d9e02175314291885d7ecc4e76b29f9&t=1765231906&sid=FiwGIR



附件: DubeauPhiMixture.gsp (2010-9-3 21:20, 37.62 KB) / 下载次数 5159
http://forums.netpad.net.cn/attachment.php?aid=6993&k=15fb58863b2bd83380910b1d801ab1f2&t=1765231906&sid=FiwGIR
作者: 榕坚    时间: 2010-9-3 20:20

7# 柳烟


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

加点变换,扫妙图。

图片附件: 未命名1.JPG (2010-9-4 14:36, 34.07 KB) / 下载次数 2598
http://forums.netpad.net.cn/attachment.php?aid=7002&k=14cf36f8b9715117c982db75c48bfe46&t=1765231906&sid=FiwGIR



图片附件: 未命名2.JPG (2010-9-4 16:31, 43.45 KB) / 下载次数 2650
http://forums.netpad.net.cn/attachment.php?aid=7003&k=98395ba45c3721a2b59d874c1ddabc9b&t=1765231906&sid=FiwGIR


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

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

图片附件: 未命名3.JPG (2010-9-4 19:48, 33.81 KB) / 下载次数 2667
http://forums.netpad.net.cn/attachment.php?aid=7006&k=669de818dd212ecacc97695b0096cf84&t=1765231906&sid=FiwGIR


作者: 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) / 下载次数 2842
http://forums.netpad.net.cn/attachment.php?aid=7059&k=67e94fd7c1347398198d8f2d49308c8e&t=1765231906&sid=FiwGIR

图片附件: 未命名1.JPG (2010-9-7 10:41, 26.58 KB) / 下载次数 1395
http://forums.netpad.net.cn/attachment.php?aid=7060&k=882c8bef326d2ea6db5ce5aa92497932&t=1765231906&sid=FiwGIR


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

12# 柳烟


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

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

图片附件: 未命名.JPG (2010-9-7 19:30, 36.65 KB) / 下载次数 1332
http://forums.netpad.net.cn/attachment.php?aid=7069&k=873e0a4edd9b6ed36ffb9caf23074e72&t=1765231906&sid=FiwGIR


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

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




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