Anybody know how to do this?

![663fbcfdcb4f8.gif](serve/attachment&path=663fbcfdcb4f8.gif)
Anybody know how to do this?

No posts to display

Anybody know how to do this?

![663fbcfdcb4f8.gif](serve/attachment&path=663fbcfdcb4f8.gif)
Anybody know how to do this?

0

reply

This might help you: https://en.wikibooks.org/wiki/Fractals/mandelbrot-graphics

I think the code isn't public, but I'm sure Claude would be willing to share or at least talk about it.

This might help you: https://en.wikibooks.org/wiki/Fractals/mandelbrot-graphics
I think the code isn't public, but I'm sure Claude would be willing to share or at least talk about it. :)

0

reply

Interesting link

Seams he had the same idea i mentioned in

https://www.ultrafractal.com/forum/index.php?u=/topic/925/rotation-in-formula/1#post-3001

https://mathr.co.uk/blog/2013-12-16_stretching_cusps.html

.

I ask my self if he found a solution for the bulb size.

It could be that Feigenbaums bifurcation could play a role there...

Interesting link
Seams he had the same idea i mentioned in
https://www.ultrafractal.com/forum/index.php?u=/topic/925/rotation-in-formula/1#post-3001
https://mathr.co.uk/blog/2013-12-16_stretching_cusps.html
.
I ask my self if he found a solution for the bulb size.
It could be that Feigenbaums bifurcation could play a role there...

0

reply

He's active in the Fractal Chats discord, feel free to join. Lots of happy nerd stuff going on there. Here's the invite link in case you are interested.

Everyone else is welcome too, ofc!

He's active in the Fractal Chats discord, feel free to join. Lots of happy nerd stuff going on there. Here's the invite link in case you are interested.
https://discord.gg/DrxFcsRA
Everyone else is welcome too, ofc! :)

0

reply

Tanks much!

(I am not a mathematician, not sure if they want me there...)

I found in his codes a solution for the bulb size correction, in case you are still interested.

https://github.com/adammaj1/Mandelbrot-book-book

There is a algo in m_nucleus, it searches the center of a bulb. With the center and the base of the bulb the size is calculable, even if the bulbs are not perfect circles.

with this size estimation

sin(pi * n/d) / (d ^ 2)

you can define the c0 as a start for the search, it comes actually very close.

(There is probable a more elegant way to calculate the bulb size, and my codes are ugly as hell, but for now i solve a problem after 35 years i tried the first time...)

Tanks much!
(I am not a mathematician, not sure if they want me there...)
I found in his codes a solution for the bulb size correction, in case you are still interested.
https://github.com/adammaj1/Mandelbrot-book-book
There is a algo in m_nucleus, it searches the center of a bulb. With the center and the base of the bulb the size is calculable, even if the bulbs are not perfect circles.
with this size estimation
sin(pi * n/d) / (d ^ 2)
you can define the c0 as a start for the search, it comes actually very close.
(There is probable a more elegant way to calculate the bulb size, and my codes are ugly as hell, but for now i solve a problem after 35 years i tried the first time...)

0

reply

The code is public, it just took some search effort.

https://mathr.co.uk/source-codes/mandelbrot-numerics.pdf

https://mathr.co.uk/source-codes/mandelbrot-graphics.pdf

https://mathr.co.uk/source-codes/mandelbrot-web.pdf

etc (insert name-of-include in the pdf filename)

The code is public, it just took some search effort.
https://mathr.co.uk/source-codes/mandelbrot-numerics.pdf
https://mathr.co.uk/source-codes/mandelbrot-graphics.pdf
https://mathr.co.uk/source-codes/mandelbrot-web.pdf
etc (insert name-of-include in the pdf filename)

0

reply

huu, i was searching around the website but i missed the pdfs, tanks!

huu, i was searching around the website but i missed the pdfs, tanks!

0

reply

In the end, mathr.co.uk didn't help me one iota.

How I tackled this is first by taking the transform **pdf.uxf/pgd_UnrollCardioid**

It has a very simple formula `(1 - sqr((0,1)*(4/(#pixel-(0,2))-(0,1))-1))/4`

This is only one-way, but I experimented with every value in it a bit, and decided it was easiest to leave it, especially since WolframAlpha managed to simplify it to something as small as `1/sqr(#pixel) + 1/4`

. Notice here that 1/4 is the center of the cardioid, so I replaced it with a param.

Then the search for the inverse of that formula started, and it was just a matter of reversing the operations, and taking into account that a square root has two answers (this bit me at first, but visually stacking the forward and reverse transforms made clear the domain split was on the X axis): `±sqrt(1/(#pixel - @center))`

