Fractal Related Discussion > Fractal Mathematics And New Theories

Exploring higher dimensions: 3D extractions

(1/5) > >>

Jeannot:
Hello, I propose in this post to explore some of the multiple possibilities offered by fractals in spaces of higher dimensions Rn. :shroom:

Solution 1: exotic extraction R4 to R3 by linked coordinates.
The principle is the following: each point of R3:(X0,X1,X2) is transposed into a system of linked coordinates (x0,x1,x2,x3) of R3, then the coordinates (x0,x1,x2,x3) of each point of R3 are assimilated to a usual R4 point and tested in R4 classically.
For example, I introduce a system of tetrahedral linked coordinates where the 4 axes of the coordinate system are the axes of the 4 vertices of the tetrahedron. Each quadruplet (a+x0, a+x1, a+x2, a+x3)  corresponds to the same point of R3 as (x0,x1,x2,x3) due to the symmetry of the tetrahedron.
Among all the quadruplets of point P of R3, we choose one judiciously, which will be the unique linked coordinate of point P of R3.

Example 1 below; the unique quadruplet correspopnds to a= -min(x0,x1,x2,x3), thus (x0+a, x1+a, x2+a, x3+a) includes a coordinate at 0 and the other 3 positive.
Applied to Mandelnest (see my post here https://fractalforums.org/index.php?topic=4028.0 ) this transforms my 3D fractals with cubic symmetry into fractals with tetrahedral symmetry  :joy:

Z4=coord3R3to4R3tetrahedron(Z3);//transposition of R3 classical coordinates of Z (X0 X1,X2) into R3 tetrahedral linked coordinates (x0,x1,x2,x3)
dual=+1; //or -1 for dual
C4=Z4; //initialization
N=0;
do // test iteration Mandelnest in R4
{
M0=norm0(Z4); // Modulus 0 for angles calculation asin
M1=norm1(Z4); // Modulus 1 for power calculation pow(M1,P)
a0=dual*asin(Z4/M0) ;  a1=dual*asin(Z4/M0); a2=dual*asin(Z4/M0); a3=dual*asin(Z4/M0);
a0=P*a0; a1=P*a1; a2=P*a2; a3=P*a3;
M1=pow(M1,P);
Z4=sin(a0); Z4=sin(a1); Z4=sin(a2); Z4=sin(a3);
M2=norm2(Z) ; // Modulus 2 for second normalization
for(k=0; k<4;k++) Z4[k]*=M1/M2;
Z4=Z4+C4;
M3=norm3(Z4);// Modulus 3 for test after adition
N++;
}
while((M3<Mc) & (N<Maxit));

Detail of the function: coord3R3to4R3tetrahedron(Z)
// WARNING: the change of coord. extends de unit U=1 to u=1, and norm is the same in R3 base and tetrahedrical base: ||V(U,V,W)||= |Z(u,i,j,k)|
vector<double> coord3R3to4R3tetrahedron(vector<double> V)
{
vector<double> Z(4,0);
const double coe1=-0.5*sqrt(3.);
Z=0.; // we choose u coordinate arbitrary null
Z=coe1*(V+V);
Z=coe1*(V+V);
Z=coe1*(V+V);
double m=-mini(Z); for(k=0;k<4;k++) Z[k]+=m; // initial quadruplet (3 positive coords and 1 null)
//reduction of the initial quadruplet (a defines type of projection R4 to R3):
//you can do nothing for parameter a, which by default stay at a=-min(Z), or add a as for example:
double a=-(Z+Z+Z+Z)/4.; // average of Z coordinates, minimum norm among the R4 vector
for(k=0;k<4;k++) Z[k]+=a;
return Z;
}

Jeannot:
Example 2 below; the unique quadruplet correspopnds to a= - average(x0,x1,x2,x3). Give R4 vector with minimum norm (that corresponds I think to the projection on the R3 space of R4 perpendicular to the axe (1,1,1,1))
Applied to Mandelnest (see my post here https://fractalforums.org/index.php?topic=4028.0 ) this gives interesting variants.

Z4=coord3R3to4R3tetrahedron(Z3);//transposition of R3 classical coordinates of Z (X0 X1,X2) into R3 tetrahedral linked coordinates (x0,x1,x2,x3)
dual=-1; //or +1 for dual
C4=Z4; //initialization
N=0;
do // test iteration Mandelnest in R4
{
M0=norm0(Z4); // Modulus 0 for angles calculation asin
M1=norm1(Z4); // Modulus 1 for power calculation pow(M1,P)
a0=dual*asin(Z4/M0) ;  a1=dual*asin(Z4/M0); a2=dual*asin(Z4/M0); a3=dual*asin(Z4/M0);
a0=P*a0; a1=P*a1; a2=P*a2; a3=P*a3;
M1=pow(M1,P);
Z4=sin(a0); Z4=sin(a1); Z4=sin(a2); Z4=sin(a3);
M2=norm2(Z) ; // Modulus 2 for second normalization
for(k=0; k<4;k++) Z4[k]*=M1/M2;
Z4=Z4+C4;
M3=norm3(Z4);// Modulus 3 for test after adition
N++;
}
while((M3<Mc) & (N<Maxit));

Detail of the function: coord3R3to4R3tetrahedron(Z)
// WARNING: the change of coord. extends de unit U=1 to u=1, and norm is the same in R3 base and tetrahedrical base: ||V(U,V,W)||= |Z(u,i,j,k)|
vector<double> coord3R3to4R3tetrahedron(vector<double> V)
{
vector<double> Z(4,0);
const double coe1=-0.5*sqrt(3.);
Z=0.; // we choose u coordinate arbitrary null
Z=coe1*(V+V);
Z=coe1*(V+V);
Z=coe1*(V+V);
double m=-mini(Z); for(k=0;k<4;k++) Z[k]+=m; // initial quadruplet (3 positive coords and 1 null)
//reduction of the initial quadruplet (a defines type of projection R4 to R3):
//you can do nothing for parameter a, which by default stay at a=-min(Z), or add a as for example:
double a=-(Z+Z+Z+Z)/4.; // average of Z coordinates for example, minimum norm among the R4 vector
for(k=0;k<4;k++) Z[k]+=a;
return Z;
}

Jeannot:
Example 3 below; Julia version C=-0.98, dual=+1, Puiss P=3; the unique quadruplet (after reduction) correspopnds to a= -min(x0,x1,x2,x3),
Applied to Mandelnest (see my post here https://fractalforums.org/index.php?topic=4028.0 ) this gives a tetrahedron Julia-like version.

Z4=coord3R3to4R3tetrahedron(Z3);//transposition of R3 classical coordinates of Z (X0 X1,X2) into R3 tetrahedral linked coordinates (x0,x1,x2,x3)
dual=+1;
C4=-0.98; C4=0.; C4=0.; C4=-0.; //initialization Julia
N=0;
P=3;
do // test iteration Mandelnest Julia in R4
{
M0=norm0(Z4); // Modulus 0 for angles calculation asin
M1=norm1(Z4); // Modulus 1 for power calculation pow(M1,P)
a0=dual*asin(Z4/M0) ;  a1=dual*asin(Z4/M0); a2=dual*asin(Z4/M0); a3=dual*asin(Z4/M0);
a0=P*a0; a1=P*a1; a2=P*a2; a3=P*a3;
M1=pow(M1,P);
Z4=sin(a0); Z4=sin(a1); Z4=sin(a2); Z4=sin(a3);
M2=norm2(Z) ; // Modulus 2 for second normalization
for(k=0; k<4;k++) Z4[k]*=M1/M2;
Z4=Z4+C4;
M3=norm3(Z4);// Modulus 3 for test after adition
N++;
}
while((M3<Mc) & (N<Maxit));

Detail of the function: coord3R3to4R3tetrahedron(Z)
// WARNING: the change of coord. extends de unit U=1 to u=1, and norm is the same in R3 base and tetrahedrical base: ||V(U,V,W)||= |Z(u,i,j,k)|
vector<double> coord3R3to4R3tetrahedron(vector<double> V)
{
vector<double> Z(4,0);
const double coe1=-0.5*sqrt(3.);
Z=0.; // we choose u coordinate arbitrary null
Z=coe1*(V+V);
Z=coe1*(V+V);
Z=coe1*(V+V);
double m=-mini(Z); for(k=0;k<4;k++) Z[k]+=m; // initial quadruplet (3 positive coords and 1 null)
//reduction of the initial quadruplet (a defines type of projection R4 to R3):
//you can do nothing for parameter a, which by default stay at a=-min(Z), or add a as for example:
double a=-(Z+Z+Z+Z)/4.; // average of Z coordinates for example, minimum norm among the R4 vector
for(k=0;k<4;k++) Z[k]+=a;
return Z;
}

Jeannot:
Example 4 below: method of tetrahedron linked coordinates applied to Mandelbox R4, with a= -average(Z) for reduction of the quadruplet (projection on the R3 space of R4 perpendicular to the axe (1,1,1,1)) .
This transforms cubic Mandelbox fractals to Mandelbox-octahedron ones with new shapes :joy:
Mandelbox’s geometrical dual ?
It is also possible to find a Mandelbox-tetrahedron (see below) by playing on the a parameter for reduction.
Of course, rendering can be improved...

Z4=coord3R3to4R3tetrahedron(Z3); //transposition of R3 classical coordinates of Z (X0 X1,X2) into R3 tetrahedral linked coordinates (x0,x1,x2,x3)
C4=Z4;
N=0;
f=1., s=2., r=.5;
do // test iteration Mandelbox R4
{
for(k=0;k<4;k++) {if(Z4[k]>1.)  Z4[k]=2.-Z4[k]; else if(Z4[k]<-1.) Z4[k]=-2.-Z4[k];}
for(k=0;k<4;k++) Z[k]=Z[k]*f;
R0=norm(Z4,4);
if(R0<r) {for(k=0;k<4;k++) Z4[k]=Z4[k]/(r*r);}
else {if(R0<1.)  for(k=0;k<4;k++) Z4[k]=Z4[k]/(R0*R0);}
for(k=0;k<4;k++) Z4[k]=Z4[k]*s+C4[k];
R1=norm(Z4,4);
N++;
}
while((R1<Mc) & (N<Maxit));

Detail of the function: coord3R3to4R3tetrahedron(Z)
vector<double> coord3R3to4R3tetrahedron(vector<double> V)
{
vector<double> Z(4,0);
const double coe1=-0.5*sqrt(3.);
Z=0.; // we choose u coordinate arbitrary null
Z=coe1*(V+V);
Z=coe1*(V+V);
Z=coe1*(V+V);
double m=-mini(Z); for(k=0;k<4;k++) Z[k]+=m; // initial quadruplet (3 positive coords and 1 null)
//reduction of the initial quadruplet (a defines type of projection R4 to R3):
//you can do nothing for parameter a, which by default stay at a=-min(Z), or add a as for example:
double a=-(Z+Z+Z+Z)/4.; // average of Z coordinates, minimum norm among the R4 vector
for(k=0;k<4;k++) Z[k]+=a;
return Z;
}

Jeannot:
Hello,
Please, do you know of other 3D fractals that can be fairly easily generalized in higher dimensions, 4D or more ?
I have listed them below but I must have forgotten some:  :yes:
-Mandelbox (nD): interesting to explore.
-Mandelnest (nD): interesting to explore.
-Tetrabrot (4D) : I have not explored
-IFS (nD): I have not explored
-Apollonius and Kleinian (nD): I have not explored