• May 22, 2022, 10:00:29 AM

Author Topic:  Rendering Kleinian limit sets in blender  (Read 706 times)

0 Members and 1 Guest are viewing this topic.

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Rendering Kleinian limit sets in blender
« on: February 14, 2022, 05:40:09 PM »
Greetings everybody!

Recenty I started to play with blender shader nodes and i had a great streak of success in recreating all kinds of fractals. Mandelbrot, Julia, Newton, Burning ship, Conjugated julia. Inverse Mandelbrot, Sierpinski, Coch curve and so on were relatively easy to implement. Sometimes just luck, sometimes deeper research and sometimes clear understanding of the formulas, math required to generate the fractals were enough to bring all of those fractals to life in those shader nodes. Without any scripting and so on.

Now I want to recreate kleinian limit set the same way as I did all of the previous fractals with very little progress. I am unable to recreate even a simple Schottky group. I have implemented a mobius transformation in math nodes and i can see clearly that it is working. I can play with the values of a b c and d, i understand how to construct the inverses of them but iterating it seems to be completely diffrent pair of shoes compared the standard mandelbrot iteration (simply plug in the output of one node group containing the formula to the input of another and copy a bazilion times). In this case i understand that to create simple Schottky group i need to create 4 circles and start applying the mobius transform to pack all of those circles into each other by applying a, b as well as A and B transformations. But i am unable to do this because of the information loss. I can not govern the movement of the circles simply by the formulas because the x y z coordinates are just RGB values. Circles just replace xyz values. I can not keep the circles and xyz values for each point of the plane. No way to overlay them somehow or reconstruct them (or i just can not think of one) if i iterate  "a" once and try to iterate "b" afterwards a transformation leaves no information for the next one and if I somehow separate the circle region i can not apply the transform cause rgb is lost. I dont know if im clear enough about the situation but maybe there is some way to overcome this problem. If anyone is interested in solving it and needs more information i can explain further as well as provide screenshots of the nodes, formulas, and generally how it works within Blender environment.

Im just affraid that because of this i would need to create super complicated node groups to somehow keep track of the transformations, where the circles went etc.

Somewhere here i upload screen of shader node configuration for the mobius transformation set to the identity, just to give u a sense of what im working with. If its not working i can upload images to some image hosting service or smthng.

Or.. please give me simple x y z version of "grandmas recipe" this and mayube it will magically work xD

Love to all <3





Linkback: https://fractalforums.org/index.php?topic=4643.0

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #1 on: February 14, 2022, 08:03:12 PM »
Also it is worth to note that i was able to acheive some fractal that closely resembles kleinian group just utilising the general mandelbrot formula from wikipedia and applying some mobius transformation (in this case simply a reciprocal of z) to it and than taking an exponential of it.

xtmp=(x*x+y*y)^(n/2)*cos(n*atan2(y,x)) + a
y=(x*x+y*y)^(n/2)*sin(n*atan2(y,x)) + b
x=xtmp

I implemented the formula above, played with it, added inverse transformation before and after the formula and than put trough "e" node as well as conjugated it (details below). But changing any of the variables in the formula does not yield satisfactory results as the gasket starts morphing in non "kleinian way". Maybe there is a way modifying the formula to achieve true kleinian set, or maybe its just an accidental similarity.

Below node setups and results so far. All of the colors are non arbitrary (meaning that they are the xyz plane morphed by the formula).

First image is just plain function with little tweaking, second one is conjugated and a bit rotaded, third one is just a node setup for multibrot that was obtaind by implementing the formulas above.



It would be neat to have this form of kleinian set.


Offline 3DickUlus

  • Administrator
  • 3f
  • *******
  • Posts: 2935
Re: Rendering Kleinian limit sets in blender
« Reply #2 on: February 15, 2022, 02:22:47 AM »
Nice work  :thumbs:

is the problem divergent vs convergent ???

I recall seeing a bit of fragment code in one of the Fragmentarium/Examples scripts that accounts for this but for the life of me I can't remember which one  :fp: I think it was about using a convergent formula in a distance estimator that expected a divergent formula, or perhaps, a colouring method.

