Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: tomkh on August 31, 2010, 12:33:06 AM




Title: Procedural aperiodic fractals
Post by: tomkh on August 31, 2010, 12:33:06 AM
Hello Fractal Forums!

I'm a new user here.

As a good start I will share with my latest experiment (I will post a routine later if anyone will be interested).
I did some procedural aperiodic penrose tiling and a simple fractal out of it.
It's a function (x,y) -> (r,g,b) , so it's truly procedural and can be calculated in parallel architectures (multi-core or GPU).
In fact it is very fast (real-time on my quad-core).
I don't know if it's anything new, it is a bit similar to kaleidoscopic IFS (using similar space folding idea that I knew before kaleidoscopic IFS was announced, but seeing those beautiful 3D renderings made by knighty and others inspired me to do more research in it).
Calculating aperiodic tiling involves several iterations per pixel (tile subsitution), and fractal version is just a modification in coloring.
One can extend the idea to any aperiodic tiling that is so called "volume hierarchic"... my dream is to make some 3D volume hierarchic aperiodic tilings.. but only a dream now :-)

This routine was prototyped and rendered in EvalDraw (some of you might know this wonderful :-) tool already).


Title: Re: Procedural aperiodic fractals
Post by: tomkh on August 31, 2010, 12:35:43 AM
And a fractal version...


Title: Re: Procedural aperiodic fractals
Post by: kram1032 on August 31, 2010, 12:45:36 AM
really nice :)

I think, I've read somewhere that it's not too hard to do Penrose-like tilings in 3D but it's impossible to have tilings which can only be tiled in a single definite pattern which stops somewhen if you make a mistake.
The 2D Penrose tiling will stop after some time if you put together two tiles in an invalid way.

So the 3D variant works but not perfectly alike the 2D one.

Also it's kind of hard to do nice 3D visual representations of tilings as the outer parts always occlude the interior and thus the beautiful aperiodic symmetry behind such tilings... - of course you can do cross sections or something but I think, in case of those tilings, the 2D case is artistically actually more interesting...


Title: Re: Procedural aperiodic fractals
Post by: fractower on August 31, 2010, 01:01:15 AM
I had a friend who worked on Danzer tiling (the 3D version) for his thesis. This is the getting started link he sent me.

http://www.cs.williams.edu/~98bcc/tiling/

Kram1032 has a good point about visualizing 3D tilings. Don't you hate knowing there is something cool inside that you cannot see.


Title: Re: Procedural aperiodic fractals
Post by: tomkh on August 31, 2010, 01:32:41 AM
Thanks for reply and links.
In conclusion - Danzer 3d tilings might be the anwser... inflation rules looks complicated though.
I guess they are not volume hierarchic either... it's not really a problem, unless you want (x,y,z) function,
would be nice to actually see someone visualise them in 3d.

For interior visibility problem - how about full color stereoscopy (or full VR) and translucent material (jelly-like) ?
I could try it at one point.


Title: Re: Procedural aperiodic fractals
Post by: tomkh on August 31, 2010, 03:24:36 PM
Here is some pinwheel fractal, easy to use procedural function (probably colors need some more tweaking)...


Title: Re: Procedural aperiodic fractals
Post by: lkmitch on August 31, 2010, 05:20:42 PM
Tomkh,

Nice images.  I particularly like the first one--it reminds me of an Islamic design.  I look forward to seeing your routines!


Title: Re: Procedural aperiodic fractals
Post by: kram1032 on August 31, 2010, 07:08:00 PM
pinwheel fractals can easily be extended into 3D, afaik :)


Title: Re: Procedural aperiodic fractals
Post by: tomkh on August 31, 2010, 11:15:42 PM
Here is the routine for procedural penrose tiling (based on robinson substitution rules).
It's working EvalDraw script that maps (x,y) to (r,g,b) space.
Just increase number of substitutions if you want to cover larger area ("levels" constant) and of course scale it up :-)

Code:
(x,y,&r,&g,&b)

// Procedural penrose tiling
// 2010 (C) Tomasz Dobrowolski
// http://moonedit.com/tom

// This is based on Robinson substitution,
// prototiles are two iosceles triangles,
// type 0 with angles: 36, 36, 108 deg.
// type 1 with angles: 72, 72, 36 deg.