Finally, rotation is simply horizontal shifting of the unrolled cardioid, so I added that as a conditional variable, only visible when the transform is in 'reverse' mode. This made clear that either (or both) transforms were inverted along the Y axis (in mandelbrot space) or X axis (in unrolled space). Actually it was both, and had to add a temp variable that inverted the shift if it was in the upper-right or lower-left quadrant.

```
unroll-test {
::J36s9jn29OVzuxJMQ47Ix7glz5l1wCLZTlliSbO2LdfAq8iHA3Ysp2DJ72n+OQJbialq6pyJ
br57n5bYaDqGUZvLNhxQDaBJfyF8W7GEiIn9iRj9ybFCWPY66xljW1FIEl5s2gaAiyyaW7YU
WNTSTA0GMK5/wPs50H2vNf/2CRRJPNZB2iSNqR04dS+Dqmn6C+Jnmz8jqGDeRmTKMAYvXLHm
soZUFjpJDqxRjr7XwBHCB5ms6qtUtqOnMPb3/83SvGUuYrPMElFpJXvtQfrxCOqxk8hvpZjB
zzKEymO3yZkwhLS+nVONYPF84HVBtxb0fxjq5WiPTw4XXdoIrgcYmgeJAPTZGIvAx5beUyF3
fj44xdUXc/Nll57F8/rOx5XNC9caysmTW1isDqzmZQFVU9QopHaeSSTpu+35ojIJNpZ2U7wi
W/hj4E/RUFIF2OL8o/lZSXOfSZs+JUmXcbaixFNa4u3mLUZOvDYRv1ollFHKPIyr3T2kwctW
NQ4ofY4lLBZlYNGfk/GNxvHYBYEUIx4fJSbsXj0HAka+PZIr7agHjoZQh+waeu2EzRWXQpNE
oFzEH8eaThC1w6Ag2PMUUcWKYNernmBr33d4w6L57rrrLypFn1f+/NqeF/rrGFVUp/UfQxy0
}
mjd_private.uxf:MandelbrotCardioidRotation {
; Transforms between Mandelbrot's cardioid coordinates <-> cartesian coordinates.
;
; 20240615 Mark jeronimus <mark.jeronimus@gmail.com>
::wtUIvhn2NGVyONMMQ07Ix/wQ4SCQaTRiLgKEpeGhEifgpxjLWyxOMxg4zH7k4sIyhezzybZe
2xopVa56Hv8CAUS4qSm+h4WKUDw1NqfJNsH2tt9LOtvMDuFKrIjj4wWkOutUbRHwWXfpnOmQ
dE1Nqa80IFPvHK6XDCI8SUOCcix4s8ZDNClcVBWw5oz9+2lub7wSQe06ZhzYVJHhmfmYjOa4
hgk43aXXk6UON5pK5V0II9xw5cAZhyqEwHx0PJsaDyYNMlrAUhNOl1EgfordSf/BB89TL2c/
D3BFbKygnejVnUGwKB3nEMTQJjVOUPYxOdmEcx/9MFfvv/L/TTJOkVrwVMSm78416HihmJxU
DPqJR3H/cLMJk/qWKzfAvg7w5A==
}
mjd_private.ucl:BetterDistanceEstimator(OUTSIDE) {
;
; Written by Damien M. Jones
; Improved by Mark Jeronimus
;
::EK4X7in21AVwqNMMM07By/gI5SaXX7yOOYwYsub72OOKomo0YwxKzWm12v+pY3a8B/kevney
GnRepsAgOea2Snh+rwrQT7G4pVlFWmnTdTVfbm/j8wao+6hmM4x2VKW7+A0WWMYcoNxv246V
zUny8Wb5TNd4xQT91VLSu/G2lf2rlP00uLTfhR4Xv0UPhncaQ6pBMazJVMilUrrenERzzHmg
guOC2HEzEKsvah2M6xJIZ3CU3QcWMsbR5+zzsjcSVuzN31OPv9pcpRjbBX99oJAhROa7hjEE
IBEG0p0NCyIB0NnAeIh/JL/+Zg9TRLCX4IgeCiBj70W4T2Dfh6Xk9onlNqSdK6NGio1eRjRK
ZkrPtFlF/znO9JL=
}
```

NB: My BetterDistanceEstimator isn't related to this transformation. I'm just animating the density along with the rotation.