edit:Found it :D by user gannjondal (link to github repo)

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #3 on: February 15, 2022, 03:23:59 PM »
I will take a look! Thanks! It might be useful. I think that kleinian set is an orbit trap type fractal (please correct me if im wrong). It is just crazy how such trivial problem can be so difficult to solve. "just take points and draw their position at each iteration." In my head it was solved 1000x but every time i sat down and tried implementing it - i failed :D

On a sidenote i always wondered about the distinction between divergent and convergent fractals. Is it just me or is it just super arbitrary in general sense?   :gum: In both cases we have points that converge and diverge after each iteration :D


« Last Edit: February 15, 2022, 03:36:58 PM by IgorZdrowowicz »

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #4 on: February 15, 2022, 03:52:25 PM »
Im saying this because in blenders case there is no distinction since both conv and div functions just "morph" the plane z and this is what matters. So in case of mandelbrot we can specify the power, C etc. Changing c to constant value (less general) yields julia set. Doing this and changing the value of n to -2 gives me newtons fractal. So julia set to the negative power is just newtons fractal in my head xD Please feel free to laugh at me for lack of knowledge but this is just my intuition :D Below proof - same formula, just n and c changed. So first image is z^-2 and second one z^-3.  :brot:

Offline JosLeys

  • Fractal Friend
  • **
  • Posts: 10
Re: Rendering Kleinian limit sets in blender
« Reply #5 on: February 15, 2022, 05:52:32 PM »
Have you tried the escape time algorithm that I published:
http://www.josleys.com/articles/Kleinian%20escape-time_3.pdf ?

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Rendering Kleinian limit sets in blender
« Reply #6 on: February 15, 2022, 05:57:35 PM »
Looks nice. Not shure. Z=Z^(-2)+C could generate finite julia sets of the same patterns as newton fractals. But not these infinite sets.

Did you meant z^(-2) + C is:
xtmp=(x*x+y*y)^(n/2)*cos(n*atan2(y,x)) + a
y=(x*x+y*y)^(n/2)*sin(n*atan2(y,x)) + b
x=xtmp
?

I don't understan kleinian. Throught i searched a database and found:
Code: [Select]
7Klein_Group(XYAXIS)   { ; Morgan L. Owens <pack***@***et.g***.nz>
                         ; Thu, 23 May 2002 01:28:28
ang=pi/3
c1=0
c2=1
c3=exp((0,1)*ang)
c4=exp((0,2)*ang)
c5=exp((0,3)*ang)
c6=exp((0,4)*ang)
c7=exp((0,5)*ang)
r=1/2
rr=r*r
z=pixel:

inside=0
if(|z-c1|<rr)
         z=r*conj(r/(z-c1))+c1
         inside=1
elseif(|z-c2|<rr)
         z=r*conj(r/(z-c2))+c2
         inside=1
elseif(|z-c3|<rr)
         z=r*conj(r/(z-c3))+c3
         inside=1
elseif(|z-c4|<rr)
         z=r*conj(r/(z-c4))+c4
         inside=1
elseif(|z-c5|<rr)
         z=r*conj(r/(z-c5))+c5
         inside=1
elseif(|z-c6|<rr)
         z=r*conj(r/(z-c6))+c6
         inside=1
elseif(|z-c7|<rr)
         z=r*conj(r/(z-c7))+c7
         inside=1
endif
inside}

