Logo by Cyclops - 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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. March 28, 2024, 11:08:04 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]   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: Sierpinski-Menger Cube  (Read 1316 times)
0 Members and 1 Guest are viewing this topic.
Fray
Guest
« on: May 12, 2011, 08:33:57 PM »

Sierpinski-Menger Cube



http://www.fractalforums.com/index.php?action=gallery;sa=view;id=7224

Some variation of algorithm proposed by twinbee and modified by Buddhi.

http://www.fractalforums.com/3d-fractal-generation/revenge-of-the-half-eaten-menger-sponge/msg8920/#msg8920

Code:
ax = Math.Abs(x);
ay = Math.Abs(y);
az = Math.Abs(z);
k = 1;
i = 0;
while (i < iterations)
{
  x = (ax * k) % 2 - 1;
  y = (ay * k) % 2 - 1;
  z = (az * k) % 2 - 1;
  if (x * x * x * x + y * y * y * y + z * z * z * z < 1.01) return 0;
  k *= 3;
  i++;
}
return 1;
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
CUBE BALANCE Images Showcase (Rate My Fractal) Bent-Winged Angel 0 881 Last post September 15, 2010, 03:38:42 PM
by Bent-Winged Angel
Interpolated Hybrid Menger/Sierpinski Animation Thingy Movies Showcase (Rate My Movie) Sockratease 1 1189 Last post September 23, 2010, 12:48:55 AM
by Lee Oliver
cube assembly Mandelbulber Gallery tomot 0 749 Last post April 01, 2011, 11:09:26 PM
by tomot
Diving thru Menger/Sierpinski Movies Showcase (Rate My Movie) 0Encrypted0 0 966 Last post December 18, 2012, 09:35:59 AM
by 0Encrypted0
Menger Ice Cube - 3D printed Ring Mandelbulb3D Gallery KRAFTWERK 0 439 Last post December 31, 2013, 01:35:21 PM
by KRAFTWERK

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.15 seconds with 22 queries. (Pretty URLs adds 0.007s, 2q)