Any chance these Ultrafractal formulae would work in Fractint?
http://formulas.ultrafractal.com/cgi/formuladb?view;file=rvr.ufm;type=.txt --- David W. Jones gnome@hawaii.rr.com exploring the landscape of god http://dancingtreefrog.com Sent from my Android device with F/LOSS K-9 Mail.
Any chance these Ultrafractal formulae would work in Fractint? A quick search found this page: https://www.ultrafractal.com/help/index.html?/help/writing/tips/compatibilit y.html that said:
"The formula compiler is largely compatible with Fractint's parser and most Fractint formulas can be used without modification. There are a few exceptions, however: . . ." I initially thought that you might have a fair chance of success -- but this Ultra Fractal code at the link you gave appears to use labels instead of the single characters that Fractint uses to define the important sections of the formula's code. However, with a little care, it looks like you should be able to convert the Ultra Fractal formula to a Fractint compatible formula... -------------------------------------------------------- ... global: ; This section is executed once per image. float Kreal = real(@Kparam) float Kimag = imag(@Kparam) float Kparam_a = 3.0 * (sqr(Kimag)- sqr(Kreal)) float Kparam_b = -6.0 * Kreal * Kimag init: ; The code in this section is executed once per pixel. ;shared variables float cx = real(#pixel) float cy = imag(#pixel) float tempa float tempb float tempcache ;K escape variables float pos_ftx = Kreal float pos_fty = Kimag float pos_fx2 = sqr(pos_ftx) float pos_fy2 = sqr(pos_fty) ;-K escape variables float neg_ftx = -Kreal float neg_fty = -Kimag float neg_fx2 = sqr(neg_ftx) float neg_fy2 = sqr(neg_fty) loop: ; The code in this section is repeatedly executed, until... ... -------------------------------------------------------- Do a search on: Fractint within the above linked page to see where Fractint is mentioned. Please let us know how this turns out! - Hal Lane ######################## # hallane@earthlink.net ######################## -----Original Message----- From: David W. Jones <gnome@hawaii.rr.com> Sent: Monday, December 19, 2022 3:23 PM To: Fractint List <Fractint@mailman.xmission.com> Subject: [Fractint] Any chance these Ultrafractal formulae would work in Fractint? Importance: High http://formulas.ultrafractal.com/cgi/formuladb?view;file=rvr.ufm;type=.txt --- David W. Jones gnome@hawaii.rr.com exploring the landscape of god http://dancingtreefrog.com Sent from my Android device with F/LOSS K-9 Mail. _______________________________________________ Fractint mailing list -- fractint@mailman.xmission.com To unsubscribe send an email to fractint-leave@mailman.xmission.com
On Mon, 2022-12-19 at 10:23 -1000, David W. Jones wrote:
http://formulas.ultrafractal.com/cgi/formuladb?view;file=rvr.ufm;type=.txt
Short answer is, yes, you can convert them to work in Fractint. They are simulating the use of complex numbers using the float data type, so it is confusing. The variables in the Fractint formula parser are complex numbers. A colon needs to be inserted to separate the per pixel initialization from the loop section. The variable z needs to used for the bailout (|z| < 4) to let Fractint work properly. But |z| = fx2 + fy2, so that part is easy. Haven't noodled my through the rest enough to make it make sense. These appear to be similar to the manzpower and julzpower fractal types with the real part of the exponent set to 3, 4, or 5. I could be wrong, having not noodled enough. Jonathan
Here's what it reads in Ultra Fractal 6 regarding compatibility with the Fractint parser: Compatibility Ultra Fractal 5 accepts almost all formulas written for earlier versions ofUltra Fractal. There are many changes in the compiler since Ultra Fractal 4, but the language has been changed in such a way that existing formulas will still compile. The new language features are accessed with semi-reserved keywords, meaning that you can still use them as variable names. This ensures that there will not be a conflict with existing formulas. There are some minor differences in the compiler since Ultra Fractal 2: - There are a three new keywords: color, heading, and endheading. Variables with these names will have to be renamed. Parameters with these names should not be renamed to avoid breaking backwards compatibility. Instead, add a @ character to the parameter name in the parameter block that describes it, so the compiler will recognize it as a parameter, not as a keyword. For example, "param color" should be changed to "param @color". - Some formulas might not run well with double precision (Ultra Fractal 2 always uses extended precision). In this case, either correct the formula, or adjust the Additional Precision value in the Formula tab of the Layer Properties tool window so extended precision is used. You can verify this in the Statistics tool window. Also see Arbitrary precision. - Built-in functions that can return complex values with float arguments are treated differently. If the return value is assigned to a complex variable, the float argument is converted to complex and the complex version of the function is called instead of the float version. This fixes a number of bugs like: complex c = sqrt(-1) ; should be (0, 1) Unfortunately, sometimes it breaks backwards compatibility because Ultra Fractal 2 would assign an invalid value to c in this case. To work around this, use: float f = sqrt(-1) complex c = f The formula compiler is largely compatible with Fractint's parser and most Fractint formulas can be used without modification. There are a few exceptions, however: - Writing to parameters is not recommended, since Ultra Fractal can perform special optimizations when parameters are read-only. Formulas writing to parameters will be accepted, though. - Writing to predefined symbols that are read-only, such as #pixel, is not allowed. Formulas writing to these predefined symbols will not be accepted. - Formulas using the predefined symbol LastSqr will not be accepted. The usage of LastSqr serves no purpose; it is intended as a speed-up but it only makes formulas run slower (even in Fractint). Furthermore it makes formulas very hard to write and to understand. - Formulas using the function cosxx will not be accepted either. This function results from an early version of Fractint which contained a bug in the cos function. The cosxx function allows you to reproduce this bug in later versions of Fractint. If you still want to use the cosxx function, you can write conj(cos(a)) instead of cosxx(a). - In Fractint, built-in functions with invalid arguments often return other values than in Ultra Fractal. For example. log(0) returns 0 in Fractint, but it returns -infinity in Ultra Fractal. This can cause problems. In general, if a Fractint formula gives a blank screen instead of a fractal, you should check the formula for this kind of errors (log(0), division by zero, recip(0), etc). - Fractint iterates fractal formulas not the number of times given by the maximum iterations value, but one time less. Ultra Fractal does iterate fractal formulas the number of times given by the maximum iterations value. The Fractint PAR import feature in Ultra Fractal takes this into account and subtracts one from the maximum iterations value used by Fractint. Generally, formulas that depend on the forgiving behaviour of Fractint's parser will not be accepted. Often Fractint accepts formulas that contain syntax errors and it will still produce a picture. Ultra Fractal will refuse to load such formulas. This is useful, because it helps you to write clear and understandable formulas, and it might point you in the direction of possible errors. Bob Margolis On Tuesday, December 20, 2022, 5:57:43 PM CST, Jonathan Osuch <osuchj@mediacombb.net> wrote: On Mon, 2022-12-19 at 10:23 -1000, David W. Jones wrote:
http://formulas.ultrafractal.com/cgi/formuladb?view;file=rvr.ufm;type=.txt
Short answer is, yes, you can convert them to work in Fractint. They are simulating the use of complex numbers using the float data type, so it is confusing. The variables in the Fractint formula parser are complex numbers. A colon needs to be inserted to separate the per pixel initialization from the loop section. The variable z needs to used for the bailout (|z| < 4) to let Fractint work properly. But |z| = fx2 + fy2, so that part is easy. Haven't noodled my through the rest enough to make it make sense. These appear to be similar to the manzpower and julzpower fractal types with the real part of the exponent set to 3, 4, or 5. I could be wrong, having not noodled enough. Jonathan _______________________________________________ Fractint mailing list -- fractint@mailman.xmission.com To unsubscribe send an email to fractint-leave@mailman.xmission.com
participants (4)
-
Bob Margolis -
David W. Jones -
Harold Lane -
Jonathan Osuch