or
Code: [Select]
Inv4Klein_Group  { ; Gerald K. Dobiasovsky <ger***.***@***.at>
                       ; Sat, 25 May 2002 08:00:52
                       ;
                 ; Modification of "3Klein_Group" by Morgan L. Owens
                 ; Circle 4 has "inverted" function.
                 ; periodicity=no
                 ; ( Circles all touching: r123 = sqrt(3)/2
                 ;                         r4   = sqrt(3)/2 + 1
                 ;                         c4   = 0             )
 ;------------------------------------
 ;p1r: radii 1 to 3
 ;p1i: radius 4
 ;p2r: Center of circle 4 x-coordinate
 ;p2i: Center of circle 4 y-coordinate
 ;------------------------------------
 ;
 ang = 2*pi/3
 c1 = 1
 c2 = exp((0,1)*ang)
 c3 = exp((0,2)*ang)
 r123 = real(p1)
 r4 = imag(p1)
 rr123 = sqr(r123)
 rr4 = sqr(r4)
 z = pixel:

   inside = 0
   IF (|z-c1| < rr123)
     z = r123*conj(r123/(z-c1)) + c1
     inside = 1
   ELSEIF (|z-c2| < rr123)
     z = r123*conj(r123/(z-c2)) + c2
     inside = 1
   ELSEIF (|z-c3| < rr123)
     z = r123*conj(r123/(z-c3)) + c3
     inside = 1
   ELSEIF (|z-p2| > rr4)
     z = r4*conj(r4/(z-p2)) + p2
     inside = 1
   ENDIF
 inside
 }
Otto Magus seems to know more as he had made remake of these Fractint formulas.
by Edgar Malinovsky aka Edgars Malinovskis.

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Rendering Kleinian limit sets in blender
« Reply #7 on: February 15, 2022, 06:03:10 PM »
More from fractint orgform database:

Code: [Select]
Alt3Klein_Group  { ; Gerald K. Dobiasovsky <gerald.******@*****.at>
                       ; Tue, 28 May 2002 03:08:36 (ver. 2)
                       ; Sat, 25 May 2002 08:00:52 (ver. 1)
                 ; Modification of "3Klein_Group" by Morgan L. Owens
                 ; Centers of circles 1 and 2 are situated on the x-axis,
                 ; both circles with distance d to the y-axis.
                 ; Circle 3 touches both 1 and 2.
                 ; periodicity=no
                 ;--------------
                 ;p1r: radius 1
                 ;p1i: radius 2
                 ;p2r: radius 3
                 ;p2i: distance d ( <= radius 3 )
 ;-----------------------------------------------
 r1 = real(p1)
 r2 = imag(p1)
 r3 = real(p2)
 c1 = r1 + imag(p2)   ;wrong sign will be compensated for in the loop
 c2 = r2 + imag(p2)
 c3 = r3 - imag(p2)
 c3 = ((c1-c2)*c3+flip(sqrt((c1+c2+c3)*c1*c2*c3)*2))/(c1+c2)
 rr1 = sqr(r1)
 rr2 = sqr(r2)
 rr3 = sqr(r3)
 z = pixel:
   inside = 0
   IF (|z+c1| < rr1)
     z = r1*conj(r1/(z+c1)) - c1
     inside = 1
   ELSEIF (|z-c2| < rr2)
     z = r2*conj(r2/(z-c2)) + c2
     inside = 1
   ELSEIF (|z-c3| < rr3)
     z = r3*conj(r3/(z-c3)) + c3
     inside = 1
   ENDIF
 inside
 }

-------------------------------------------------------------------------

Alt4Klein_Group  { ; Gerald K. Dobiasovsky <gerald.******@*****.at>
                       ; Tue, 28 May 2002 03:08:36 (ver. 2)
                       ; Sat, 25 May 2002 08:00:52 (ver. 1)
                 ; Modification of "4Klein_Group" by Morgan L. Owens
                 ; Centers of circles 1 and 2 are situated on the x-axis,
                 ; both circles with distance d to the y-axis.
                 ; Circles 3 and 4 both touch 1 and 2.
                 ; periodicity=no
                 ;--------------
                 ;p1r: radius 1
                 ;p1i: radius 2
                 ;p2r: radius 3
                 ;p2i: radius 4
                 ;p3r: distance d ( <= radius 3, <= radius 4 )
 ;------------------------------------------------------------
 r1 = real(p1)
 r2 = imag(p1)
 r3 = real(p2)
 r4 = imag(p2)
 c1 = r1 + real(p3)   ;wrong sign will be compensated for in the loop
 c2 = r2 + real(p3)
 c3 = r3 - real(p3)
 c4 = r4 - real(p3)
 c3 = ((c1-c2)*c3+flip(sqrt((c1+c2+c3)*c1*c2*c3)*2))/(c1+c2)
 c4 = ((c1-c2)*c4-flip(sqrt((c1+c2+c4)*c1*c2*c4)*2))/(c1+c2)
 rr1 = sqr(r1)
 rr2 = sqr(r2)
 rr3 = sqr(r3)
 rr4 = sqr(r4)
 z = pixel:
   inside = 0
   IF (|z+c1| < rr1)
     z = r1*conj(r1/(z+c1)) - c1
     inside = 1
   ELSEIF (|z-c2| < rr2)
     z = r2*conj(r2/(z-c2)) + c2
     inside = 1
   ELSEIF (|z-c3| < rr3)
     z = r3*conj(r3/(z-c3)) + c3
     inside = 1
   ELSEIF (|z-c4| < rr4)
     z = r4*conj(r4/(z-c4)) + c4
     inside = 1
   ENDIF
 inside
 }

