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) / 下载次数 2540
http://inrm3d.cn/attachment.php?aid=6905&k=b3adb5e0716034409de1f262448f0fb1&t=1732393657&sid=Na9T9t



附件: dubeau0 Phi 0(1).gsp (2010-9-2 23:43, 25.13 KB) / 下载次数 4555
http://inrm3d.cn/attachment.php?aid=6906&k=3782b7707b3c393efae6b8f85207f69e&t=1732393657&sid=Na9T9t
作者: 柳烟    时间: 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) / 下载次数 4550
http://inrm3d.cn/attachment.php?aid=6978&k=bfc3d9552f298e7290256fcc872bb6f9&t=1732393657&sid=Na9T9t

图片附件: 未命名.JPG (2010-9-2 23:37, 32.89 KB) / 下载次数 2577
http://inrm3d.cn/attachment.php?aid=6979&k=06b70aea5f68a3a500793abf9cc6e02c&t=1732393657&sid=Na9T9t


作者: 柳烟    时间: 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) / 下载次数 2571
http://inrm3d.cn/attachment.php?aid=6980&k=d532b9549ccc5624b676aa8bf9857427&t=1732393657&sid=Na9T9t



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

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

图片附件: 未命名.JPG (2010-9-3 10:46, 29.31 KB) / 下载次数 2543
http://inrm3d.cn/attachment.php?aid=6982&k=76de2bf5c7c9654d3f5e789086d83e51&t=1732393657&sid=Na9T9t



附件: DubeauPhi1(2).gsp (2010-9-3 10:46, 23.61 KB) / 下载次数 4466
http://inrm3d.cn/attachment.php?aid=6983&k=79c2bbb700bc1c023fd78d96e3164272&t=1732393657&sid=Na9T9t
作者: 柳烟    时间: 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) / 下载次数 2608
http://inrm3d.cn/attachment.php?aid=6990&k=6715dbc7df31d7f252af702c8db3d7e2&t=1732393657&sid=Na9T9t



图片附件: 未命名2.JPG (2010-9-3 20:24, 32.34 KB) / 下载次数 2554
http://inrm3d.cn/attachment.php?aid=6991&k=01a8c857b8da9bf44155cbb80f6748ec&t=1732393657&sid=Na9T9t



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

7# 柳烟


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

加点变换,扫妙图。

图片附件: 未命名1.JPG (2010-9-4 14:36, 34.07 KB) / 下载次数 2385
http://inrm3d.cn/attachment.php?aid=7002&k=70d37e78676c3d3a360443b2502b3933&t=1732393657&sid=Na9T9t



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


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

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

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


作者: 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) / 下载次数 2599
http://inrm3d.cn/attachment.php?aid=7059&k=d8e1dca66b0ba89783701376505fdee7&t=1732393657&sid=Na9T9t

图片附件: 未命名1.JPG (2010-9-7 10:41, 26.58 KB) / 下载次数 1243
http://inrm3d.cn/attachment.php?aid=7060&k=0f6977ee8b1d1fd9daa17f36ec7480e4&t=1732393657&sid=Na9T9t


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

12# 柳烟


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

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

图片附件: 未命名.JPG (2010-9-7 19:30, 36.65 KB) / 下载次数 1193
http://inrm3d.cn/attachment.php?aid=7069&k=87a9e5ef9ad219bc36db5fcebc58be37&t=1732393657&sid=Na9T9t


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

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




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