12# 榕坚
不同的着色模式,引发不同的视觉冲击。再扫一图:
特效代码如下:
FamilyGradient(BOTH) {
; By Samuel Monnier, 20.3.00
; Designed for the "Familly formulas"
; (Julifamilly and Pcfamilly in my file
; and Pinskyfamilly in kpk.ufm.
init:
complex z = pixel
complex zc = 0
loop:
final:
z = z - @tilem
z = z*exp(1i*pi/180*@rottile)
zc = round(z/@sizesq)*@sizesq
z = z*exp(-1i*pi/180*@rottile)
zc = zc*exp(-1i*pi/180*@rottile)
z = z + @tilem
zc = zc + @tilem
z = 2*(z - zc)/@sizesq
z = z*exp(1i*pi/180*@rottile)
if @mode == 0
#index = cabs(z)
elseif @mode == 1
float x = abs(real(z))
float y = abs(imag(z))
if x > y
#index = x
else
#index = y
endif
endif
default:
title = "Gradient for <<Familly>>"
helpfile = "sam-help/variouscol.htm"
helptopic = "gradforfam"
param mode
caption = "Gradient Mode"
default = 1
enum = "Circles" "Squares"
endparam
param tilem
caption = "Tiling displacement"
default = (0,0)
endparam
param sizesq
caption = "Size of the tiles"
default = 0.6
endparam
param rottile
caption = "Tiling rotation"
default = 0.0
endparam
} |