|
David Makin
|
 |
« on: January 05, 2012, 12:05:28 PM » |
|
Hi, whilst trying this: http://www.fractalforums.com/programming/interesting-result-from-well-known-idea-on-ff/I got an an idea - my above 2D algorithm and the Mandelbox etc. use mathematical folding - has anyone tried mathematical pleating yet ? Am just about to try it in the pattern generator but I'm guessing it will produce interesting results if used instead of (or as well as) folding for Mandelboxes etc.
|
|
|
|
« Last Edit: January 05, 2012, 12:07:08 PM by David Makin »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
     
Posts: 2512
Fragments of the fractal -like the tip of it
|
 |
« Reply #1 on: January 05, 2012, 07:47:04 PM » |
|
explain this concept ; "mathematical" folding ... is? 
|
|
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
|
Syntopia
|
 |
« Reply #2 on: January 05, 2012, 09:23:36 PM » |
|
Not sure if it is used by mathematicians at all, but here on FF it seems to be a conditional reflection, in either a point, line, or plane (reflect if you are on the wrong side). For instance, x=abs(x), is a fold. Lowe's video is a good illustration: http://sites.google.com/site/mandelbox/what-is-a-mandelboxMakin: wouldn't a pleating be just the same as the Lowe's boxfold (a double fold)? i.e. either: x = abs(x-1)-abs(x+1)+x, or x = x-abs(x-1)+abs(x+1);
|
|
|
|
|
Logged
|
|
|
|
|
bib
|
 |
« Reply #3 on: January 05, 2012, 09:47:13 PM » |
|
Folding is basically a symmetry. Not sure if this is an official mathematical term, but it is used by Ian Stewart in his famous book "Does God Play Dice" to explain that the essence of chaos is just to repeat the process "stretch + fold" over and over again, the most simple one being the baker's map. http://en.wikipedia.org/wiki/Baker's_map This is also what the Mandelbox algorithm does to some extent.
|
|
|
|
|
Logged
|
Between order and disorder reigns a delicious moment. (Paul Valéry)
|
|
|
DarkBeam
Global Moderator
Fractal Senior
     
Posts: 2512
Fragments of the fractal -like the tip of it
|
 |
« Reply #4 on: January 05, 2012, 10:30:06 PM » |
|
If David means abs() folds as a new concept, something must be wrong! It is the oldest concept ever, used almost everywhere around. Waiting for more explanation 
|
|
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
|
kram1032
|
 |
« Reply #5 on: January 05, 2012, 10:46:35 PM » |
|
Well, in combination with the thread he linked, I'd say it's an idea I actually had before...
The generic kaleidoscope fractals which work on any polytope, have certain planes defined, to be reflected (or folded) along, as far as I can remember. Now, his idea probably is double-folding, but with a constant offset between the folds.
The thread he linked shows how this looks like with random offsets in 2D.
|
|
|
|
|
Logged
|
|
|
|
|
Syntopia
|
 |
« Reply #6 on: January 05, 2012, 11:04:22 PM » |
|
If David means abs() folds as a new concept, something must be wrong! It is the oldest concept ever, used almost everywhere around. Waiting for more explanation  I don't think he says that folding is a new concept - as I read it, he talks about extending folding into something called pleating, leaving us wondering whether this is a double fold or something more complex than that :-) But now I am getting curious!
|
|
|
|
|
Logged
|
|
|
|
|
David Makin
|
 |