-------------------------------------------------------------------------

Mod4Klein_Group  { ; Gerald K. Dobiasovsky <gerald.******@*****.at>
                       ; Tue, 28 May 2002 03:08:36 (ver. 2)
                       ; Sat, 25 May 2002 08:00:52 (ver. 1)
                 ; Modification of "3Klein_Group" by Morgan L. Owens
                 ; Centers of circles 1 and 2 are situated on the x-axis,
                 ; both circles with distance d to the y-axis.
                 ; Circle 3 touches both 1 and 2.
 ;Parameters of circle 4 are not restricted. Circle has "inverted" function.
 ;periodicity=no
 ;------------------------------------
 ;p1r: radius 1
 ;p1i: radius 2
 ;p2r: radius 3
 ;p2i: radius 4
 ;p3r: Center of circle 4 x-coordinate
 ;p3i: Center of circle 4 y-coordinate
 ;p4r: distance d ( <= radius 3 )
 ;------------------------------------
 r1 = real(p1)
 r2 = imag(p1)
 r3 = real(p2)
 r4 = imag(p2)
 c1 = r1 + real(p4)   ;wrong sign will be compensated for in the loop
 c2 = r2 + real(p4)
 c3 = r3 - real(p4)
 c3 = ((c1-c2)*c3+flip(sqrt((c1+c2+c3)*c1*c2*c3)*2))/(c1+c2)
 rr1 = sqr(r1)
 rr2 = sqr(r2)
 rr3 = sqr(r3)
 rr4 = sqr(r4)
 z = pixel:
   inside = 0
   IF (|z+c1| < rr1)
     z = r1*conj(r1/(z+c1)) - c1
     inside = 1
   ELSEIF (|z-c2| < rr2)
     z = r2*conj(r2/(z-c2)) + c2
     inside = 1
   ELSEIF (|z-c3| < rr3)
     z = r3*conj(r3/(z-c3)) + c3
     inside = 1
   ELSEIF (|z-p3| > rr4)
     z = r4*conj(r4/(z-p3)) + p3
     inside = 1
   ENDIF
 inside
 }

-----------------------------------------------------------------------

