- UID
- 7
- 帖子
- 2888
- 精华
- 10
- 积分
- 2836
|
UF中的范例:MandelLevels {
;Use Multipass or Onepass linear for drawing
init:
if @nothreads==true
z=0
aa=#pixel
else
if real(#screenmax)/imag(#screenmax)>4/3
float scale=3.0/imag(#screenmax)/#magn
else
float scale=4.0/real(#screenmax)/#magn
endif
bool flag=false
bool flag2=false
complex z=0
complex a=#pixel
complex aa=@col
complex a1=a+scale
complex a2=a-scale
complex a3=a+flip(scale)
complex a4=a-flip(scale)
complex a5=a1+flip(scale)
complex a6=a1-flip(scale)
complex a7=a2+flip(scale)
complex a8=a2-flip(scale)
int max=#maxiter
int c=0
int ac=0
repeat
c=c+1
z=z^@n+@f1(a)
until (c==max)||(|z|>@bailout)
if c==max
flag=true
endif
ac=c
if flag==false
c=0
z=0
repeat
c=c+1
z=z^@n+@f1(a1)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a1
endif
c=0
z=0
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a2)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a2
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a3)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a3
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a4)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a4
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a5)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a5
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a6)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a6
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a7)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a7
endif
c=0
z=0
endif
if flag2==false
repeat
c=c+1
z=z^@n+@f1(a8)
until (c==max)||(|z|>@bailout)
if (c>ac)&&(c<max)
flag2=true
aa=a8
endif
c=0
z=0
endif
endif
if flag==true
aa=#pixel
endif
endif
loop:
z = z^@n + @f1(aa)
bailout:
|z|<@bailout
switch:
type="JuliaLevels"
seed=#pixel
nothreads=nothreads
f1=f1
col=col
n=n
bailout=bailout
default:
title = "MandelLevels"
method=multipass
periodicity=0
center=(-0.5,0)
func f1
caption="Function"
hint="Function for parameter c."
default=ident()
endfunc
param nothreads
caption="No threads"
hint="The routine will work as a normal mandelbrot."
default=false
endparam
param col
caption="Colour"
hint="Choose color between bands with geographic coords"
default=(0.0,0.0)
endparam
param n
caption="exponent"
hint="2 is the normal Mandelbrot."
default=(2,0)
endparam
param bailout
caption="bailout"
hint="bailout"
default=4.0
endparam
}
这可是M集的又一表现形式,可是做了一半下不去了。请高手出招: |
|