返回列表 回复 发帖

UF分形中的画板实现第3集

未命名1.JPG
未命名2.JPG
未命名3.JPG
General_Sterling_18.gsp (110 KB)
附UF中的代码:
General_Sterling_18 {

; Original: z=z-(z*z2+z2*c-z+c-zsin)/(3*z2+2*c*z-1-zcos)

init:
  float zds
  complex z1
  complex z2

if @usepixel
    z = #pixel*@seed
  else
    ;Original From Sterling
    z = @seed
  endif
  
loop:
  z1 = z
  z2 = z^2
  
  z = z - (@p1*z*z2+@p2*z2*#pixel-z+@p4*#pixel-@p3*@fn1(z))/(@p5*z2+@p6*#pixel*z-1-@p7*@fn2(z))
  zds = |z1-z|
  
bailout:
  (zds > 1e-25) && (zds < 1e20)
  
default:
  title = "General_Sterling_18"
  periodicity = 0
  maxiter = 190
  
  float param Seed
    caption = "Seed"
    default = -1/3
  endparam
  
  complex func fn1
    caption = "Fn1"
    hint = "This is the first function."
    default = sin()
  endfunc
  
  complex func fn2
    caption = "Fn2"
    hint = "This is the Second function."
    default = cos()
  endfunc
  
  complex param p1
    caption = "p1"
    default = 1
  endparam
  
  complex param p2
    caption = "p2"
    default = 1
  endparam

  complex param p3
    caption = "p3"
    default = 1
  endparam

  complex param p4
    caption = "p4"
    default = 1
  endparam

  complex param p5
    caption = "p5"
    default = 3
  endparam

  complex param p6
    caption = "p6"
    default = 2
  endparam
  
  complex param p7
    caption = "p7"
    default = 1
  endparam
  
  Bool param usepixel
    caption = "Use Pixels (C*Seed)"
    default = True
  endparam
}
将就一楼的文件,改变参数,再扫一图:
未命名1.JPG
看不懂源代码,只有欣赏的份儿哟。
看不懂源代码,只有欣赏的份儿哟。
xiaongxp 发表于 2010-8-17 12:41
我也不太懂代码,因为天天看代码,对合面板上的东西,能悟之三四.
代码如下:
bwp4 {
init:
  z = @InitValue
  t = #pixel
loop:
  z = sin(z) - t
  t = 1 / (z * @Value)
bailout:
  |z| < @Bailout  
default:
  title = "BWP 04"
  param InitValue
    caption = "Initial Value"
    default = (0, 0)
  endparam
  param Value
    caption = "Value"
    default = (50, 0)
  endparam
  param Bailout
    caption = "Bailout Value"
    default = 4.0
  endparam
}

未命名1.JPG
未命名2.JPG
BWP 04.gsp (34.31 KB)
未命名3.JPG 将上楼文件放大后,扫出一图:
3# 柳烟


怎么会有那小宝贝出现?改了哪些参数呢?
8# 榕坚
将源文件中的有关sinz、cosz的系数,好象是p3与p7设置为0
代码如下:
bwp7 {
init:
  z = @InitValue
  t = #pixel
loop:
  z = tanh(z) - t
  t = 1 / (z * @Value)
bailout:
  |z| < @Bailout  
default:
  title = "BWP 07"
  param InitValue
    caption = "Initial Value"
    default = (0, 0)
  endparam
  param Value
    caption = "Value"
    default = (50, 0)
  endparam
  param Bailout
    caption = "Bailout Value"
    default = 4.0
  endparam
}
未命名1.JPG
未命名1.JPG
BWP07.gsp (11.47 KB)
返回列表