Mod5Klein_Group  { ; Gerald K. Dobiasovsky <gerald.******@*****.at>
                       ; Tue, 28 May 2002 03:08:36 (ver. 2)
                       ; Sat, 25 May 2002 08:00:52 (ver. 1)
                 ; Modification of "4Klein_Group" by Morgan L. Owens
                 ; Centers of circles 1 and 2 are situated on the x-axis,
                 ; both circles with distance d to the y-axis.
                 ; Circles 3 and 4 both touch 1 and 2.
 ;Parameters of circle 5 are not restricted. Circle has "inverted" function.
 ;periodicity=no
 ;------------------------------------
 ;p1r: radius 1
 ;p1i: radius 2
 ;p2r: radius 3
 ;p2i: radius 4
 ;p3r: Center of circle 5 x-coordinate
 ;p3i: Center of circle 5 y-coordinate
 ;p4r: radius 5
 ;p4i: distance d ( <= radius 3, <= radius 4 )
 ;--------------------------------------------
 r1 = real(p1)
 r2 = imag(p1)
 r3 = real(p2)
 r4 = imag(p2)
 r5 = real(p4)
 c1 = r1 + imag(p4)   ;wrong sign will be compensated for in the loop
 c2 = r2 + imag(p4)
 c3 = r3 - imag(p4)
 c4 = r4 - imag(p4)
 c3 = ((c1-c2)*c3+flip(sqrt((c1+c2+c3)*c1*c2*c3)*2))/(c1+c2)
 c4 = ((c1-c2)*c4-flip(sqrt((c1+c2+c4)*c1*c2*c4)*2))/(c1+c2)
 rr1 = sqr(r1)
 rr2 = sqr(r2)
 rr3 = sqr(r3)
 rr4 = sqr(r4)
 rr5 = sqr(r5)
 z = pixel:
   inside = 0
   IF (|z+c1| < rr1)
     z = r1*conj(r1/(z+c1)) - c1
     inside = 1
   ELSEIF (|z-c2| < rr2)
     z = r2*conj(r2/(z-c2)) + c2
     inside = 1
   ELSEIF (|z-c3| < rr3)
     z = r3*conj(r3/(z-c3)) + c3
     inside = 1
   ELSEIF (|z-c4| < rr4)
     z = r4*conj(r4/(z-c4)) + c4
     inside = 1
   ELSEIF (|z-p3| > rr5)
     z = r5*conj(r5/(z-p3)) + p3
     inside = 1
   ENDIF
 inside
 }

alsou

Code: [Select]
3Klein_Group(XAXIS)   { ; Morgan L. Owens <pac****@****.***.nz>
                        ; Thu, 23 May 2002 01:28:28
ang=2*pi/3
c1=exp((0,0)*ang)
c2=exp((0,1)*ang)
c3=exp((0,2)*ang)
r=sqrt(3)/2
rr=r*r
z=pixel:
inside=0
if(|z-c1|<rr)
         z=r*conj(r/(z-c1))+c1
         inside=1
elseif(|z-c2|<rr)
         z=r*conj(r/(z-c2))+c2
         inside=1
elseif(|z-c3|<rr)
         z=r*conj(r/(z-c3))+c3
         inside=1
endif
inside}

-------------------------------------------------------------------------------------------------

6Klein_Group(XYAXIS)   { ; Morgan L. Owens <pac****@****.***.nz>
                         ; Thu, 23 May 2002 01:28:28
ang=pi/3
c1=2*exp((0,0)*ang)
c2=2*exp((0,1)*ang)
c3=2*exp((0,2)*ang)
c4=2*exp((0,3)*ang)
c5=2*exp((0,4)*ang)
c6=2*exp((0,5)*ang)
z=pixel:
inside=0
IF(|z-c1|<1)
         z=conj(1/(z-c1))+c1
         inside=1
ELSEIF(|z-c2|<1)
         z=conj(1/(z-c2))+c2
         inside=1
ELSEIF(|z-c3|<1)
         z=conj(1/(z-c3))+c3
         inside=1
ELSEIF(|z-c4|<1)
         z=conj(1/(z-c4))+c4
         inside=1
ELSEIF(|z-c5|<1)
         z=conj(1/(z-c5))+c5
         inside=1
ELSEIF(|z-c6|<1)
         z=conj(1/(z-c6))+c6
         inside=1
ENDIF
inside}





Klein_squ_lattice(XYAXIS)   { ; Morgan L. Owens  <pac****@****.***.nz>
                              ; Thu, 23 May 2002 01:28:28
r=1/2
rr=r*r
z=pixel:
inside=0
c=round(z)
if(|z-c|<rr)
         z=r*conj(r/(z-c))+c
         inside=1
endif
inside}

-------------------------------------------------------------------------------------------------

