Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => IFS - Iterated Function Systems => Topic started by: eNZedBlue on January 10, 2007, 05:18:25 PM




Title: Fun with Koch fractals.
Post by: eNZedBlue on January 10, 2007, 05:18:25 PM
Here are some Koch fractals I have made recently. I'll keep the explanations minimal, since the rules are mostly self-evident from looking at them.

I started in 2-dimensions, beginning with the classic Koch Snowflake fractal and recursively subdividing it into 6 smaller snowflakes and one larger (but still smaller than the original) snowflake in the centre, like so:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochTesselationSmall.jpg)

I colourised the fractal by giving each layer of snowflakes a contribution factor, which influenced how much the colouring affected the pixel. Each time I subdivided and recursed, the contribution factor for snowflakes at that level was halved. Since each pixel is in a different snowflake depending on the recursion level, I summed the colourisation at each level of recursion (multiplied by the contribution factor for that recursion level) over all the levels of recursion (I went about 6 levels deep). Up-and-down pointing snowflakes were coloured black, side-to-side pointing snowflakes were coloured white. After adding over all the recursion layers the result was various shades of grey.

I made a little GIF animation showing continuous zooming into the centre of the fractal (I just cross fade while zooming, so the colourisation adapts as it goes, as if the contrast knob is gradually being cranked up):

Koch Snowflake zoom animation (http://i19.photobucket.com/albums/b199/Stormfronter/KochAnim4.gif)

Next, I tried using a 2D circle-inversion transform to distort the fractal. I colourised it using GIMP, and added an "all-seeing eye" symbol to make it more interesting:

(http://i19.photobucket.com/albums/b199/Stormfronter/AllSeeingEye2.jpg)

Looking at the top image, an idea suggested itself: the roughly hexagonal meandering outline of the Koch Snowflake suggests the outline of a cube viewed at a 45 degree angle, looking diagonally at one of the vertices. I played around with this idea and figured out that you can make all the "dents" in the outline of the snowflake by chopping away at this cube - the trianglular insets of the 2D Koch Snowflake corresponding to insets in the cube's surface.

The rule to create this cube-based 3D fractal is simple: Start off with a cube of width n, and then attach 8 smaller cubes of width n / 3, centred on the 8 vertices of the original cube. Apply this recursively and voila!

(http://i19.photobucket.com/albums/b199/Stormfronter/KochSolidPerspective.jpg)

When rendered in an isometric projection, the outline of this object forms the Koch Snowflake:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochSolidIsometric.jpg)

This means that if you project an infinite, directional lightsource at the object from a diagonal 45 degree angle, a perfect outline of the Koch Snowflake will be cast onto any flat surface behind it.

Hope you like the images  :)

Cheers,
Chris Hayton


Title: Re: Fun with Koch fractals.
Post by: Nahee_Enterprises on January 11, 2007, 12:37:35 PM
Chris Hayton (eNZedBlue) wrote:
>
>    Here are some Koch fractals I have made recently.
>        ........
>    Hope you like the images   :)

Some interesting explorations into the Koch, especially the 3-D cube views and their shadows.



Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 11, 2007, 03:05:33 PM
Some interesting explorations into the Koch, especially the 3-D cube views and their shadows.
Thanks  :)

The Koch Snowflake overlaid two different ways with Metatron's Cube (http://en.wikipedia.org/wiki/Metatron):