In the end, mathr.co.uk didn't help me one iota.
How I tackled this is first by taking the transform **pdf.uxf/pgd_UnrollCardioid**
It has a very simple formula `(1 - sqr((0,1)*(4/(#pixel-(0,2))-(0,1))-1))/4`
This is only one-way, but I experimented with every value in it a bit, and decided it was easiest to leave it, especially since WolframAlpha managed to simplify it to something as small as `1/sqr(#pixel) + 1/4`. Notice here that 1/4 is the center of the cardioid, so I replaced it with a param.
Then the search for the inverse of that formula started, and it was just a matter of reversing the operations, and taking into account that a square root has two answers (this bit me at first, but visually stacking the forward and reverse transforms made clear the domain split was on the X axis): `±sqrt(1/(#pixel - @center))`
Finally, rotation is simply horizontal shifting of the unrolled cardioid, so I added that as a conditional variable, only visible when the transform is in 'reverse' mode. This made clear that either (or both) transforms were inverted along the Y axis (in mandelbrot space) or X axis (in unrolled space). Actually it was both, and had to add a temp variable that inverted the shift if it was in the upper-right or lower-left quadrant.
![666e1349938c1.gif](serve/attachment&path=666e1349938c1.gif)
````
unroll-test {
::J36s9jn29OVzuxJMQ47Ix7glz5l1wCLZTlliSbO2LdfAq8iHA3Ysp2DJ72n+OQJbialq6pyJ
br57n5bYaDqGUZvLNhxQDaBJfyF8W7GEiIn9iRj9ybFCWPY66xljW1FIEl5s2gaAiyyaW7YU
WNTSTA0GMK5/wPs50H2vNf/2CRRJPNZB2iSNqR04dS+Dqmn6C+Jnmz8jqGDeRmTKMAYvXLHm
soZUFjpJDqxRjr7XwBHCB5ms6qtUtqOnMPb3/83SvGUuYrPMElFpJXvtQfrxCOqxk8hvpZjB
zzKEymO3yZkwhLS+nVONYPF84HVBtxb0fxjq5WiPTw4XXdoIrgcYmgeJAPTZGIvAx5beUyF3
fj44xdUXc/Nll57F8/rOx5XNC9caysmTW1isDqzmZQFVU9QopHaeSSTpu+35ojIJNpZ2U7wi
W/hj4E/RUFIF2OL8o/lZSXOfSZs+JUmXcbaixFNa4u3mLUZOvDYRv1ollFHKPIyr3T2kwctW
NQ4ofY4lLBZlYNGfk/GNxvHYBYEUIx4fJSbsXj0HAka+PZIr7agHjoZQh+waeu2EzRWXQpNE
oFzEH8eaThC1w6Ag2PMUUcWKYNernmBr33d4w6L57rrrLypFn1f+/NqeF/rrGFVUp/UfQxy0
}
mjd_private.uxf:MandelbrotCardioidRotation {
; Transforms between Mandelbrot's cardioid coordinates <-> cartesian coordinates.
;
; 20240615 Mark jeronimus <mark.jeronimus@gmail.com>
::wtUIvhn2NGVyONMMQ07Ix/wQ4SCQaTRiLgKEpeGhEifgpxjLWyxOMxg4zH7k4sIyhezzybZe
2xopVa56Hv8CAUS4qSm+h4WKUDw1NqfJNsH2tt9LOtvMDuFKrIjj4wWkOutUbRHwWXfpnOmQ
dE1Nqa80IFPvHK6XDCI8SUOCcix4s8ZDNClcVBWw5oz9+2lub7wSQe06ZhzYVJHhmfmYjOa4
hgk43aXXk6UON5pK5V0II9xw5cAZhyqEwHx0PJsaDyYNMlrAUhNOl1EgfordSf/BB89TL2c/
D3BFbKygnejVnUGwKB3nEMTQJjVOUPYxOdmEcx/9MFfvv/L/TTJOkVrwVMSm78416HihmJxU
DPqJR3H/cLMJk/qWKzfAvg7w5A==
}
mjd_private.ucl:BetterDistanceEstimator(OUTSIDE) {
;
; Written by Damien M. Jones
; Improved by Mark Jeronimus
;
::EK4X7in21AVwqNMMM07By/gI5SaXX7yOOYwYsub72OOKomo0YwxKzWm12v+pY3a8B/kevney
GnRepsAgOea2Snh+rwrQT7G4pVlFWmnTdTVfbm/j8wao+6hmM4x2VKW7+A0WWMYcoNxv246V
zUny8Wb5TNd4xQT91VLSu/G2lf2rlP00uLTfhR4Xv0UPhncaQ6pBMazJVMilUrrenERzzHmg
guOC2HEzEKsvah2M6xJIZ3CU3QcWMsbR5+zzsjcSVuzN31OPv9pcpRjbBX99oJAhROa7hjEE
IBEG0p0NCyIB0NnAeIh/JL/+Zg9TRLCX4IgeCiBj70W4T2Dfh6Xk9onlNqSdK6NGio1eRjRK
ZkrPtFlF/znO9JL=
}
````
NB: My BetterDistanceEstimator isn't related to this transformation. I'm just animating the density along with the rotation.

