返回列表 回复 发帖
20# xiaongxp
向老师新年快乐!晚上无事,又无睡意,对打麻将等又没兴趣,看看电视,玩玩电脑,混时间呗。
Mandelbrot {
;
; Generic Mandelbrot set.
;
init:
  z = @start
  c= #pixel
  x=real(c)
  y=imag(c)
  int k=0
  while (k<@TH)
  x=abs(x)-2.5
  y=abs(y)-2
  k = k+1
  endwhile
  x=abs(x)-2
  y=abs(y)-1
  c=x+flip(y)
loop:
  z = z^@power + c
bailout:
  |z| <= @bailout
default:
  title = "Mandelbrot"
  center = (-0.5, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param start
    caption = "Starting point"
    default = (0,0)
    hint = "The starting point parameter can be used to distort the Mandelbrot \
            set. Use (0, 0) for the standard Mandelbrot set."
  endparam
  param power
    caption = "Power"
    default = (2,0)

  endparam
  param TH
    caption = "th"
    default = 5

  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}
2.gif
如何将一个乌龟通过变换,变成指针均往左或右的乌龟阵势?有了点想法,但不知能否实现。
23# 柳烟

未命名2.gsp (3.75 KB)

未命名3.gsp (14.68 KB)

24# zhongba
谢谢精妙文件,设计十分巧妙。
24# zhongba
精简了一下

M集阵列.gsp (12.35 KB)

20日凌晨再精简

受24楼文件启发:
Mandelbrot同向阵列 {

init:
  z = @start
  c= #pixel
  x=real(c)
  y=imag(c)
  x=x+13-trunc(x+13)
  y=y+13-trunc(y+13)
  c=4*(x+flip(y)+(-0.7,-0.5))
loop:
   z = z^@power + c
bailout:
  |z| <= @bailout
default:
  title = "Mandelbrot同向阵列"
  center = (0, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param start
    caption = "Starting point"
    default = (0,0)
    hint = "The starting point parameter can be used to distort the Mandelbrot \
            set. Use (0, 0) for the standard Mandelbrot set."
  endparam
  param power
    caption = "Power"
    default = (2,0)

  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam

}
Fractal2.png
将就原M集,加点变换:
3.gif
M集(20150219同向乌龟阵).gsp (15.94 KB)
M集反向乌龟阵UF法:
Mandelbrot阵列 {
;
; Generic Mandelbrot set.
;
init:
  z = @start
  c= #pixel
  x=tan(cos(real(c)))-1
  y=tan(cos(imag(c)))
  c=x+flip(y)
loop:
  z = z^@power + c
bailout:
  |z| <= @bailout
default:
  title = "Mandelbrot反向乌龟阵"
  center = (-0.5, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param start
    caption = "Starting point"
    default = (0,0)
    hint = "The starting point parameter can be used to distort the Mandelbrot \
            set. Use (0, 0) for the standard Mandelbrot set."
  endparam
  param power
    caption = "Power"
    default = (2,0)
    hint = "This parameter sets the exponent for the Mandelbrot formula. \
            Increasing the real part to 3, 4, and so on, will add discs to \
            the Mandelbrot figure. Non-integer real values and non-zero \
            imaginary values will create distorted Mandelbrot sets. Use (2, 0) \
            for the standard Mandelbrot set."
  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
switch:
  type = "Julia"
  seed = #pixel
  power = power
  bailout = bailout
}
Fractal4.png
M集阵列2.jpg
M集阵列2.gsp (12.44 KB)
返回列表