Logo by Fiery - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 20, 2024, 01:05:08 PM


Login with username, password and session length


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


Pages: 1 [2]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Revenge of the (half-eaten) menger sponge  (Read 45029 times)
Description: Depth 7 no less!
0 Members and 1 Guest are viewing this topic.
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #15 on: November 25, 2009, 11:44:58 AM »

Hi kram1032, I corrected the file names.

Buddhi, that's fantastic - looks so wooden and complex. Kind of structure/texture that could easily in the real world.
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #16 on: November 25, 2009, 10:01:47 PM »

ah, nice twinbee cheesy

Buddhi: Now I wonder about a castle-version of your Menger sphere smiley

Also twinbee: What about both a multiperspective (say, three points of infinity (PoI) for three axes) or an inverse perspective (PoI lies on the image plane) or maybe a "central" perspective (PoI in the center of the Menger-sponge...)

Afaik, a lot of paintings used that.

The PoI is the point, where all infinite straight lines meet due to perspective distortion.

Could give interesting twists on the shape smiley

Or, also possible maybe, what's about an hyperbolic Menger-sponge, where rather than 27 cubes form a bigger cube, say 84 do so... - I'm not sure right now how that looks like but my idea is, that more cubes can touch in hyperbolic space while still tesselating the plane. basically you could do the same as in euclidean, but instead of letting 1 corner of a cube letting touch 6 other cubes' corners, you could change that to a higher number...
(probably, though, the 2D-case should be done first, before investigating in the 3D-case...)

Oh, and something probably way simpler: Could you please upload pngs or something? especially the colourful castle suffers a lot from the jpeg-compression smiley
« Last Edit: November 25, 2009, 10:03:46 PM by kram1032 » Logged
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #17 on: November 25, 2009, 11:12:18 PM »

For an idea on what you would see if you are inside a 3D tiling of hyperbolic cubes, look here :
http://www.josleys.com/htmlgalleries/flash/Cube%20hyperbolique.html
Logged
jehovajah
Global Moderator
Fractal Senior
******
Posts: 2749


May a trochoid in the void bring you peace


WWW
« Reply #18 on: November 26, 2009, 02:26:23 AM »

could rf used as a visualisation of structured space say in a crystal lattice, or a planetary/ gravitational / molecular system.
Logged

May a trochoid of ¥h¶h iteratively entrain your Logos Response transforming into iridescent fractals of orgasmic delight and joy, with kindness, peace and gratitude at all scales within your experience. I beg of you to enrich others as you have been enriched, in vorticose pulsations of extravagance!
Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #19 on: November 29, 2009, 07:03:48 PM »

I found incredible 1k intro on scene.org:
http://scene.org/file.php?file=/parties/2009/breakpoint09/in4k/tbc_-_untraceable_partyhack.zip&fileinfo

It consists real-time 3D sierpinski triangle, menger sponge and some other fractals (and nice music in background). Size of exe file is ONLY 1k!!!
Logged

twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #20 on: January 04, 2010, 04:59:13 PM »

I don't know. I leave the Mandelbulb alone for 5 minutes, and look what it's gone and done to my precious Menger sponge!!  police Big 2500x2500 version available here:



For the curious, this is a simple boolean "AND" to the Menger sponge and Mandelbulb. In other words, each point has to be part of both sets for it to be part of the new hybrid set.

*****EDIT*****
kram1032, those perspective tricks sound good, and probably not too tricky to implement (I've sometimes thought about inverse perspective). I'll see what I can do.

Here's a full PNG of the earlier castle menger sponge btw:
http://www.skytopia.com/project/fractal/new/menger-persp2b.png
« Last Edit: January 04, 2010, 05:37:53 PM by twinbee » Logged
Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #21 on: January 04, 2010, 05:40:59 PM »

Fantastic idea and render!!! I think it is impossible to render this with DE :-)
Logged

kram1032
Fractal Senior
******
Posts: 1863


« Reply #22 on: January 04, 2010, 06:49:14 PM »

heh...

nice half-molten Menger smiley
It had some thermite for dinner, right?

Already curious about twisted perspectives smiley
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #23 on: September 17, 2010, 09:28:14 PM »

Sorry for bumping this old thread. I'm working on aperiodic tilings thanks to tomkh's thread and just think it's related to this dicussion. My objective is to find DE estimate for aperiodic 3D tilings. On the way I remembred this thread and am having answers to a some questions:
Here are the DE for twinbee's Menger sponge and Buddhi's sphere sponge:
Code:
//Derived from twinbee's algorithm
MengerSponge3(x, y, z) {//by recursively digging a box
   x=x*0.5+0.5;y=y*0.5+0.5;z=z*0.5+0.5;//center it by changing position and scale
   
   xx=abs(x-0.5)-0.5;yy=abs(y-0.5)-0.5;zz=abs(z-0.5)-0.5;
   d1=max(xx,max(yy,zz));//distance to the box
   d=d1;//current computed distance
   p=1;
   for(m=1; m<MI ; m++) {

      xa = 3*x*p % 3;
      ya = 3*y*p % 3;
      za = 3*z*p % 3;
      p*=3;

      //we can also translate/rotate (xa,ya,za) without affecting the DE estimate

      xx=0.5-abs(xa-1.5);yy=0.5-abs(ya-1.5);zz=0.5-abs(za-1.5);
      d1=min(max(xx,zz),min(max(xx,yy),max(yy,zz)))/p;//distance inside the 3 axis aligned square tubes
     
      d=max(d,d1);//intersection
   }
   return d*2; //the distance estimate. The "*2" is because of the scaling we did at the begining of the function
}
Code:
//derived from Buddhi's algorithm
SphereSponge3(x, y, z) {//by recursively digging space
   //Same as for the Menger sponge but with spheres
   x+=1;y+=1;z+=1;
   intrad=param1;
   scl=3;mod=4;
   a=x;b=y;c=z;k=2;
   d=-100;
   for (L = 0; L < MI ; L++)
   {
     xx = a * k % mod - 0.5*mod;
     yy = b * k % mod - 0.5*mod;
     zz = c * k % mod - 0.5*mod;
     r2=xx*xx + yy*yy + zz*zz;
     d1=(intrad-sqrt(r2))/k;//distance to the edge of the sphere (positive inside)
     d=max(d,d1);//intersect
     
     k *= scl;
   }
   return d;// distance estimate
}
(needs some optimizations embarrass but it is already quite fast afro)
It's possible to use the same technique to other figures (fractals and tilings).