edited Jun 15 at 11:35 pm

0

reply

Ohh, Tans much! i could not get it done until now.

(You have to be a skilled mathematician to get attention i think.)

I had my time with the distance coloring too. Here is my variant. The hard one should not need to much correction over rotation.

(i translate it from CP, but should work.)

```
mjd_private.ucl:BetterDistanceEstimatorNew(OUTSIDE) {
init:
complex dz = (1, 0)
loop:
; dz = @power * #z^(@power-1) * dz + 1
dz = (dz * #z ^ (@power - 1) * @power) + 0
final:
; #index = (@power*log(cabs(#z)) * cabs(#z) / cabs(dz))^(1/@power) * sqrt(#magn)
float value
if (@distance == "Soft")
value = (real(@power) * log(cabs(#z)) * cabs(#z) / cabs(dz) * #magn) ^ (1 / real(@power))
value = sqrt(value) * @density
else
dz = @power * #z * log(cabs(#z)) / dz
value = cabs(dz) * #magn * #width * @density
if (value >= 0.98) ;Limit Correction
value = 0.98
endif
endif
#index = value
default:
title = "Better Distance Estimator New"
param power
caption = "Exponent"
default = 2.0
hint = "This should be set to match the exponent of the \
formula you are using. For Mandelbrot, this is usually 2."
endparam
int param distance
caption = "Distance"
default = 1
enum = "Soft" "Hard"
endparam
float param density
caption = "Density"
default = 1.0
endparam
}
```

Ohh, Tans much! i could not get it done until now.
(You have to be a skilled mathematician to get attention i think.)
I had my time with the distance coloring too. Here is my variant. The hard one should not need to much correction over rotation.
(i translate it from CP, but should work.)
````
mjd_private.ucl:BetterDistanceEstimatorNew(OUTSIDE) {
init:
complex dz = (1, 0)
loop:
; dz = @power * #z^(@power-1) * dz + 1
dz = (dz * #z ^ (@power - 1) * @power) + 0
final:
; #index = (@power*log(cabs(#z)) * cabs(#z) / cabs(dz))^(1/@power) * sqrt(#magn)
float value
if (@distance == "Soft")
value = (real(@power) * log(cabs(#z)) * cabs(#z) / cabs(dz) * #magn) ^ (1 / real(@power))
value = sqrt(value) * @density
else
dz = @power * #z * log(cabs(#z)) / dz
value = cabs(dz) * #magn * #width * @density
if (value >= 0.98) ;Limit Correction
value = 0.98
endif
endif
#index = value
default:
title = "Better Distance Estimator New"
param power
caption = "Exponent"
default = 2.0
hint = "This should be set to match the exponent of the \
formula you are using. For Mandelbrot, this is usually 2."
endparam
int param distance
caption = "Distance"
default = 1
enum = "Soft" "Hard"
endparam
float param density
caption = "Density"
default = 1.0
endparam
}
````

0

reply

I always try to expand the formulas so i can use it for higher powers. In case you are interested, here some work in progress.

In this case higher powers not work jet, the formula must be made fit for Epicycloid.

But, center is calculated, sign simplified, rotation slowed down, formula combined.

```
complex center = (1 / @power) ^ (@power / (@power - 1)) ; Center shift for any power
if (@rollBack)
float r = sqrt(abs(@rot))
float sig = 1
if (imag(c) < 0), sig = -sig ,endif
if (@rot < 0), sig = -sig ,endif
c = (1 / (c - center)) ^ (1 / @power) + (r * sig) ; Roll up to Cardioid
endif
c = (1 / c^@power) + center ; Unroll to Line
```

I always try to expand the formulas so i can use it for higher powers. In case you are interested, here some work in progress.
In this case higher powers not work jet, the formula must be made fit for Epicycloid.
But, center is calculated, sign simplified, rotation slowed down, formula combined.
complex center = (1 / @power) ^ (@power / (@power - 1)) ; Center shift for any power
if (@rollBack)
float r = sqrt(abs(@rot))
float sig = 1
if (imag(c) < 0), sig = -sig ,endif
if (@rot < 0), sig = -sig ,endif
c = (1 / (c - center)) ^ (1 / @power) + (r * sig) ; Roll up to Cardioid
endif
c = (1 / c^@power) + center ; Unroll to Line

0

reply

221

views
9

replies
3

followers
Your previous draft for topic is pending

If you continue, your previous draft will be discarded.

Cancel

Add

Cancel

Upload

All posts under this topic will be **deleted** ?

Cancel

Delete

Pending draft ... Click to resume editing

Discard draft