(http://i19.photobucket.com/albums/b199/Stormfronter/MetatronKoch2.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/MetatronKoch5.jpg)

 and the Flower of Life (http://en.wikipedia.org/wiki/Flower_of_Life) pattern:

(http://i19.photobucket.com/albums/b199/Stormfronter/FlowerOfLifeKoch.jpg)

"Sacred Geometry" symbols are a good source of inspiration and ideas for fractals in my opinion.


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 11, 2007, 03:45:08 PM
It just occurred to me that the same trick with the cube fractal might also work with octahedrons (the polyhedral double of the cube), if you oriented the camera so that it was looking face-on to one of the triangular surfaces. Start off with an octahedron and then add smaller octahedrons at each of the six vertices. Wash, rinse, repeat etc.


Title: Re: Fun with Koch fractals.
Post by: lycium on January 12, 2007, 06:17:59 AM
those designs are awesome, there's an excellent matchup between them and the fractals!

about the rendering though: blurring is not the same as antialiasing ;) a simple way to draw antialiased circles is by a distance check; you do many of these within the "area" of a pixel (pixels don't have area, but that needs more explanation) and average the results - the result can be made reasonably smooth. btw, this handles the intersection of your circles perfectly, whereas opengl's line rendering can't. yesyes it's a lot slower, but you can also do it in an opengl pixelshader if you like, and the results are definitely worth it :)

oh and your koch zooming animation ruuuules!!


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 12, 2007, 06:59:40 AM
those designs are awesome, there's an excellent matchup between them and the fractals!

about the rendering though: blurring is not the same as antialiasing ;) a simple way to draw antialiased circles is by a distance check; you do many of these within the "area" of a pixel (pixels don't have area, but that needs more explanation) and average the results - the result can be made reasonably smooth. btw, this handles the intersection of your circles perfectly, whereas opengl's line rendering can't. yesyes it's a lot slower, but you can also do it in an opengl pixelshader if you like, and the results are definitely worth it :)

oh and your koch zooming animation ruuuules!!
Thanks for your comments, and for the tips on circle rendering. I actually overlaid the designs manually in GIMP using some images of Metatron's Cube and the FoL I found on the net, but I think it's worthwhile doing it properly sometime using the antialiased circle technique you describe.


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 14, 2007, 05:35:14 PM
Same thing with octahedrons:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochOctahedronsPerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochOctahedronsIsometric.jpg)

It should be possible to get a Koch Snowflake silhouette by placing the smaller octahedrons on the vertices of the larger one, instead of on the faces (as above). I think it will work several other ways with cubes as well (such as placing the smaller cubes on the lines connecting the vertices instead of one the vertices themselves). I'm going to give tetrahedrons and spheres a go tomorrow night after work :)


Title: Re: Fun with Koch fractals.
Post by: GFWorld on January 14, 2007, 05:47:53 PM
My compliments Chris - I have always a deep respect for really computer / fractal specialists !  :)
Thanks for the links here to Wikipedia here too  :)
Margit


Title: Re: Fun with Koch fractals.
Post by: Sockratease on January 14, 2007, 05:50:33 PM
Wow.

Just... Wow.


Title: Re: Fun with Koch fractals.
Post by: GFWorld on January 14, 2007, 05:54:39 PM
Sockratease - thats again a wonderful meeting! :D
And, I like your Chaoscope basic here too  :)
Margit


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 15, 2007, 01:09:30 PM
Thanks for the compliments Margit and Sockratease :)

Here's a couple more renders, showing another octahedron-based variation of the solid with the smaller octahedrons positioned on the vertices instead floating off the faces of the larger octahedron.

Perspective:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochOctahedronVertexRecursionPerspe.jpg)

Isometric:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochOctahedronVertexRecursionIsomet.jpg)


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 15, 2007, 02:24:02 PM
Sorry to flog a dead horse, but here it is with spheres:

(http://i19.photobucket.com/albums/b199/Stormfronter/Koch8WaySpherePerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/Koch8WaySphereIsometric.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/Koch6WaySpherePerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/Koch6WaySphereIsometric.jpg)

I'm pretty sure I've seen the first one (with 8 smaller spheres attached to the larger one) in some raytracing book ages ago.


Title: Re: Fun with Koch fractals.
Post by: lycium on January 15, 2007, 03:52:06 PM
I'm pretty sure I've seen the first one (with 8 smaller spheres attached to the larger one) in some raytracing book ages ago.

pretty recently actually: http://ompf.org/forum/viewtopic.php?t=336


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 15, 2007, 04:47:01 PM
I'm pretty sure I've seen the first one (with 8 smaller spheres attached to the larger one) in some raytracing book ages ago.

pretty recently actually: http://ompf.org/forum/viewtopic.php?t=336

Nice renders. I see I've got a lot of work to do on my raytracer  :)

The image that I saw was in some book I read on raytracing back in high school. It was from Pixar or "Palo Alto Research Laboratories" or somewhere like that. I wish I could remember the book's name.  ???

Is there some kind of established theory on which polyhedra can be used to make "looks like a Koch Snowflake in silhouette" solids? I think I can do it with stella octangula, truncated tetrahedra and cuboctahedrons (that'll be fun, lol) but that might be the limit. Tetrahedra on their own wont work, you'll end up with the regular 3D Koch Snowflake:

(http://hektor.umcs.lublin.pl/~mikosmul/origami/s-koch-snowflake-3d-tri.jpg)

Of course you can do it with any roughly spherical shape (e.g. dodecahedrons) but you won't get a perfect Koch Snowflake outline with no holes in the middle... I think.


Title: Re: Fun with Koch fractals.
Post by: Sockratease on January 16, 2007, 11:36:30 AM
This is inspirational!

I will be experimenting with programming my own fractal stuff once I learn how these new-fangled computers think!!



Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 16, 2007, 11:38:22 AM
Stella Octangula Koch Crystal:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochStellaOctagonaPerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochStellaOctagonaIsometric.jpg)

The Stella Octangula is made up of two intersecting tetrahedra. For each child stella octangula that comes off the parent in the above fractal solid, one of its tetrahedra lies entirely inside the parent, so it's really just made up of alternating tetrahedra after the first generation. There is another Koch solid based on the tetrahedron (see previous post) but it doesn't have the Koch Snowflake silhouette.

I think it should be possible to add some more fractal detail to the "flat" areas by adding more child stella octangula to each parent, in between the existing 8.

If you're interested in a "sacred geometry" connection to this one, it's probably the Merkabah (http://en.wikipedia.org/wiki/Merkabah), envisioned by some as a stella octangula on its end, with one of the tetrahedra pointing up, and the other pointing down.

Cheers,
Chris


Title: Re: Fun with Koch fractals.
Post by: lycium on January 16, 2007, 11:49:14 AM
The image that I saw was in some book I read on raytracing back in high school.

lucky you, we only had mandelbrot's crappy book in the computers section (most of which was for commodore 64s, cobol etc). i wasn't interested in fractals back then, but the ray tracing obsession i've had since high school too :)


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 16, 2007, 12:30:51 PM
View of the Stella Octangula Koch fractal from the side, which shows its cubic structure more clearly:

(http://i1.tinypic.com/2e2ozm9.jpg)


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 16, 2007, 12:34:21 PM
The image that I saw was in some book I read on raytracing back in high school.

lucky you, we only had mandelbrot's crappy book in the computers section (most of which was for commodore 64s, cobol etc). i wasn't interested in fractals back then, but the ray tracing obsession i've had since high school too :)
I was into fractals before raytracing, because there was no way I could code up a raytracer back then. I remember rendering my first Mandelbrot Set on an Amiga 500 using AmigaBasic. Ahh... memories. :)

I lost interest in fractals up until about a year ago, when my interest was rekindled after reading a few wacky Terrance McKenna theories on the supposed fractal nature of reality and time.


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 16, 2007, 03:41:17 PM
Okay, here it is with each stella octangula producing 14 children at each level of recursion (8 at the vertices of the cube enclosing the stella octangula, and 6 in the middle of each face of the cube, where the two tetrahedra form a cross). A couple more well-placed tetrahedrons at each level and it should be possible to remove all the flat surfaces and make it a 100% fractally stellated solid :)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochStellaOctangula14WayPerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochStellaOctangula14WayIsometric.jpg)

It looks like I broke my shadowing algorithm  :(


Title: Re: Fun with Koch fractals.
Post by: lycium on January 17, 2007, 08:11:19 PM
It looks like I broke my shadowing algorithm  :(

if i recall correctly that stencil buffer is only 8bits, so wrap-around could cause problems at high recursion depths if you're using opengl to rasterise this. you mentioned you have a ray tracer, check out http://ompf.org/ray/sphereflake/

gtg, thunderstorm / exam studying :(


Title: Re: Fun with Koch fractals.
Post by: eNZedBlue on January 20, 2007, 04:19:13 PM
Fractally Stellated Stella Octangula (self-similar and non-intersecting) in perspective and isometric views:

(http://i19.photobucket.com/albums/b199/Stormfronter/KochCrystalPerspective.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochCrystalPerspective2.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochCrystalIsometric.jpg)

(http://i19.photobucket.com/albums/b199/Stormfronter/KochCrystalRule.jpg)

The rules are a bit more complicated than indicated by the little graphic, because you have to remember the orientation of the tetrahedrons from one generation to the next (a bit like when using directed line segments), and you also have to completely subdivide the original tetrahedron (except for it's base) into smaller ones one third the size, with a set of orientations to make it come out "just so" in order to preserve the Koch snowflake silhouette, get complete coverage and avoid self-intersection. I'm going to do a post about it on my site, and then I'll post a link here. It should be possible to use a set of rules that work on either faces or solids. I used solids because that's what my ray-tracer deals with.

Cheers,
Chris


Title: Re: Fun with Koch fractals.
Post by: Nahee_Enterprises on January 21, 2007, 11:17:48 AM
Chris Hayton (eNZedBlue) wrote:
>
>    Fractally Stellated Stella Octangula (self-similar and non-intersecting)
>    in perspective and isometric views:
>        KochCrystalPerspective2.jpg

These images really came out nice.  I like the image listed just above the best of this new set.    :)

>
>    The rules are a bit more complicated......    I'm going to do a post
>    about it on my site, and then I'll post a link here.

I look forward to viewing and reading what you will put together.



Title: Re: Fun with Koch fractals.
Post by: jehovajah on August 29, 2008, 02:11:45 PM
What interests me particularly about the shapes you obtained for the octahaedal shapes is the closeness in resemblance to the capsid of a particular type of virus. I wonder if you can produce a 3d image based around that form?

Of course the images are interesting and praiseworthy, but i feel i would if i had your skill attempt to explore some basic fundamental structures such as the chemical bonding arrangements say in the h2o complex, or carbon carbon bonds. I would also like some representation of M theoretic geometry in string theory. A tall order I know, but one can ask.  ;)


Title: Re: Fun with Koch fractals.
Post by: lycium on August 30, 2008, 03:22:27 PM
What interests me particularly about the shapes you obtained for the octahaedal shapes is the closeness in resemblance to the capsid of a particular type of virus. I wonder if you can produce a 3d image based around that form?

(http://fractographer.com/wip/cubing.png)


Title: Re: Fun with Koch fractals.
Post by: cKleinhuis on August 31, 2008, 12:39:04 PM
@lyc we want to see it rotateeeeeeeeee :D O0 O0 O0


Title: Re: Fun with Koch fractals.
Post by: jehovajah on September 09, 2008, 08:53:10 PM
Lycium you have produced an interesting form but can you explain a little bit about which viral form inspired the image you have produced. I must say it does look nasty, but most viral forms look quite beautiful.
Chris,
I am interested in the octahedral form and its relationship to the Koch snowflake. If you think about the H2O complex which forms at low temperatures the octahaedral form could represent the 2 oxygen atoms ands the 4 hydrogen atoms at the vertices:                          
                                                                      H
                                                           O      H   H        O
                                                                      H
Now could this self assemble into the octahedral forms that you have depicted? Could the larger octahedrals have the form of a 3d serpinski gasket? If you could produce a form based around this, it would be interesting to see if it follows the natural forms of snowflakes.


Title: Re: Fun with Koch fractals.
Post by: Thekikker on June 24, 2014, 01:06:53 PM
Nice, I actually was introduced into fractal art by David Seied who  printed a perfect geometric version. I was so captivated with it that I had to own it. http://www.shapeways.com/model/1273033/star-tetrahedron-fractal-v2.html

This is his rendering. Thanks for sharing!


Title: Re: Fun with Koch fractals.
Post by: Nicolas Douillet on August 15, 2017, 07:43:08 AM
Hey, some news about 3D Koch snowflake :

I implemented it following eNZedBlue rules with a very slight variation. Here is the result at step 4 :


(https://img4.hostingpics.net/pics/350228Real4thlvl3DKochsnowflake2.png)


I also implemented the "cubic version", Koch snowflake sponge (http://alt-fractals.blogspot.fr/2011/05/koch-snowflake-sponge.html) which I find beautiful since it is a sponge. My result at step 4 :

(https://img15.hostingpics.net/pics/129417My4thlvl3DKochsnowflake3.png)


For these two fractals I also created .ply and .stl files so they are 3D printable. Actually they are both available in my online Sculpteo store (https://www.sculpteo.com/fr/s/nicolas-douillet/) at iterations 3 and 4.

[Don't trust displayed prices, they are meaningless, because tunable, and mostly function of choosen size, material, and color. I don't set them myself, it's automatically computed. There are however some minimum / limit size for the 3D objects to be robust enough regarding their details / geometry.]