enum {
   levels = 9,         // number of substitutions
   sc = 2/(sqrt(5)-1),  // inflation scale
  
   // transformations constants:
   d1 = tan(54*PI/180),
   d2 = tan(18*PI/180),
   a1 = .5/cos(36*PI/180),
   a2 = (1+a1)*.5,
   a3 = tan(36*PI/180)*a2,
   cos1 = cos(144*PI/180)*sc,
   sin1 = sin(144*PI/180)*sc,
   cos2 = cos(108*PI/180)*sc,
   sin2 = sin(108*PI/180)*sc
};

type = 0; // starting triangle type

for(k=0; k<levels; k++)  // iterate all subsitutions
{
   if (type == 0)
   {
      // We substitute triangle type 0
      // with three possible triangles.
      // We detect in which of those three
      // triangle our current (x,y) lies
      // by checking line equations separating them:
      
      if (1 - d1*y - x > 0) // left triangle
      {        
         // only translation/mirror here:
         x = (1 - x)*sc;
         y = y*sc;            
      }
      else if (1 - d2*y - x > 0) // middle triangle
      {
        
         // translate:
         xx = x - a2;    
         yy = y - a3;
        
         // rotate:
         x = xx*cos1 - yy*sin1;
         y = xx*sin1 + yy*cos1;
        
         type = 1; // tile type changes here!        
      }
      else // right triangle
      {      
         // translate (x only):
         xx = x - (1+a1);
         yy = y;
      
         // rotate:
         x =  xx*cos1 + yy*sin1;
         y = -xx*sin1 + yy*cos1;        
      }      
   }
   else
   {
      // We substitute triangle type 1 with
      // two possible triangles (analogically).

      if (d1*y - x > 0) { // upper triangle
      
         // rotate only
         xx = x;
         yy = y;
         x = -xx*cos2 + yy*sin2;
         y =  xx*sin2 + yy*cos2;
                  
         type = 0; // tile type changes here!
        
      } else { // lower triangle
      
         // translate (x only):
         xx = x - a1;
         yy = y;
        
         // rotate:
         x =  xx*cos2 + yy*sin2;
         y = -xx*sin2 + yy*cos2;        
      }
   }  
}

// Now we found resulting tile type
// after given number of substitution:

// We can use (x,y) for some additional
// texture effects!

if (type == 0) {
   // return tile type 0 color (yellowish orange):
   r = 218;
   g = 213;
   b = 118;
} else {
   // return tile type 1 color (marine blue):
   r = 74;
   g = 101;
   b = 166;
}


The other tilings/fractals were generated in a similar way.
Just different prototiles, angles and line equations.


Title: Re: Procedural aperiodic fractals
Post by: Nahee_Enterprises on September 01, 2010, 10:52:07 AM
    Hello Fractal Forums!
    I'm a new user here.

    As a good start I will share with my latest experiment (I will post a routine later
    if anyone will be interested).  I did some procedural aperiodic penrose tiling and
    a simple fractal out of it.    ...........

    This routine was prototyped and rendered in EvalDraw....

Greetings, and Welcome to this particular Forum !!!    :)

Not really familiar with that "tool", but always interested in seeing what else is available.
 


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 02, 2010, 12:35:34 PM
It is sort of like writing a shader for GPU, in fact it should be easy to port to a shader.

You have your input x,y coordinates and output &r,&g,&b.
Then, you can write a general code in C that describes your function.
EvalDraw manages threads so your function can be executed in parallel to draw
entire screen as fast as possible. It is mostly useful for prototyping, tweaking equations;
like it is not intended to produce hi-quality images.
Instead you can for example use lower pixel resolution if your function
is too slow or whenever you change something in code you
see immediate result.

Moreover, this is only one of possible modes. You also have animated 2D mode
(x,y,t,&r,&g,&b), 3D voxel mode (x,y,z,&r,&g,&b), sound generation mode,
general mode (for small apps) etc...

Excuse me a little bit advertisement, but I was a bit involved in development of this tool,
and it is free anyway :)

