Ray tracing a Menger sponge. July 19, 2010 at 11:38 am

Menger sponge, wtf? - you might say, so let us primary and short clarify what is meant here. In mathematics, a Menger sponge is a fractal curve and it was first described by Karl Menger while exploring the concept of topological dimension. It is a universal curve, in that it has topological dimension one,  and in any other compact metric space of topological dimension 1 is homeomorphic to some subset of it (Reference: Wikipedia).

Hmmm… fine, and where do we go from here? There are tons of code conversions out there showing Menger sponge´s in all kind of variations, but one of my favourite realizations called ‘Spongy‘ from TBC (a demo group) was released in 2009 during ‘Function 2009‘. What´s done here is  that they are ray tracing a Menger sponge from the inside.

‘WOOOT’ - didn´t I just wrote about ‘Raytracer‘ and ray tracing lastly? ;) Btw., never seen demos done by TBC? You really should take a look at TBC demos like ‘untraceable’ or ‘tracie‘ for your inspiration.

Actually, having no hardware acceleration in Flash ray tracing IFS Fractals isn´t a good idea at all. But after I came across this little snippet called ‘JSpongy‘ (by p01) which is an HTML5 adaption of TBC´s Spongy my interest awoke. The task: Let´s bring it to Alchemy and this is where I came up with at the end of the day: And - how shall I put it? Ray tracing a Menger sponge (scaled by factor 2) ~21fps isn´t such a bad thing, right? (thanks to Alchemy)

Ray tracing a Menger sponge
Launch

And referring to all those great ideas from the Demoscene it´s only fair to maintain their course - in other words, if they wouldn´t release the resources of all their great coding tricks and hacks we would not be where we are today! So feel free to catch the sources and make the best of it.

Additionally three more brilliant articles about ray tracing I forgot to mention last time:

Your turn!
 

5 Responses to “Ray tracing a Menger sponge.”

  1. Impressive stuff. That’s all I can say :)

  2. […] actionscript microcosmos » Ray tracing a Menger sponge. dasprinzip.com/prinzipiell/2010/07/19/ray-tracing-a-menger-sponge/ – view page – cached Menger sponge, wtf? - you might say, so let us primary and short clarify what is meant here. In mathematics, a Menger sponge is a fractal curve and it was first described by Karl Menger while exploring the concept of topological dimension. It is a universal curve, in that it has topological dimension one, and in any other compact metric space of topological dimension 1 is homeomorphic to… Read moreMenger sponge, wtf? - you might say, so let us primary and short clarify what is meant here. In mathematics, a Menger sponge is a fractal curve and it was first described by Karl Menger while exploring the concept of topological dimension. It is a universal curve, in that it has topological dimension one, and in any other compact metric space of topological dimension 1 is homeomorphic to some subset of it (Reference: Wikipedia). View page Tweets about this link […]

  3. […] hinsichtlich Flash. Mit Alchemy kann man aber so einiges herausholen… Herr Menger l

  4. wheeeeee! :D

  5. Cool Sponge, faster than the webGL version I’v ever seen.

Leave a Reply