Klein_tri_lattice(XYAXIS)   { ; Morgan L. Owens  <pac****@****.***.nz>
                              ; Thu, 23 May 2002 01:28:28
ang=pi/3
r=1/2
rr=r*r
z=pixel
t1=sin(ang)
t2=tan(ang)
t3=exp(flip(ang))
:
inside=0
m = round(imag(z)/t1)
n = round(real(z)-imag(z)/t2)
c0=n+m*t3
c1=n+(m-1)*t3
c2=n+(m+1)*t3
c3=(n-1)+m*t3
c4=(n+1)+m*t3
if(|z-c0|<rr)
         z=r*conj(r/(z-c0))+c0
         inside=1
elseif(|z-c1|<rr)
         z=r*conj(r/(z-c1))+c1
         inside=1
elseif(|z-c2|<rr)
         z=r*conj(r/(z-c2))+c2
         inside=1
elseif(|z-c3|<rr)
         z=r*conj(r/(z-c3))+c3
         inside=1
elseif(|z-c4|<rr)
         z=r*conj(r/(z-c4))+c4
         inside=1
endif
inside}


Morgan Owens seems to be one of the best Fractint formula authors together with Pusk@s Istv@n. Maybe I must share his formula files alltogether.

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #8 on: February 15, 2022, 07:06:22 PM »

@JosLeys i am familiar with your work, saw its implementation of it in shadertoy, and I am a huge fan of Your artwork in general. Probably without your input I would not even be aware of kleinian fractals to be honest.

