Burning Ship Formula

From Ultrafractal Wiki

Jump to: navigation, search

Contents

Burning Ship post from Gerald

The Burning Ship Mandelbrot/Julia by Michael Michelitsch and Otto Roessler is exactly the same as the classic Mandelbrot/Julia with only one tiny alteration:

In the iteration loop change

#z = #z2 + #pixel

to:

#z = abs(#z)2 + #pixel


Literal translation of Michelitsch'/Roessler's formula would be

#z = real(#z) + flip(abs(imag(#z)))
#z = #z2 + #pixel

but as long as #z isn't raised to a power other than 2, the outcome is the same.

Regards,

Gerald

Jody's response

Jody Byrd wrote:


That worked! I knew I was close. Here's some snippets from my loop. I wouldn't have guess to use flip for the i. I thought UF would have #i defined. But now that I think about it, it achieves the same result. So I don't have as many formula questions as I thought.


;orig: z -> (|real(z)| + ( i * |imag(z)|)  ) ^ 2 + c
;#2:   z -> (|x|+i * |y|)2 + c

;attempts:
;z= z+ (|x| + (-1 * |y|) )2 + #pixel
;z = z+ (|real(z)| + ( |imag(z)|)  ) ^ 2 + #pixel

;newz =  (|real(z)| + (real(|imag(z)|))  ) ^ 2 + z
;newz =  (|real(z)| + (imag(|imag(z)|))  ) ^ 2 + #pixel
;newz = z+ (|real(z)| + (imag((0,1)) * |imag(z)|)  ) ^ 2 + #pixel
;newz =  (|real(z)| + (imag((0,1)) * |imag(z)|)  ) ^ 2 + #pixel
;newz =  (|real(z)| + (-1 * |imag(z)|)  ) ^ 2 + z
;newz =  (|real(z)| + (-1 * |imag(z)|)  ) ^ 2 + #pixel
;newz =  (|real(z)| + (1 * |imag(z)|)  ) ^ 2 + #pixel
;newz =  (|real(z)| + (|imag(z)|)  ) ^ 2 + #pixel
;newz =  (|real(#pixel)| + (|imag(#pixel)|)  ) ^ 2 + #pixel
;newz =  (|real(#x)| + (|imag(#y)|)  ) ^ 2 + #pixel
;newz =  (|real(#x)| + (-1 * |imag(#y)|)  ) ^ 2 + #pixel
;newz =  (|imag(#x)| + (|imag(#y)|)  ) ^ 2 + #pixel
;z=newz

;float xip =0
;xip = xi2 - yi2 - #x

;float yip=0
;yip = 2 * ABS(xi * yi) #y

;xi=xip
;yi=yip

Ken's Tip

Jody,


You can also use the constant 1i * x instead of flip(x) if you prefer.


Ken...

Further info from Gerald

It pays to study the manual  ;-)

There's a big section in it called "Writing Formulas", containing everything you need down to a formula language reference.


That certainly doesn't mean you should not experiment - to the contrary; but as long as you are not a little bit comfortable in the language basics, your experience with the formula compiler will be unnecessarily frustrating.


(Lots of attempts snipped...)


Don't forget "|...|" is the modulus-squared operator; that is, |z| translates to sqr(real(z)) + sqr(imag(z)), which means that |real(z)| is the same as sqr(real(z)).

#x and #y are the screen coordinates (column and row number), not the coordinates in the Complex Plane (but #pixel is).


BTW, UF *has* the imaginary unit defined - in a way.

>From the manual: "Alternatively, you can specify an imaginary number by typing the letter i right behind a normal floating-point number."


So writing something like abs(imag(z)) * 1i works, as would abs(imag(z)) * (0,1).


Anyway, don't let the early failures stop you!


Regards,

Gerald

Another response from Jody

I did read the manual. And that formula section. I think it needs a more robust example than the Mandelbrot set. Because it didn't make clear how to write the z=a+bi. I read it that z=a+bi -> z=(a,b). that the i is assumed in the coordinate. Which it is. I didn't see the i constant section until Ken pointed it out, I went back and found it under complex constants.


I just tried the #x and #y when I decided to try c version of the algo. I knew they were screen cords. I just wanted to make sure they didn't include the complex values.


My next question was about the |..| operator. But you answered that. Some of my other snippets did use abs(), but without the i/flip(), they didn't work either.


The multiply by (0,1) was another question


Jody

See Also

Personal tools