Fantastic idea and render!!! I think it is impossible to render this with DE :-)
It's actually possible (and well known): the intersection is obtained by taking the maximum DE of the two objects. That's what I am using in the codes above. union can also be obtained by taking the minimum DE instead.

BTW: There is another well known trick In distance fied rendering: Blending. Just take a linear (or higher order) interpolation of the DE of the two objects.
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #24 on: October 23, 2010, 04:24:31 PM »

min(DEbox,DEbulb)TEST:


Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #25 on: October 09, 2013, 05:41:39 PM »

Found an error in the Fragmentarium implement of NewMenger. cheesy
The DE is buggy currently; the sponge tends to disappear. cry
If you replace...

Code:
float DE(vec3 p)
{
p=p*0.5+vec3(0.5);
vec3 pp= abs(p-0.5)-0.5;
float k=1.0;
float d1 = max(pp.x,max(pp.y,pp.z));
float d=d1;
for (int i = 0; i < Iterations ; i++)
{
vec3 pa = mod(3.0*p*k, 3.0);
k *= Scale;

pp = 0.5-abs(pa-1.5)+Offset;
             pp*=rot;
d1=min(max(pp.x,pp.z),min(max(pp.x,pp.y),max(pp.y,pp.z)))/k;//distance inside the 3 axis aligned square tubes
d=max(d,d1);
if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(pp,dot(pp,pp))));

}

// Use this to crop to a sphere:
//  float e = clamp(length(z)-2.0, 0.0,100.0);
//  return max(d,e);// distance estimate
return d;
}

with...

Code:
float DE(vec3 p)
{
p=p*0.5+vec3(0.5);
vec3 pp= abs(p-0.5)-0.5;
float k=1.0;
float d1 = max(pp.x,max(pp.y,pp.z));
float d=d1;
for (int i = 0; i < Iterations ; i++)
{
vec3 pa = mod(3.0*p*k, 3.0);

pp = 0.5-abs(pa-1.5)+Offset;
             pp*=rot;
d1= (1/k) * min(max(pp.x,pp.z),min(max(pp.x,pp.y),max(pp.y,pp.z)))/k;//distance inside the 3 axis aligned square tubes
            
d=max(d,d1); k *= Scale;
if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(pp,dot(pp,pp))));

}

// Use this to crop to a sphere:
//  float e = clamp(length(z)-2.0, 0.0,100.0);
//  return max(d,e);// distance estimate
return d;
}

Because d1 must be properly scaled (multiplied by 1/k). Now it renders perfectly! police police police
Logged

No sweat, guardian of wisdom!
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #26 on: October 13, 2013, 11:46:24 PM »

Hi DarkBeam,

The code you posted produce much worse results than the original code on my computer. Are you sure you didn't change something else? Can you post the full fragment?
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #27 on: October 15, 2013, 12:43:58 PM »

 embarrass me = stuuuupid!!!!!!!!

d1= (1/k) * min(max(pp.x,pp.z),min(max(pp.x,pp.y),max(pp.y,pp.z)))/k;//distance inside the 3 axis aligned square tubes

Is of course wrong because I divided twice!
It should be

d1= (1/k) * min(max(pp.x,pp.z),min(max(pp.x,pp.y),max(pp.y,pp.z)));//distance inside the 3 axis aligned square tubes

sorry but as weird as it sounds; I can not say if it's correct or send the script because my drivers fail to run now fiery - btw it works great into Mandelbulb3D A Beer Cup
Logged

No sweat, guardian of wisdom!
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A Menger Sponge Images Showcase (Rate My Fractal) David Makin 5 5307 Last post April 02, 2007, 03:16:32 AM
by bradorpoints
Spherical projection of Menger Sponge Images Showcase (Rate My Fractal) heneganj 1 2746 Last post March 17, 2007, 12:09:57 AM
by lycium
Menger sponge fly-through 3D Fractal Generation twinbee 10 6887 Last post February 16, 2009, 05:43:21 AM
by twinbee
4D Menger sponge Sierpinski Gasket « 1 2 » makc 27 18067 Last post December 09, 2016, 04:01:39 PM
by knighty
3D menger sponge fly through Movies Showcase (Rate My Movie) DonWebber 0 2814 Last post September 14, 2010, 01:01:18 AM
by DonWebber

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.186 seconds with 25 queries. (Pretty URLs adds 0.013s, 2q)