Title: Ultra Fractal Coloring Converter Post by: fractalwizz on October 21, 2008, 03:19:28 AM cp_19407 {
complex dz; parameter double power; void init(void) { dz=0; } void loop(void) { dz= power*z*(power-.9)*dz+(power^z); } void final(void) { index=abs(z/dz)^(1/exp(power)) * log(numiter); } void description(void) { this.title = "DE Variation - use with Cuberoot coloring at 200"; this.helpfile = "dmj-pubdmj-pub-uf-dem.htm"; power.caption = "Exponent"; power.default = 1.93; power.hint = "You can adjust this to your needs, but 1.93 gives you the best results."; } } Could someone convert this coloring from ChaosPro into something that Ultra Fractal can use? Very much appreciated. Title: Re: Ultra Fractal Coloring Converter Post by: David Makin on October 21, 2008, 01:21:33 PM Hi, This is it I think:
FractalWhizz1 { init: complex dz = (0,0) int i = 0 ; Note you may need i = 1 instead of i = 0 loop: dz = @power*#z*(@power-0.9)*dz+(@power^#z) i = i + 1 final: #index = real(abs(#z/dz)^(1/exp(@power)) * log(i)) ; maybe you want "cabs" instead of "real" ? default: title = "For FractalWhizz"; float param power caption = "Exponent" default = 1.93 hint = "You can adjust this to your needs, but 1.93 gives you \ the best results."; endparam } Title: Re: Ultra Fractal Coloring Converter Post by: David Makin on October 21, 2008, 01:50:31 PM Hi,
Just wondering if you made a typo in your version - should: "z*(@power-0.9)" be "z^(@power-0.9)" Title: Re: Ultra Fractal Coloring Converter Post by: cKleinhuis on October 21, 2008, 06:20:05 PM ok, here we go, as ultrafractal 5 object:
Code: class ForFractalWhizz(common.ulb:GradientColoring) {Title: Re: Ultra Fractal Coloring Converter Post by: fractalwizz on October 21, 2008, 06:22:28 PM Hi.
"z*(@power-0.9)" be "z^(@power-0.9)" That isn't a typo. In ChaosPro, it takes an image at e+13, 14 second longer with z^(@power-0.9) than with z*(@power-0.9). Both generate the same result but * instead of ^ is more efficient. Also, thanks for the conversion. I will post back if it doesn't work. Title: Re: Ultra Fractal Coloring Converter Post by: fractalwizz on October 21, 2008, 06:23:32 PM Reply for Trifox.
How would you put what you gave me into Ultra Fractal to make it work? Title: Re: Ultra Fractal Coloring Converter Post by: cKleinhuis on October 21, 2008, 06:37:52 PM well, uf works with formula files, the best thing would be to create a file in the following path:
C:\Documents and Settings \[]yourusername]\Own Files\Ultra Fractal 5\Formulas\Public named FractalWhizz.ulb - this would then be a ultrafractal library file then copy the above formula into the file, be sure, that it is in the right folder, in german it is: C:\Dokumente und Einstellungen\hugo2\Eigene Dateien\Ultra Fractal 5\Formulas\Public you should be aware of where application data is stored on your computer... so, after that open uf5 with the default fractal, then choose as coloring algorithm: "Generic Coloring Gradient " and after that, you have below a knob for choosing a different generic formula for coloring, then you browse to /public/Fractalwhizz and there you shoudl find a coloring method named: "ForFractalWhizz" i did it the same way :D if you need help finding the public formula folder on your harddisk you can try to search for "common.ulb" on your computer Title: Re: Ultra Fractal Coloring Converter Post by: David Makin on October 21, 2008, 07:47:08 PM Hi. "z*(@power-0.9)" be "z^(@power-0.9)" That isn't a typo. In ChaosPro, it takes an image at e+13, 14 second longer with z^(@power-0.9) than with z*(@power-0.9). Both generate the same result but * instead of ^ is more efficient. Also, thanks for the conversion. I will post back if it doesn't work. Actually they may generate a similar result when "power" is close to 1.9 since then (power-0.9) is about 1 but change the power value and the results will vary considerably depending whether you use "^" or "*" :) Title: Re: Ultra Fractal Coloring Converter Post by: fractalwizz on October 22, 2008, 02:57:29 AM I got it to work. Many Thanks. In case you were wondering, this is a variation of the Distance Estimator Coloring algorithm.
:dink: Title: Re: Ultra Fractal Coloring Converter Post by: David Makin on October 22, 2008, 03:41:00 PM I got it to work. Many Thanks. In case you were wondering, this is a variation of the Distance Estimator Coloring algorithm. :dink: I figured it was :) That's why I suggested the possible typo - for distance estimation to work properly for z^p+c with powers other than 2 it really does have to be "^" not "*". What I would do is have a conditional calculation based on the power value and omit the (p-0.9) - originally (p-1) - part altogether depending on the value of p. Note that if you use "if @p==value....else.....endif" then there's no overhead at runtime because UF pre-compiles out conditionals that depend on values known at compile time e.g. parameter values. |