Here is the link: http://advsys.net/ken/download.htm#evaldraw
(just copy and paste my routine and while holding left/right mouse buttons you can pan/zoom into the structure, it's also fun if you increase "levels" or change output colors in the last few lines)


Title: Re: Procedural aperiodic fractals
Post by: knighty on September 07, 2010, 02:45:25 AM
There is at least on user of evaldraw here... me. O0 Most of the pictures that I've posted here are made with this tool.
Very nice Idea by the way. I always wanted to do some Penrose tilings. Thanks for sharing.
Do you have refrences about Robinson substitutions?


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 09, 2010, 11:57:00 PM
Hi Knighty!
I was actually thinking about you and evaldraw, since I was reading some of your old posts on this forum :-)

For Robinson Triangles, I was mostly using Tilings Encyclopedia:
http://tilings.math.uni-bielefeld.de/substitution_rules/robinson_triangle

Unfortunately they don't provide info about angles, but those are easy to derive, there is actually only one possibility,
so smaller angle is just 180/5 degrees.

One can use any tiling they call "volume hierarchic" with my method.
My next pick would be "Triangle Duo" and "Cyclotomic rhombs 7-fold". The latter looks especially cool !
Just check it out: http://tilings.math.uni-bielefeld.de/substitution_rules/cyclotomic_rhombs_7_fold
Although, I'm a bit lazy to derive angles and line equations, so I was actually thinking about writing small
editor for that - you would just draw those substitutions like in a CAD software and it will generate .kc for you.
It will take me some time to do it, though.

BTW
Great work with 3D kaleidoscopic-IFS, it really impressed me!
I was once talking with Inigo Quilez (maybe you know him? he did an extraordinary fractal rendering research!)
and I was sharing with him with my simple idea of procedural tree xy function based on space folding.
I guess folding is probable something very basic in fractal generation, but at a time I didn't think about all possibilities,
like rendering it with distance function in 3D! And maybe there is much more to explore.

If you are intersted, here is my original tomtree.kc from June 2007:
Code:
(x,y,t)
static ot = -1;
static co = 1;
static si = 0;
if (t != ot) {
   s = sin(t)*.5;
   co = cos(-pi/4+s);
   si = sin(-pi/4+s);
   ot = t;
}
xp = x;
yp = abs(y);
s = .5;
d = .25;
c = 0;
k=0;
while(1) {     
   if (abs(xp)<d && abs(yp-s)<s) {
      c2 = .5-abs(xp)/d;
      if (c < c2) c = c2;
   }
   if (k>16)
      break;
   xp = abs(xp)*1.2;
   yp -= s*2; //1.8;
   x2 = co*xp + si*yp;
   y2 = co*yp - si*xp;
   xp = x2;
   yp = y2;
   k++;
   s *= 2/3;   
   d *= 2/3;   
}
c


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 12:00:38 AM
As a bonus, here is tomtree.kc after some little tweaking:

Code:
(x,y,t)
static ot = -1, co, si, si2, co2;
if (t != ot) { ot = t;
   s = -.5+sin(t*.6174)*.5;
   co = cos(-pi/4+s);
   si = sin(-pi/4+s);
   si2 = sin(t);
   co2 = cos(t*.374325);
}
xp = x; yp = abs(y);
ys = 2+si2*.5; xs = co2*.5-.5;
s = .5; d = .25; c = 0;
for(k=0; k<16; k++) {
   c2 = 1-(xp^2 + (yp-s)^2);
   if (c < c2) c = c2;
   xp = abs(xp-xs)*1.2;
   yp = abs(yp-ys)*1.2 - s*2;
   x2 = co*xp + si*yp;
   y2 = co*yp - si*xp;
   xp = x2;
   yp = y2;
   s *= 2/3;  
   d *= 2/3;  
}
c

Update: I just found your KIFS renderer experiment in evaldraw - it's just insanely cool! :-)


Title: Re: Procedural aperiodic fractals
Post by: knighty on September 10, 2010, 01:18:14 AM
Thank you very much. :)
It should be possible to get a distance function to those "fractal tilings" and do some nice caves (hehe!) in 3D.