So yeah... The problem with blender shader nodes is that they do not have any sophisticated interface that would allow me to simply translate the maths into a node tree without specifically constructing every operation and transformation from x y z coordinates. When it comes to mandelbrot, julia, etc it is quite easy as i was able to find x y z (isn't it called rectangular?) forms of complex multiplication, addition, reciprocal, division etc. Simply iterating those functions yielded fractals. No need to create any logic around it, no if statements were required, nothing. Simply creating a function from smaller math nodes, grouping it into one node with single input and
single output and iterating it I went as far as making hypercomplex julia sets and mandelbrot so i thought that simply creating a schottky group or apolonian gasket would be easy but i do not know how to represent those mobius transformations in xyz form and iterate them. I have mobius transformation and i can transform the plane and iterate it along mendelbrot (just puting mobius transform in the same node group as julia set and iterating it) but iterating it by itself does not yield any fractals (as it might be thought of just simply adding 1 + 1 + 1... etc. forever and expecting any structure to emerge) and i understand it perfectly. The problem is that when i start to modify the transfotmation T by adding some constants, multiplying it ot whatever i know that this is not how kleinian fractals emerge. Trying to do this step by step (creating circles and inverting them into themselves) is something that i was not able to do in this environment. For example - if i create a circle by taking x^2 + y^2 and puting it trough "greater than" or "less than" node i get two regions. One black (value zero) and one whine (1) i an unable to retreive the xyz coordinates of those regions to put it trough mobius transformation (or its inverse) again. By multiplying it by xyz or T(xyz) i have the outer or inner region that i can iterate but trying to somehow get inner and outer region i a problem i could not solve.

I know that the easiest way would be to just write a code, i went trough many implementations of it but this is in many ways above my league to be honest (i dont understand maths in this way yet). Now even after reading trough the first half of Indra's Pearls i have some basic understanding of what should happen but trying to implement it in terms of x y z transformations is probably very silly. The fact that im just starting to research mathematicsgain) (age 25) does not help, as i feel (especially at this point) that this "train" left the station a long time ago without me.

Just trying to figure all of this out thought me a lot, but still not enough.


Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #9 on: February 15, 2022, 07:07:00 PM »
@Alef

Yaaah so basically in blender's logic if i modify multibrot formula a bit to make it generate "multijulia" set it is possible to generate similar patterns to newtons fractal by changing the value of n to -2. If you are interested i can share the whole blender file for you to investigate deeper.

Also i will go trough the code and try to extract some ideas but i am a very bad mathematician so basically every line of code is an hour of research and trying to put this in a context of blender shader nodes  :gloomy:

Offline xenodreambuie

  • Fractal Feline
  • **
  • Posts: 190
Re: Rendering Kleinian limit sets in blender
« Reply #10 on: February 15, 2022, 08:47:13 PM »
I will take a look! Thanks! It might be useful. I think that kleinian set is an orbit trap type fractal (please correct me if im wrong). It is just crazy how such trivial problem can be so difficult to solve. "just take points and draw their position at each iteration." In my head it was solved 1000x but every time i sat down and tried implementing it - i failed :D


There are reasons why Kleinians in general are more difficult. Classifying fractals is a bit tricky because there are different ways to look at them and the relationships between them (vague statement but even mathematicians are learning all the time, and it's hard for the rest of us to keep in mind everything we have learnt.) All the fractals we're talking about here can be thought of as IFS (iterated function systems), that is, ignoring other types such as clouds or landscapes with statistical self-similarity.

The ordinary Mandelbrot/Julia fractals are fairly easy because for escape time methods you only have one formula to iterate, so a single chain of calculations for each point. Inverse iteration methods also work, and involve calculating a tree of combinations, because a formula has multiple roots. Inverse iteration is also the most common method for IFS consisting of a set of arbitrary transformations (from the Sierpinski triangle up to practically anything you can imagine, given enough transforms.) However, efficient inverse iteration needs ways to vary the depth of tree traversal (or adjust probabilities if choosing paths randomly) according to the number of unique points in the branches. This is simple for linear transforms, more complicated for nonlinear functions.

Now, Kleinian sets consist of several transformations, so in general they require combinatorial calculations whether you are iterating in forward or inverse directions. In the particular case of the Maskit normalization, Jos Leys worked out an escape time method that can do it with a single chain, by using criteria for choosing the best path to iterate through the combinations for each pixel. In other cases you can't do it without evaluating combinations one way or another. So there are various ways of drawing Kleinians, and each has pros and cons depending on the density of useful combinations; no known method is ideal for all. I mean to post in more detail about Kleinians some time.

I don't think Kleinians are an orbit trap type. If you want to draw them as combinations of circles or spheres, perhaps you can treat it as a circle or sphere orbit trap, but it's still a combinatorial problem first.

Quote
On a sidenote i always wondered about the distinction between divergent and convergent fractals. Is it just me or is it just super arbitrary in general sense?   :gum: In both cases we have points that converge and diverge after each iteration :D

You're right, in that the points are either converging to a finite point or cycle, or converging to infinity (or not converging). The biggest difference is in the tests for convergence, because you can't express nearness to infinity in the same computational way. My approach is not to have separate rendering methods, but to handle both in all cases (but with options not to do convergent testing for Mandelbrots because it takes longer.) Beyond that, there are reasons to handle convergent and divergent points differently because they have different characteristics (eg may be periodic) that you usually want to use for coloring, and converging to periodic cycles needs different tests anyway.
« Last Edit: February 15, 2022, 09:09:41 PM by xenodreambuie »

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Rendering Kleinian limit sets in blender
« Reply #11 on: February 15, 2022, 09:01:21 PM »
Maybe pixel maping is inverted (initial conditions z=1/pixel and c= julia seed) or something as I got closed circular newton like threads in that case. (Ultra Fractal, it must be correct.) That would be too mutch to investigate, at now I don't want to dig deeper in fractals.

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #12 on: February 16, 2022, 03:38:49 PM »
@Alef

Not sure about this. But the main point is that the formula is modified. Instead of variable c we have constant so its just julia. Adding uv coordinates to the formula after each iteration brings it back to just this https://www.youtube.com/watch?v=CP__BZxxfNY&ab_channel=FractalsforYourSoul

@xenodreambuie

I see now. I mean i always treated julias burning ships etc just as curvy IFS fractal.

Also - the reasson that im trying to somehow figure out a way of implementing a kleinian fractal in blender nodes was because of this example https://cindyjs.org/gallery/main/Kleinian/

Here we have a simple video feedback and i wondered that maybe just morphing a plane by some function might be possible in order to get convergent behavior as in this example. I think of every fractal in terms of video feedback because this is where my intrest in them comes from. I used to play with my webcam and a mirror to get this kind of patterns >> https://www.youtube.com/watch?v=6L2Fgq0SmrY&ab_channel=Boogie93650. I succesfully implemented it in blender after some time by taking absolute balue of x axis, rotating the image aroud z axis and adding some constant. Mendelbrot is similar but the absolute value comes from z^2. Now im wondering how to implement some kind of plane transformation to get kleinian from feedback (as examplefied in cindy.js gallery). I just need help of some patient mathematician/programmer xD

If You have any ideas feel free to DM me or just email me at igor.zdrowowicz@gmail.com

Offline xenodreambuie

  • Fractal Feline
  • **
  • Posts: 190
Re: Rendering Kleinian limit sets in blender
« Reply #13 on: February 16, 2022, 08:57:55 PM »

Also - the reasson that im trying to somehow figure out a way of implementing a kleinian fractal in blender nodes was because of this example https://cindyjs.org/gallery/main/Kleinian/

Here we have a simple video feedback and i wondered that maybe just morphing a plane by some function might be possible in order to get convergent behavior as in this example. I think of every fractal in terms of video feedback because this is where my intrest in them comes from. I used to play with my webcam and a mirror to get this kind of patterns >> https://www.youtube.com/watch?v=6L2Fgq0SmrY&ab_channel=Boogie93650. I succesfully implemented it in blender after some time by taking absolute balue of x axis, rotating the image aroud z axis and adding some constant. Mendelbrot is similar but the absolute value comes from z^2. Now im wondering how to implement some kind of plane transformation to get kleinian from feedback (as examplefied in cindy.js gallery). I just need help of some patient mathematician/programmer xD

If You have any ideas feel free to DM me or just email me at igor.zdrowowicz@gmail.com

That is interesting. The Kleinians work very well except when they become unstable. Though I notice that it's only by using the polar coordinate space that they avoid resolution issues and clipping that occurs in the examples using linear space. You're right that image replication is one of the standard methods for IFS calculation, and used in some books to illustrate the concept for linear IFS. So it also applies for nonlinear transformations. I'm not clear on how the combinations of transforms are achieved in this case, but it appears to be a brute force combinatorial approach using images. I've only implemented them with inverse iteration methods, and I don't do GPU coding either.

Offline IgorZdrowowicz

  • Fractal Friend
  • **
  • Posts: 10
  • computable consciousness
Re: Rendering Kleinian limit sets in blender
« Reply #14 on: February 16, 2022, 11:30:20 PM »
@xenodreambuie

I have no idea what is hapening there either  :lol:

I start to realise how to explain the issue with implementing it in blender - there is no way to invert a circle after it has been drawn (only before) so i can not iterate. It will transform the coordinates but not the circle drawn as i said earlier - color values are xyz values and circle is not one of them - its gonna be either black or white (0 or 1). But i still have a feeling that it is possible to implement it somehow but im just scratching my head at this point. Its hard not to have a feeling that im close cause what i get so far looks like some "degenerate" kleinians. (similar to ones in this thread: http://www.fractalforums.com/other-types/kleinian-limit-sets-t2270/)

Below my most recent attempt (more iterations and some interesting patterns emerge).



clip
3D limit sets of Kleinian groups webpage

Started by JosLeys on UltraFractal

3 Replies
651 Views
Last post September 26, 2017, 07:57:07 PM
by timemit
clip
found another precision limit issue

Started by Mr Rebooted on Kalles Fraktaler

6 Replies
630 Views
Last post October 16, 2021, 03:55:54 PM
by claude
xx
Gallery Upload limit time interval calculation?

Started by Anon on Forum Help And Support

0 Replies
262 Views
Last post March 12, 2018, 01:35:49 PM
by Anon
xx
Resolution limit?

Started by ThunderboltPagoda on Forum Help And Support

7 Replies
568 Views
Last post November 01, 2018, 12:08:12 AM
by ThunderboltPagoda
xx
revisiting Jos Leys Kleinian

Started by mclarekin on Fractal Mathematics And New Theories

0 Replies
390 Views
Last post January 25, 2019, 01:12:23 AM
by mclarekin