« Reply #7 on: January 05, 2012, 11:10:29 PM » |
|
Apologies I just visualised it as folows: 2 simultaneous folds (at the ends of yyyy) turn this:
......xxxxxxxxxx->xxxXyyyy->yyyyZzzz->zzzzzzzzzz.......
into this:
Xxxx<-xxxx ..........zz<-zzzzyyyy->yyyyxxxx<-xx........... zzzz<-zzzZ
Whereas a (2-fold) pleat (at the ends of yyyy) turns this:
......xxxxxxxxxx->xxxXyyyy->yyyyZzzz->zzzzzzzzzz.......
Into this:
xxxx->xxxX ..........xx->xxxxyyyy<-yyyyzzzz->zz........... Zzzz->zzzz
So a pleat is an exact negative of 2 simultaneous folds - to be honest I hadn't realised anyone was using simultaneous folds - I thought the original 'box just used single consecutive ones - maybe my memory's not what it used to be  Also at the moment the pattern generator just uses a single fold per iteration (so just consecutive folding) and I think I'm correct in saying that this is definitely different from a simultaneous double-fold (because in consecutive folding part of the section folded on the first fold gets refolded on the second). In the formula every fold position is random (and is effectively abs() applying it appropriately to positive or negative values) and the max. distance from the origin is gradually decreased until the range stays between -0.5...+0.5 but increasing the number of repetitions still both increases the detail level and changes the pattern. Of course the nice patterns arise from combining the (2D) folding with rotation. Also the formula has the option of adjusting the values so the pattern is no longer rotationally symmetrical around the origin - this is just basically a slight offset applied on each iteration that essentially moves the centre of rotation --ooops *and* folding 
|
|
|
|
« Last Edit: January 05, 2012, 11:17:01 PM by David Makin »
|
Logged
|
|
|
|
|
kram1032
|
 |
« Reply #8 on: January 06, 2012, 12:43:33 AM » |
|
slight offset meaning constant?
Sounds interesting. I'm not sure what you mean with all those arrows in your Ascii-folding notation...
|
|
|
|
|
Logged
|
|
|
|
|
David Makin
|
 |
« Reply #9 on: January 06, 2012, 12:57:52 AM » |
|
slight offset meaning constant?
Sounds interesting. I'm not sure what you mean with all those arrows in your Ascii-folding notation...
Nope, it's actually a random - applied at the start of each iteration as follows: if !@p_sym x = x + p[i+512] y = y + p[i+1536] endif It doesn't break any continuity because no matter which pixel it is the random table (p[2048]) always returns the same value (0 to 1) on each iteration (i). The arrows denote *the original* positive direction - as in all point right prior to folding - you have to imagine it as a side view of a piece of paper or cloth being folded/pleated,
|
|
|
|
|
Logged
|
|
|
|
|
|
|
David Makin
|
 |
« Reply #11 on: January 06, 2012, 01:46:06 AM » |
|
Just to add - these render really fast - in fact this one renders in almost exactly the same time as the standard UF default Mandelbrot set at the default location (in multi-pass with periodicity off) with max iterations set to a measly 100 and bailout 128. In fact even putting my detail level parameter up from 8 to 32 which means that a minimum extra 24 iterations are performed *per pixel* only took the time on my system from 0.3secs to 0.48secs (for a render within UF at 928*696).
|
|
|
|
|
Logged
|
|
|
|
|
David Makin
|
 |
« Reply #12 on: January 06, 2012, 02:50:22 AM » |
|
OK, I really shouldn't think and post when I'm over-tired (have done that two days running now). Of course my code is not applying the folds *consecutively* for a single point - with visualising things as a whole line/piece of paper/curtain I was thinking the code operated on the whole whereas of course it only operates on one point at a time and doing a *single* fold on that point based on it being left or right (or above/below) the two-fold region *is* doing the folding in a simultaneous manner with respect to the whole and so equivalent to a pleat. However it made me realise that I could add a repeat count parameter on the folding 
|
|
|
|
|
Logged
|
|
|
|
|
kram1032
|
 |
« Reply #13 on: January 06, 2012, 04:48:00 AM » |
|
really nice stuff  Any chance to see that in 3D? Also, if folding basically is a reflection on a line (in 2D) or a plane (in 3D), what about adding other kinds of reflections? Spherical ones, for instance... Or you could try parabolic reflections if that works. Heh... maybe you could even do some kind of fractal origami, figuring out certain Origami-pieces and how they are folded, and coding that into a folding behavior that might terminate after the "figure is done folding" or maybe it starts over... Possibly we could come up with a "mathematical" version of folding a piece of paper into a cusp. (I hope I'm describing it correctly, here... What I mean is a common origami trick where you get a round shape from a fold by pressing on the fold... Not sure if that would make any sense in this kind of thing though)
|
|
|
|
|
Logged
|
|
|
|
|
bib
|
 |
« Reply #14 on: January 06, 2012, 09:22:46 AM » |
|
Hi Dave, Sorry if I missed the information, is that formula already in the UF database?
|
|
|
|
|
Logged
|
Between order and disorder reigns a delicious moment. (Paul Valéry)
|
|
|
|