I did some modification to your script to give the distance field:
Code:
(x,y,t)
static ot = -1, co, si, si2, co2;
if (t != ot) { ot = t;
   s = -.5+sin(t*.6174)*.5;
   co = cos(-pi/4+s);
   si = sin(-pi/4+s);
   si2 = sin(t);
   co2 = cos(t*.374325);
}
xp = x; yp = abs(y);
ys = 2+si2*.5; xs = co2*.5-.5;
s = .5; d = .25; c = 0;
scl=1.75;
for(k=0; k<30; k++) {
   xp = abs(xp-xs)*scl;
   yp = abs(yp-ys)*scl;
   x2 = co*xp + si*yp;
   y2 = co*yp - si*xp;
   xp = x2;
   yp = y2; 
}
distance=sqrt(xp^2+yp^2)/scl^k;
distance^0.25//for better contrast
You were pretty close to the KIFS  ;D

PS: IQ is a living legend!   O0
PSē: Your work on fractal caves and growing creatures are awesomely cool too!


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 03:38:16 AM
New .kc works nice :)

In fact I'm working on new fractal caves recently... where instead of symmetries and regularities, I try to make them as irregular as possible - a kind of opposite approach to what most people are doing in a fractal art (of course symmetries and patterns are still cool to look at).

I am still working out the theory and want to publish it later, and still lacks certain tools (aka good renderer).
I was thinking recently about distance field rendering but it's hard to say if this is the best approach for my new caves though.
My first results are a bit periodic (and here's why I did research in aperiodic tilings : P),
but I will share some early screenshot and movie (I did it just out of polys for now, VRay).
Here is the movie (not yet released anywhere, keep in mind it should zoom in much nicer and show up more detail : P I'm working on it):
http://moonedit.com/tom/fractalrock.mov


Title: Re: Procedural aperiodic fractals
Post by: Tglad on September 10, 2010, 04:11:56 AM
Beautiful, is it an irregular tetrahedron with the same shape (scaled down) attached to the 4 faces and so on?

I tried something a little similar http://www.fractalforums.com/3d-fractal-generation/kaleidoscopic-(escape-time-ifs)/msg17229/#msg17229 which was just a KIFS with a random folding plane each iteration. Your rock beats my ones though  :D


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 05:23:57 PM
My fractals are a bit different. They are actually plain IFS, just a very special class with automatically generated functions (many of them).
I think we are at a point in "3d fractal art" that it's not so much about method, but about picking the right paramaters.
My research is solely based on this observation and I am mostly working on algorithms that will generate desired/nice looking parameters/functions for me.

Anyway, I have read your post. And random foldings is great idea !!!
I've tried to use your idea to extend knighty evaldraw script :)

Knighty is using abs() function to mirroring the space by fundamental axes.
What I did is a obvious generalization of abs() function.
We can call it "mirror" here, but I hard coded in in a script:
   mirror(x,y,z, dx,dy,dz)
And you can provide any plane normal (dx,dy,dz) as a mirror.
Now, we can still use it instead of abs:
   abs(x) = mirror(x,y,z, -1,0,0)
   abs(y) = mirror(x,y,z, 0,-1,0)
   abs(z) = mirror(x,y,z, 0,0,-1)
But we can try different variations of course.
I have actually tried to not go too far beyond fundamental axes, in order to keep the good density of zeros in a limit set.

If you are interested, here is the modifed script:
http://moonedit.com/tom/Random-folding.kc

I attach screenshots of randomizing simple octahedral KIFS, with increasing randomization factor (RANDFACT is increasing here: 0, .1, .2, .3, .4).
Of course all pictures rendered by modified Knighty script :)


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 05:25:45 PM
And last picture with RANDFACT = .4


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 05:26:46 PM
Oh, and of course the sample "rocks"...


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 05:41:12 PM
It turns out TETRA gives a much more rocky result, here it is:


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 10, 2010, 06:28:48 PM
A dog face made of rock ? :)


Title: Re: Procedural aperiodic fractals
Post by: knighty on September 11, 2010, 12:29:37 AM
New .kc works nice :)

In fact I'm working on new fractal caves recently... where instead of symmetries and regularities, I try to make them as irregular as possible - a kind of opposite approach to what most people are doing in a fractal art (of course symmetries and patterns are still cool to look at).

