- UID
- 7
- 帖子
- 2888
- 精华
- 10
- 积分
- 2836
|
448# mjj_ljh
还不是很成熟,这种效果我很早以前就一直想效仿,但总不成功,之前常老师也研究过效果好象更好。它是UF中的一个着色特效,代码如下:
Triangle {
;
; Variation on the Triangle Inequality Average coloring method
; from Kerry Mitchell. The smoothing used here is based on the
; Smooth formula, which only works for z^n+c and derivates.
;
; Written by Damien M. Jones
;
init:
float sum = 0.0
float sum2 = 0.0
float ac = cabs(#pixel)
float il = 1/log(@power)
float lp = log(log(@bailout)/2.0)
float az2 = 0.0
float lowbound = 0.0
float f = 0.0
BOOL first = true
loop:
sum2 = sum
IF (!first)
az2 = cabs(#z - #pixel)
lowbound = abs(az2 - ac)
sum = sum + ((cabs(#z) - lowbound) / (az2+ac - lowbound))
ELSE
first = false
ENDIF
final:
sum = sum / (#numiter)
sum2 = sum2 / (#numiter-1)
f = il*lp - il*log(log(cabs(#z)))
#index = sum2 + (sum-sum2) * (f+1)
default:
title = "Triangle Inequality Average"
helpfile = "Uf*.chm"
helptopic = "Html/coloring/standard/triangleinequalityaverage.html"
$IFDEF VER50
rating = recommended
$ENDIF
param power
caption = "Exponent"
default = 2.0
hint = "This should be set to match the exponent of the \
formula you are using. For Mandelbrot, this is usually 2."
endparam
param bailout
caption = "Bailout"
default = 1e20
min = 1
$IFDEF VER40
exponential = true
$ENDIF
hint = "This should be set to match the bail-out value in \
the Formula tab. Use a very high value for good results."
endparam
}
下面是我根据这段代码做的结果,请梅老师看能否将它完善。 |
-
-
未命名1.gsp (21.66 KB)
|