News: Support us via Flattr FLATTR Link

The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

 Pages: [1] 2   Go Down
 Author Topic: Not so fractal related - tube triangular DE patterns (solved in 2 ways)  (Read 9197 times) Description: 0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « on: December 23, 2012, 06:57:00 PM »

Okay, I am trying to get a "pretty drawing" using DE, in other words DIFS.

Because I made a formula that works well, and plots an infinite array of tubes arranged in a triangular pattern

Code:
const h=0.5, k = 0.866025
a = -x; b = +h*x +k*y; c = +h*x - k*y;
// NOTE that a = -b-c !
ai = int(a); bi = int(b); ci = int(c);
a = abs(a-ai); b = abs(b-bi); c = abs(c-ci);
return (min(a,b,c)^2 + z*z - tuberad);

This gives the figure I named ORIGINAL

Now! If we are able to delete some pieces of tubes, we should be able to obtain pretty pictures, in particular deleting them using mod function, that gives us the rest of integer division...
If you look at the picture on the right, you see that I deleted one tube every 3, in a regular way, to get the cube pattern - this should mean;

Code:
const h=0.5, k = 0.866025
a = -x; b = +h*x +k*y; c = +h*x - k*y;
ai = int(a); bi = int(b); ci = int(c);
a = abs(a-ai); b = abs(b-bi); c = abs(c-ci);
// also tried this (uncomment to see the effect) - varies pattern but it's pointless?
// ai = int(a+h); bi = int(b+h); ci = int(c+h);
if (ai mod 3 == 0) a = 1; //delete x tubes - else try a=0 to make a filled pattern
if (bi mod 3 == 0) b = 1; //delete skew tubes
if (ci mod 3 == 0) c = 1; //delete other tubes
// also tried this and did not work... (replace the previous 3 lines with this)
//if (ai mod 3 == 0) b = 1;
//if (bi mod 3 == 0) c = 1;
//if (ci mod 3 == 0) a = 1;
return (min(a,b,c)^2 + z*z - tuberad);

But that does not work so I tried to get the pattern using this and it also did not work;

Code:
const h=0.5, k = 0.866025
a = -x; b = +h*x +k*y; c = +h*x - k*y;
ai = int(a); bi = int(b); ci = int(c);
a = abs(a-ai); b = abs(b-bi); c = abs(c-ci);
if ((ai + bi mod 2) mod 3 == 0) a = 1;
if ((bi + ci mod 2) mod 3 == 0) b = 1;
if ((ci + ai mod 2) mod 3 == 0) c = 1;
return (min(a,b,c)^2 + z*z - tuberad);

If somebody finds the answer, please tell me... I need to get a pretty cube pattern.
 cubes.GIF (5.74 KB, 714x222 - viewed 264 times.) « Last Edit: December 27, 2012, 05:06:21 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #1 on: December 23, 2012, 07:04:26 PM »

An example pic of one variation...

It's pretty but not quite what I wanted...
 cubes5.JPG (133.12 KB, 1072x503 - viewed 293 times.) Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #2 on: December 23, 2012, 07:06:28 PM »

This variation is very pretty! But not what I wanted. Should more or less be related to 1st variation (using mods)
 cubes5.JPG (140.26 KB, 1070x553 - viewed 306 times.) Logged

No sweat, guardian of wisdom!
knighty
Fractal Iambus

Posts: 819

 « Reply #3 on: December 26, 2012, 09:14:33 PM »

Hi,

You could do it this way:
Code:
static c[3]={-sqrt(3)/2,-0.5,sqrt(3)/4};
(x,y){

reduce(&x,&y);
fold(x,y,c);
x=abs(x);
y=abs(y);
fold(x,y,c);
d=fold(x,y,c);

return d;
//the 3D distance is: d3D=sqrt(z^2+d^2) . it is applicable whenever you have a 2D DE field that you want to see in 3D. Another trick is to do an intersection with a thin plate ;-)
}
reduce(&x,&y){//infinite tiling of the plane
tile(x,1.5);
tile(y,sqrt(3)/2);
}
fold(&x,&y,p[3]){
t=x*p[0]+y*p[1]+p[2];
d=t;
t=2*min(t,0);
x-=t*p[0];y-=t*p[1];
return d;
}
tile(&x,a){//infinite fold
x-=a;
x=abs(x-(2*floor(x*0.5/a)+1)*a);
}

I prefere the shape in your last picture.

Happy holydayes and new year!
 Logged
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #4 on: December 26, 2012, 11:49:36 PM »

Thanks again, you always find a clever solution. I hope you will have a marvellous new year friend!
 Logged

No sweat, guardian of wisdom!
Alef
Fractal Supremo

Posts: 1174

 « Reply #5 on: December 27, 2012, 03:45:47 PM »

Slight offtopic. I found this. IMHO should be something pretty simmilar if not in formula than then in result. 8th simmetry instead of 6th. Throught no formula come with this one but I kind of like this oriental geometric tiling.
 « Last Edit: December 27, 2012, 04:08:17 PM by Alef » Logged

fractal catalisator
knighty
Fractal Iambus

Posts: 819

 « Reply #6 on: December 27, 2012, 04:27:43 PM »

Nice fractal zellige.
 Logged
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #7 on: December 27, 2012, 04:50:13 PM »

By the way this is the script that I corrected, now in my eyes look absolutely perfect! Triumph!

Code:
(x,y) // Infinite cubes illusion. Plot with Evaldraw!
m=0.5;f=sqrt(12);w=f/3;q=f/2;
// find the tubes and store in a,b,c then find the int part of inclined axis
x = abs(x);
a = x;
b = ABS(x*.5+y*0.8660254037);
c = ABS(x*.5-y*0.8660254037);
ai = int(a+.5)-0;
bi = int(b+.5)-0;
ci = int(c+.5)-0;
a= abs(a-ai); b = abs(b-bi); c = abs(c-ci);
// a,b,c -> tubes now let's cut them to show only a part of them. This is a good way ...
u = abs(-y+q*ai);u=abs(u-int(u/f+m)*f)-w;a = max(a,u); // u is ortho to y-tubes then we cut using max() operator
u = abs(y*.5-x*0.8660254037+q*bi);u=abs(u-int(u/f+m)*f)-w;b = max(b,u);
u = abs(y*.5+x*0.8660254037+q*ci);u=abs(u-int(u/f+m)*f)-w;c = max(c,u);
// choose the min() so we stick together all parts
(sqrt((min(min(a,b),c))^2) - .01)^.2;

Knighty's one must be a lot faster so I will put his one by the way.
Thanks all
 « Last Edit: December 27, 2012, 05:07:23 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #8 on: December 29, 2012, 12:57:46 PM »

Here the result for Knighty's
 gridh.PNG (240.85 KB, 1076x549 - viewed 310 times.) Logged

No sweat, guardian of wisdom!
knighty
Fractal Iambus

Posts: 819

 « Reply #9 on: December 30, 2012, 08:42:13 PM »

Nice!
You can also obtain hexagonal tiling by taking the distance to x or y axis (IIRC it's the x axis).
It would be nice to have the folding part as a transform.
Have you tried other (maybe interesting) combinations (d is the 2d distance estimate):
DE= max(d,abs(z))// square shape
DE= abs(d)+abs(z)// diamond
DE=(d^p + abs(z)^p)^1/p // Superquadric? Ok! not so easy in asm
 Logged
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #10 on: December 30, 2012, 11:59:35 PM »

I need two orthogonal axis
Okay x is the final d, what I need to do for y?
I was hoping for this transform for ages! Tell me please
 Logged

No sweat, guardian of wisdom!
knighty
Fractal Iambus

Posts: 819

 « Reply #11 on: December 31, 2012, 08:47:38 PM »

I'm not sure I understand.

Here is what I wanted to say in my previous post:
Code:
//DE for duals of uniform planar 2-3-6 triangle group tilings
static c[3]={-sqrt(3)/2,-0.5,sqrt(3)/4};
(x,y){
//fold transformation into 2-3-6 triangle group tiling. It works just like a Kaleidoscope.
reduce(x,y);
fold(x,y,c);
x=abs(x);
y=abs(y);
fold(x,y,c);
//end fold. It can be used as a

dx=y;//distance to x axis
dy=x;//distance to y axis
dc=x*c[0]+y*c[1]+c[2];//distance to third folding line

d=dx;//hexagones
//d=dy;//triangles
//d=dc;//star like shapes

//Any combinations of dx,dy and dc gives the 7 duals of uniform 2-3-6 tilings
//For example:
//d=min(dx,dy);
//or any DE wich will be duplicated all around
return d;

//the 3D distance is:
// d3D=sqrt(z^2+d^2) . circle cross section.
// d3D=max(abs(z),d) . square.
// d3D=abs(d)+abs(z) . diamond.
//it is applicable whenever you have a 2D DE field that you want to see in 3D. Another trick is to do an intersection with a thin plate ;-)
}
reduce(&x,&y){//infinite tiling of the plane
tile(x,1.5);
tile(y,sqrt(3)/2);
}
fold(&x,&y,p[3]){
t=x*p[0]+y*p[1]+p[2];
d=t;
t=2*min(t,0);
x-=t*p[0];y-=t*p[1];
return d;
}
tile(&x,a){//infinite fold
x-=a;
x=abs(x-(2*floor(x*0.5/a)+1)*a);
}

I've also attached evaldraw scripts for the 2-4-4 and 3-3-3 triangle groups. And a demo showing the folding process. I hope you like them.

Happy new year. Best whishes.
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #12 on: January 01, 2013, 01:29:14 AM »

I explain better
In origin x,y,z form an angle of 90 degrees each other.
I apply ypur fold
I move dx to x, dy to y
I have replaced x y with a different reference
Now, the angle x forms with z, y is still 90 deg? Or 60 deg?
Happy new yearrrrr
 Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #13 on: January 01, 2013, 12:54:06 PM »

Ignore please, it works perfectly AND axis are ortho. Thanks!!!
 Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior

Posts: 2512

Fragments of the fractal -like the tip of it

 « Reply #14 on: January 01, 2013, 05:14:38 PM »

Rotating trough z axis =