I am still working out the theory and want to publish it later, and still lacks certain tools (aka good renderer).
I was thinking recently about distance field rendering but it's hard to say if this is the best approach for my new caves though.
My first results are a bit periodic (and here's why I did research in aperiodic tilings : P),
but I will share some early screenshot and movie (I did it just out of polys for now, VRay).
Here is the movie (not yet released anywhere, keep in mind it should zoom in much nicer and show up more detail : P I'm working on it):
http://moonedit.com/tom/fractalrock.mov

My fractals are a bit different. They are actually plain IFS, just a very special class with automatically generated functions (many of them).
I think we are at a point in "3d fractal art" that it's not so much about method, but about picking the right paramaters.
My research is solely based on this observation and I am mostly working on algorithms that will generate desired/nice looking parameters/functions for me.
Wow! nice rendering. Are you using Hart's method?
I have derived a similar method for KIFS. Not finished nor optimised but if you are interrested here is the script (http://implicit.googlecode.com/files/NonDE_KIFS_21.kc).

Anyway, I have read your post. And random foldings is great idea !!!
I've tried to use your idea to extend knighty evaldraw script :)
Indeed! Its a great idea. and nice results.
Just to clarify things: In KIFS the folding planes can be arbitrary. Abs() is just for the implementation of special cases where the planes are centered at (0,0,0) and are axis aligned.


Title: Re: Procedural aperiodic fractals
Post by: Tglad on September 11, 2010, 01:23:18 AM
Are you randomising the directions at each iteration (but the same for all points)?


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 11, 2010, 01:46:17 AM
Quote
Wow! nice rendering. Are you using Hart's method?

I was rendering this grey thing with polygons, really ;) and it took a very long time (with geometry instancing though).
I now plan to calculate procedural bounding volumes and use it for a sphere tracing based method (with distance field).
As far as I quickly looked at Hart's old paper (interestingly he wrote a paper on sphere tracing later),
he basically maintains a stack of procedural bounding volumes that interesects the ray.
I guess it is good for general IFS, but a bit unecessary for KIFS, is there any advantage for KIFS rendering ?
Anyway, I would actually need it to for my special class of IFS (it's not KIFS, but it's not a general IFS either),
but I plan to use both stack and sphere tracing somehow.

Previously (i.e. in my caves) I was using weird rasterization (depth-first search on a procedural octree)
It suffered from obvious lighting problems (no fake GI, no true shadows, only with shadow maps etc..).

Quote
Just to clarify things: In KIFS the folding planes can be arbitrary. Abs() is just for the implementation of special cases where the planes are centered at (0,0,0) and are axis aligned.
Sure.
Although I was thinking about even more fancy generalizations.
Not only introducing new set of folding planes at every iteration (like I did with slightly randomized fundamental axes and Tglad with his double-folding planes),
but it could be interesting to also change the number of folding planes for every iteration (maybe somebody already suggested it in KIFS thread?)
This way you could for example generate a fractal tree with 2 branches at the begining and 3 branches at the end etc...

The one problem I noticed with KIFS (for my applications) is that you need to use the same folding planes for "everything" at the same iteration level,
otherwise distance function will get corrupted.
You just cannot use L-system like grammars, i.e. first divide space into rule A and B,
and each rule have different set of folding planes that divides subspaces into BBA and AAB etc..
And that's key to achieve aperiodic fractals. In my 2d renderings I have additional variable besides coordinates = rule number.
But actually maybe with Hart's method it could be possible !
Will think about it more...





Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 11, 2010, 01:53:43 AM
Quote
Are you randomising the directions at each iteration (but the same for all points)?

Yes. I noticed later that you are folding by two mirrors at once. It could be interesting approach to try,
since it's easier to make a denser limit set this way.
How about you try to modify knighty script ? :) (of course it's easier for me, since I am familiar with evaldraw)


Title: Re: Procedural aperiodic fractals
Post by: knighty on September 11, 2010, 04:01:20 PM
Quote
Wow! nice rendering. Are you using Hart's method?

I was rendering this grey thing with polygons, really ;) and it took a very long time (with geometry instancing though).
I now plan to calculate procedural bounding volumes and use it for a sphere tracing based method (with distance field).
Maybe you know this paper (http://www.inf.uni-konstanz.de/cgip/bib/files/HePrSa91.pdf). It describes a distance estimation algorithm for IFS. Unfortunately it's recursive and therefor hard to implement on GPU.
Do you know the work of David Makin on 3D RIFS? I'm pretty sure you will be interrested :)

As far as I quickly looked at Hart's old paper (interestingly he wrote a paper on sphere tracing later),
he basically maintains a stack of procedural bounding volumes that interesects the ray.
I guess it is good for general IFS, but a bit unecessary for KIFS, is there any advantage for KIFS rendering ?
Anyway, I would actually need it to for my special class of IFS (it's not KIFS, but it's not a general IFS either),
but I plan to use both stack and sphere tracing somehow.
It have some advantages:
- It's a little bit faster but this depends on the quality of the bounding volume(s). even my implementation is sometimes faster :).
- It can be used when the distance estimation is discontinuous.
- or while using non uniform scaling.

Although I was thinking about even more fancy generalizations.
Not only introducing new set of folding planes at every iteration (like I did with slightly randomized fundamental axes and Tglad with his double-folding planes),
but it could be interesting to also change the number of folding planes for every iteration (maybe somebody already suggested it in KIFS thread?)
This way you could for example generate a fractal tree with 2 branches at the begining and 3 branches at the end etc...
The idea of combinig different formulas is (to some extents) used in mandelbulb 3D and mandelbulber. I've started, some time ago, a thread (http://www.fractalforums.com/3d-fractal-generation/towards-a-general-recipe-to-explore-new-fractals/) about the subject.

The one problem I noticed with KIFS (for my applications) is that you need to use the same folding planes for "everything" at the same iteration level,
otherwise distance function will get corrupted.
That's because the distance function becomes discontinuous.

You just cannot use L-system like grammars, i.e. first divide space into rule A and B,
and each rule have different set of folding planes that divides subspaces into BBA and AAB etc..
And that's key to achieve aperiodic fractals. In my 2d renderings I have additional variable besides coordinates = rule number.
But actually maybe with Hart's method it could be possible !
Will think about it more...
You are right. It's quite difficult (impossible?) to get a continuous DE field in these cases.
There is a structure behind the "good behaving" KIFS. It's simpler to see it in 2D: let us take a sheet of paper, fold it 1 or more times then prick it. Let's now unfold it. the figure we will obtain will be a voronoi like diagram (;)) of the pricked points which is also a BSP. We can iterate the process (difficult to do with paper :)) but we will still obtain a (hierarchical?) BSP-Voronoi-diagram. That's the Voronoi diagram property that ensures continuity of the distance field. The BSP property in turn is a strong constraint (it's due to the folding process BTW).
Now if one uses at iteration i+1 different formulas based on the partition of space at iteration i (or whatever else), he will brobably obtain a discontinuous distance field. The question is: is it possible, in some of those cases, to obtain a continuous Distance field? (hope I'm clear enought because my english and communication skills sucks some times   :-\)


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 11, 2010, 06:58:50 PM
Quote
That's because the distance function becomes discontinuous.
Quote
The question is: is it possible, in some of those cases, to obtain a continuous Distance field?

FYI Your reasoning sounds clear to me. And the question is interesting. I will try to elaborate on that.

Actually, I was looking at KIFS the opposite way.
First you set a zero point (by virtually pricking the space in arbitrary position - could be interesting to select the best "zero point" automatically though),
and you initial DF is just a distance to this point.
Then you apply a sequence of mirror operations.
Since an individual mirror transformation does not break DF continuity,
the sequence of such transformations will result in a continuous DF as well.

Also I think the "folding lines" will not always be a voronoi diagram of zero points, since you can
lose some of them by doing a mirror transformation "outside them" (if you know what I mean)
and in resulting DF there will be just their voronoi cells leftovers (no more points with distance = 0).
Thus DF will be no longer a perfect voronoi diagram of zeros. However it is still fine for sphere tracing.
The iso-surface for any radius > 0 will be obviously continuous and DF(p) will always be
smaller or equal to the closest distance between p and the iso-surface,
which is sufficient (even if sometimes slow downs algorithm a bit).

So you are restricted to use only transformations that does not break DF continuity and maintain "smaller or equal" property.
If you make DF discontinuous just once, you are lost forever :)
(I guess there is no way to "repair" later)

