这是UF中关于四元数分形的范例,代码太简单了,但是看不懂。看来还得再来一次协作:
REB_3DFractalRayTrace {
;
$define debug
global:
import "common.ulb"
import "reb.ulb"
REB_3DFractalRayTrace f = new @formulaClass(0)
init:
#z = f.Init(#pixel)
loop:
#z = f.Iterate(#z)
bailout:
!f.IsBailedOut(#z)
default:
title = "3D Fractal Raytrace (UF5)"
maxiter = 100
center = (0, 0)
periodicity = 0
method = multipass
int param v_3DFractalRaytrace
caption = "Version (3DFractalRaytrace)"
default = 100
hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
visible = @v_3DFractalRaytrace < 100
endparam
REB_3DFractalRayTrace param formulaClass
caption = "3D Fractal Raytrace"
default = REB_3DFractalRayTrace
selectable = false
endparam
}
迭代20次的图形: