返回列表 回复 发帖
UF中的一种另类M集,整了老半天不能出结果。求助:
Tah-StutterBrot {
;
;This is a version of mandelbrot that
;switches the values of C and Z every
;few (default:501) iterations.
;
init:
  c = #pixel
  z = @start
  float f = @restart
  
loop:
    f = f - 1
  IF (f <= 0)
    f = @restart
    oldC = c
    c = z*@sign
    z = oldC
  ENDIF
     z = z^@power + c
  bailout:
  |z| <= @bailout
  
default:
  title = "StutterBrot"
  helpfile = "dmj-pub\dmj-pub-uf-stutter.htm"
  center = (0,0)
  periodicity = 0
  maxiter = 1000

  param start
    caption = "Start Value"
    default = (0,0)
    hint = "Starting value for each point.  You can use this to \
            'perturb' the fractal."
  endparam
  param power
    caption = "Exponent"
    default = (2,0)
    hint = "The exponent, dummy"
  endparam
  param bailout
    caption = "Bailout"
    default = 1e20
    hint = "Bailout value; larger values will cause more \
            iterations to be done for each point."
  endparam
  
  param restart

    caption = "Restart Interval"
    default = 501.0
    min = 1e-10
    hint = "Specifies the number of iterations before c is reset."
  endparam
  
  param sign
    caption = "Sign"
    default = -1.0
    hint = "Specifies the sign of the new C."
  endparam

  
switch:
  type = "Tah-StutterJulia"
  seed = #pixel
  start = start
  restart = restart
  power = power
  sign = sign
  bailout = bailout
}

Fractal1.jpg (30.82 KB)

Fractal1.jpg

68# 柳烟


在tah.ufm中。
同一系列的另一个也挺有趣的:
Tah-MandelJulia {
;
;Hey, looky here!  It averages the point in the
;mandelbot set with that of the julia seed!
;Sorry, this it's own switch.
;
init:
  cj = @seed
  zj = #pixel
  cm = #pixel
  zm = @start
loop:
  zj = zj^@power + cj
  zm = zm^@power + cm
  z = (zm + zj)/2
bailout:
  |z| <= @bailout
default:
  title = "MandelJulia"
  param power
    caption = "Power"
    default = (2,0)

    hint = "The Exponent, stupid."
  endparam
  param seed
  Caption = "Seed"
  Default = (.26,.0016)
  Hint = "The Julia-type seed."
  endparam
  param restart
    caption = "Restart Interval"
    default = 1.0
    min = 1e-10
    hint = "Specifies the number of iterations before c is reset."
  endparam
param start
    caption = "Start Value"
    default = (0,0)
    hint = "Mess it up."
  endparam
  param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
    hint = "Contain yourself!"
  endparam
  }
这个比较容易做。
给M集纹身:

捕获.JPG (34.12 KB)

捕获.JPG

Fractal1.jpg (87.33 KB)

Fractal1.jpg

72# 柳烟


我弄来弄去都是原来的M集呢?
75# 柳烟


不知理解是否有误:f>0时正常迭代,f<=0时,C换成-Z,Z换成C,再迭代501次。判断语句结束后的Z应该是接着刚获得的Z。
77# changxde


f=501
f=k*(f-1)+非k*501
从f-f迭代即可。
k为判断f是否>=0
80# changxde


期待着changxde老师再给大家一个惊喜,从代码来看几何画板应该能演绎这个分形的。
刚才重新再读一遍代码,好象明白了自己的做法与代码的差异。等空下来后再来试试。几何画板有一点很麻烦:更改。设计不到位的话没办法更改,只能重做(迭代中的次数、迭代点等一但发现有错的话不能更改只能删掉重做迭代)。
85# 柳烟


花了一个下午,验证结果没有问题。你上面的结果也应该是没错的,可能是着色的原因吧。我之前做过一个newton为独立开关项的,这次把所有开关整在一个文件中,几何画板地运行起来慢地象蜗牛似的。

捕获.JPG (19.67 KB)

捕获.JPG

看来明天又要重做了,把10个开关项整在一起,扫一张迭代次数为700的图形比我早晨扫普通M集迭代10000次还难哪。图形倒确实是非常漂亮的,可是已经扫了1个小时多了,哎:

捕获.JPG (27.67 KB)

捕获.JPG

返回列表