Unfortunately I have no idea for any other transformation than mirror that preserves that:/


Title: Re: Procedural aperiodic fractals
Post by: knighty on September 11, 2010, 09:45:34 PM
You are right: the obtained diagram is not always voronoi.

Your resoning is much better. it gives better insight :). Hmm! it must give a clue to find DE formula for the aperiodic fractals.

Quote
(hope I'm clear enought because my english and communication skills sucks some times)
Tom: That was not intended to you especially but to express apologies to the the reader who would find my explanation confusing :embarrass:. It seems that i'm better in english than what I was thinking. ;D


Title: Re: Procedural aperiodic fractals
Post by: Syntopia on September 18, 2010, 01:01:32 PM
Hi, I ported the EvalDraw script to Pixel Bender, to see how fast it would run on a GPU.

As expected it is very fast - on my low-end laptop GPU (GeForce 310M) it runs at ~40 fps in 800x600 (with 3x3 anti-alias samples per pixel).

The basic Pixel Bender implementation can be found here:
http://snipplr.com/view/40729/penrosetilespbk/

Best regards, Mikael.


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 20, 2010, 05:33:06 PM
This is really great Syntopia, nice to see my script was useful for something.

[teaser]
Recently, I am working very hard on generalization over IFS, KIFS and substitution tiles :)
[/teaser]

