15# 榕坚
我尝试在UF中调成轴对称,搞了老半天,结果不行,发现随便如何调,竟是个中心对称。我将ucl文件发上来,你试试,如何调成轴对称。
柳烟谢氏三角陷阱文件:
柳烟谢氏三角文件1 {
init:
float stdz = 0
float dz = 0.0
loop:
trz = exp(flip(-pi/180*@rot))*(#z-@center)/@size
x = 1/sqrt(@r)*real(trz)
y = sqrt(@r)*imag(trz)
if @freq != 0
x = 2*sin(2*pi*@freq*x)
y = 2*sin(2*pi*@freq*y)
endif
trz = x + flip(y)
z1 = trz
float i = 0
iter = @niter
while i < @niter
i = i + 1
IF ((imag(z1)>=.575*real(z1)) && (-.575*real(z1)<=imag(z1)))
z1 = 2*z1-1i
ELSEIF (real(z1)<=0)
z1 = 2*z1+(.8660254, 0.5)
ELSEIF (real(z1)>0)
z1 = 2*z1+(-.8660254, 0.5)
ELSE
z1 = 2*z1
ENDIF
z=z1
if |z| > 1e20
iter = i
i = @niter
endif
endwhile
float logp = 1/log(2)
float logb = log(log(1e20))
dz = real(iter + logp*logb - logp*log(cabs(z1)))
if dz >stdz
stdz = dz
endif
final:
#index = .1*stdz
default:
title = "柳烟谢氏三角陷阱"
helpfile = "sam-help/juliatrap.htm"
param center
caption = "Center"
default = (1,1)
endparam
param rot
caption = "Rotation"
default = -30.0
endparam
param size
caption = "Size"
default = 0.38750
endparam
param r
caption = "Ratio Width/Heigh"
default = 1.0
endparam
param @niter
caption = "Julia Iterations"
default = 100
endparam
param freq
caption = "Trap Frequency"
default = 0.0
endparam
} |