comment { Davka's coloring algorithms - SpeedAccel provides parameters for gradient speed and acceleration in the style of Fractal Extreme. } SpeedAccel { ; 12Aug02 Davka final: float normiters = real(#numiter) / 100.0 ; "normalized" iteration count float normmax = real(#maxiter) / 100.0 ; "normalized" max # of iterations ; Early attempts, rejected ; #index = normiters / @speed * (1 + normiters / normmax * (@accel - 1)) ; #index = normiters / @speed + normiters / normmax * (@accel - 1) ; #index = (normiters / @speed) ^ (@accel - 1) ; The linear portion of the equation is (normiters / @speed). ; The linear portion is divided by (1 + normiters / normmax) ^ (@accel - 1). ; (1 + normiters / normmax) is always a value between 1 and 2. ; When @accel = 1, (1 + normiters / normmax) ^ (@accel - 1) = 1. ; As @accel increases, it increases the value of (1 + normiters / normmax) ^ (@accel - 1), ; which "slows" the application of the gradient. #index = (normiters / @speed) / (1 + normiters / normmax) ^ (@accel - 1) default: title = "SpeedAccel" param speed caption = "Speed" default = 1.0 endparam param accel caption = "Acceleration" default = 1.0 endparam }