Logo by stardust4ever - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. August 08, 2022, 03:03:55 AM


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 987 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 668 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 899 Last post September 23, 2010, 12:48:55 AM
by Lee Oliver
cube assembly Mandelbulber Gallery tomot 0 508 Last post April 01, 2011, 11:09:26 PM
by tomot
Diving thru Menger/Sierpinski Movies Showcase (Rate My Movie) 0Encrypted0 0 694 Last post December 18, 2012, 09:35:59 AM
by 0Encrypted0
Menger Ice Cube - 3D printed Ring Mandelbulb3D Gallery KRAFTWERK 0 371 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.133 seconds with 22 queries. (Pretty URLs adds 0.005s, 2q)