Writing Formulas
Questions and discussion regarding writing Ultra Fractal formulas and classes.
52
Topics
207
Posts
6
Followers
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
Phillip posted Aug 24 at 8:13 am
Hello,

I am writing a coloring algo at the moment and I tried using min(val1, val2) where val1 and val2 are two floating point values, and the function does not exist (error: invalid function). So I went looking for an equivalent function and I cannot find one. Does UF not have such a fucntion? It seems like such a basic thing. Am I just overlooking something?

Phillip

2replies
28views
recent by Phillip  ·  Aug 25 at 7:22 am
Phillip posted Apr 5 at 8:55 am
Hello,

I have been working with a formula for a while, which I have been calling Mandalamandelbrot and Mandaljulia, because it creates nice patters with circular symmetries depending on the location and parameters used. Here are a few examples:
https://www.deviantart.com/rychveldir/art/Almond-Ship-931583199
https://www.deviantart.com/rychveldir/art/Mandala-Chain-912805646
https://www
2replies
114views
recent by Phillip  ·  Apr 26 at 8:41 am
physicist posted Sep 22 '22 at 7:54 pm
The built-in functions include round, floor, ceil, and trunc. Trunc rounds towards zero. For floats, the behavior of trunc is equivalent to the following:

float func trunc(float x)
if x >= 0
return floor(x)
else
return ceil(x)
endif
endfunc
There is no equivalent function with < instead of >. In mathematics, I haven't even found a name for this. The best name that I cou
5replies
123views
recent by physicist  ·  Apr 5 at 12:33 pm
crystalwizard posted Feb 4 at 10:29 pm

"A simple formula produces strange and unpredictable forms ⁠— wispy, chaotic ghosts composed of 10 million points. "

https://fronkonstin.com/2017/11/07/drawing-10-million-points-with-ggplot-clifford-attractors/

and the formulas are incredibly simple

6replies
112views
recent by physicist  ·  Feb 9 at 12:45 pm
physicist posted Nov 2 '22 at 12:08 am
I'm contemplating writing a new mapping formula. I could write this as a transformation in a uxf file, or use Plug-In Transformation from Standard.ulb and write a UserTransformation to go in my ulb file.

So far, I don't see any advantages to doing it one way or the other. Comments?

3replies
85views
recent by physicist  ·  Nov 10 '22 at 8:56 pm
I have a problem. I tried using perturbation theory for the Magnet Mandelbrot type I fractal, but after going a quadrillion zooms, the image becomes... well, you know what happens.

The code:

Magnet1Mandelbrot {
;
; Magnetic Mandelbrot set type 1. Use Switch Mode to select a
; magnetic Julia set.
;
init:
z = @start
c = #pixel
x = real(z)
y = imag(z)
i = sqrt(-1)
loop:
z =
9replies
230views
recent by Alexandre Vachon  ·  Oct 28 '22 at 4:29 pm
Alexandre Vachon posted Oct 7 '22 at 11:52 pm
Has anyone tried to make a fractal from the Jenkins-Traub algorithm?
https://en.wikipedia.org/wiki/Jenkins%E2%80%93Traub_algorithm

0replies
35views
Alexandre Vachon posted Sep 17 '22 at 12:20 pm
Does anyone know how to write the colouring algorithm in the following link: https://fractalforums.org/index.php?topic=368.msg27841#msg27841
into Ultra Fractal code? Some help would be appreciated.

1replies
66views
recent by physicist  ·  Sep 17 '22 at 8:22 pm
physicist posted Jul 14 '22 at 6:35 pm
The compiler objects to the continuation character in the example below, says it's not a valid character there. The truth is that the comment is not allowed there (should it be allowed there?), and the error message is wrong.

param enum F
caption = "F"
enum = "a" \ ; comment
"b"
endparam
It's fine without the comment.

param enum F
caption = "F"
enum = "a" \
"b"
4replies
102views
recent by Frederik Slijkerman  ·  Aug 2 '22 at 1:30 pm
Spizzi posted Jun 23 '22 at 5:36 pm
Hi All,
I'm working on a new game The formula is TMan in Russell Walsmith orgform.
Basically is my SlopeTMan that i'm rewritng and re-structured but i have a problem.
I have implemented the TMan of Russell and i added also a normal Mandelbrot that i attach under.
In your opinion is it correct?
That parameter is correct?
Try it to p1 (0.0 , 0.1), you will see the black line, i t
6replies
176views
recent by Spizzi  ·  Jul 2 '22 at 6:12 pm
Spizzi posted Jun 20 '22 at 1:29 am
This is wonderful, at the left of the JPEG we have SlopeTMan in as.ufm created in 2006 and at the right of the jpeg and we have a new version that i'm doing in these days, look the difference of the slope color, in the right is correct but in the left no, or better, it's correct also in the left, because in fractals there are always new combinations, but in the right is the correct use of the 3D
0replies
59views
Hi all,
I write this because some time ago while i was working on my formulae i don't know how, probabily with a strange combination of keybord, i don't know, but i was able to use the funzion BLOCK SELECTION, i don't know if you know what i mean, closing UF i lost that and i didn't able to replicate because UF doesn't have block selection.
So i ask if it's possible to insert this function
0replies
46views
physicist posted Feb 24 '22 at 2:49 pm
I'm confused. What should go in place of * in the code below? Or is this not the way to do this?

class cTweak {

public:
import "common.ulb"

func cTweak()
cTransform = new @cUT(***)
endfunc

complex func go(complex v)
return cTransform.Iterate(v)
endfunc

protected:
UserTransform cTransform

default:
UserTransform param cUT
caption = "c-tweak transform"
defa
2replies
70views
recent by physicist  ·  Feb 25 '22 at 12:18 pm
physicist posted Oct 30 '20 at 4:04 pm
I'm debugging a new formula. All the printing so far is in the constructor. I get many more lines of printing than I expected, some of the same things over and over.

I thought that the constructor was only invoked once.

When is it really invoked? How can I avoid the excess printing?

2replies
33views
recent by physicist  ·  Oct 31 '20 at 10:43 am
Otto Magus posted Feb 9 '20 at 3:15 pm
I've been having problems with what I believe are artifacts. They seem to have some connection with function settings, particularly exp, and cotan, cotanh, tan, tanh, cos, cosh, sin, sinh.

Here's an example from om.ulb, featuring a transform which maps according to various combinations of functions:
artifact1 {
fractal:
title="artifact1" width=1024 height=768 layers=1
credits="Ot
2replies
172views
recent by Otto Magus  ·  Feb 28 '20 at 3:21 pm
aelah posted Dec 17 '19 at 7:11 am
The Absolute Julia transformation is made by taking a fractal and mapping each coordinate to its square root.

Absolute Julia {
transform:
#pixel = sqr(#pixel)
}

0replies
85views
physicist posted Nov 8 '19 at 12:46 am
I have a formula and want to add a new parameter to it without breaking past fractals. The formula has a version number in it, such as this declaration in the default section:

int param v_SFormula
caption = "Version (SFormula)"
default = 100
visible = @v_SFormula < 100
endparam
If the new version of the formula has "default = 101", how do I put in the ne
4replies
136views
recent by Otto Magus  ·  Dec 4 '19 at 12:57 pm