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) / 下载次数 2854
http://forums.netpad.net.cn/attachment.php?aid=6905&k=1521e5ccd5f9de7bd4e77c82dffb7097&t=1779859038&sid=BPddBd



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

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


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



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

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

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



附件: DubeauPhi1(2).gsp (2010-9-3 10:46, 23.61 KB) / 下载次数 4995
http://forums.netpad.net.cn/attachment.php?aid=6983&k=8d237adc801884a8f7fff7db0934dfc7&t=1779859038&sid=BPddBd
作者: 柳烟    时间: 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) / 下载次数 2914
http://forums.netpad.net.cn/attachment.php?aid=6990&k=d4928873213e9c1838d11d377bb4d7a3&t=1779859038&sid=BPddBd



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



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

7# 柳烟


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

加点变换,扫妙图。

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



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


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

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

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


作者: 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) / 下载次数 2925
http://forums.netpad.net.cn/attachment.php?aid=7059&k=2f8ea8bcf4fcc9469f675a41b76607b0&t=1779859038&sid=BPddBd

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


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

12# 柳烟


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

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

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


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

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




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