That's why my activity on the forum is a bit lower.


Title: Re: Procedural aperiodic fractals
Post by: cKleinhuis on September 21, 2010, 01:45:52 AM
teaser images ?
teaser formulas ?


Title: Re: Procedural aperiodic fractals
Post by: tomkh on September 22, 2010, 12:55:40 AM
It's still a lot of things to do... so far I have developed a fast distance field (exact!) calculating algorithm for any kind of randomized fractal.
Next step is 3D of course, so the teaser is really not showing the full potential.


Title: Re: Procedural aperiodic fractals
Post by: Rrrola on October 14, 2010, 11:29:48 PM
I just had to work out the Penrose substitution rules on my own (as an exercise):
(http://www.ms.mff.cuni.cz/~kadlj3am/big/files/penrose.png)


Title: Re: Procedural aperiodic fractals
Post by: knighty on October 15, 2010, 12:01:14 AM
very nice! Have you used evaldraw? Are you planning to make it <=256b intro ? ;D
It's still a lot of things to do... so far I have developed a fast distance field (exact!) calculating algorithm for any kind of randomized fractal.
Next step is 3D of course, so the teaser is really not showing the full potential.
I've missed this reply. Thank you Rrrola for having bumped this thread.
@tomkh: This is incredible. I'm really teased  ;D.Any clue on how you did it? When could we see the 3D version?


Title: Re: Procedural aperiodic fractals
Post by: Rrrola on October 15, 2010, 12:23:26 AM
> Have you used evaldraw? Are you planning to make it <=256b intro?
Nah, hacked it down in C like everything else. The latter is a maybe. :)
And I second the demand for random fractal distance estimation. Random in what way, exactly?


Title: Re: Procedural aperiodic fractals
Post by: knighty on October 15, 2010, 12:39:46 AM
The latter is a maybe. :)
Maybe in 3D  :evil1: ;D


Title: Re: Procedural aperiodic fractals
Post by: tomkh on October 16, 2010, 07:22:03 PM
Hi !
I am still working hard on it. Wrote my own renderer from scratch - actually using hybrid approach: first casting primary rays and use distance field estimation for lighting.

I attach some early screenshot (fractal is still what I call periodic, IFS order=64, scaling factor=3)

Higher res version is here:
http://moonedit.com/tom/fractalview86.png
(rename to pns to view in 3d vision photo viewer)


Title: Re: Procedural aperiodic fractals
Post by: knighty on October 16, 2010, 07:50:43 PM
Nice stereo. 
I'm eager to see the final result. :)


Title: Re: Procedural aperiodic fractals
Post by: tomkh on October 29, 2010, 01:51:33 AM
Hi Knighty and others,

Here is a an early short youtube movie in stereo:
http://www.youtube.com/watch?v=IKVB-ALkl-0

It's based on the same fractal from screenshot.