- UID
- 7
- 帖子
- 2888
- 精华
- 10
- 积分
- 2836
|
Ultra Fractal(之前介绍的分形软件)中有各个附带分形范例的源代码,我现在想用几何画板来做Magnet1 Mandelbrot的分形Z-->sqrt((z^2+C-1)/(2Z+C-2))[这个迭代式不知我是否理解正确],可是一直没有做好。这个分形比较特殊的是返回条件有两个:|Z|<r1且|Z-1|>r2,谁有兴趣的可以试一试,代码如下:
Magnet1Mandelbrot {
;
; Magnetic Mandelbrot set type 1. Use Switch Mode to select a
; magnetic Julia set.
;
init:
z = p1
loop:
z = sqr( (z^2 + pixel - 1) / (2*z + pixel - 2) )
bailout:
|z| < @bailout && |z - 1| > @lowerbailout
default:
title = "Magnet 1 (Mandelbrot)"
helpfile = "Uf*.chm"
helptopic = "Html\formulas\standard\magnet.html"
magn = 0.5
maxiter = 100
periodicity = 0
param p1
caption = "Perturbation"
default = (0, 0)
hint = "Starting value for each point. You can use this to \
'perturb' the fractal. Use (0, 0) for the classic set."
endparam
param bailout
caption = "Bailout value"
default = 100.0
min = 1
$IFDEF VER40
exponential = true
$ENDIF
hint = "This parameter defines how soon an orbit bails out while \
iterating. Larger values give smoother outlines; smaller values \
generally produce more interesting shapes around the set."
endparam
param lowerbailout
caption = "Convergent bailout value"
default = 0.00005
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
switch:
type = "Magnet1Julia"
p1 = pixel
bailout = bailout
} |
-
-
捕获.JPG
(76.54 KB)
|