   Surface Area of a Menger Sponge
  Hi,While I'm working on implementing a 3D version, an interesting corollary came up--the surface area.  A Google search and common sense easily proves that an infinite-n Menger Sponge has infinite surface area.  However, a level-n Menger Sponge has a finite surface area.  So, assuming the side length of the bounding box is 1, what is the formula for the surface area of a level n Menger sponge?  Thanks,-G   
  working from the diagrams of the shapes and understanding of the iterations, you can work out directly the first few, and noticing the pattern, get a general result:0 iterations:A = 61 iteration:A = (6x8 + 6x4)/9 = 72/9 = 82 iterations:A = ((6x8 + 6x4)x8 + 6x4x20)/(9x9) = 1056/81 = 13.0373 iterations:A = ((6x8 + 6x4)x8x8 + 6x4x20x(8) + 6x4x(20x20)))/(9x9x9) = 18048/729 = 24.7574 itrations:A= ((6x8 + 6x4)x8x8x8 + 6x4x20x(8x8) + 6x4x(20x20)x8 + 6x4x(20x20x20))/(9x9x9x9)i think this is right, someone can perhaps come up with a direct formula, an iterative formula is far simpler:[Edited by - luca-deltodesco on May 14, 2009 3:25:46 PM];  I getA[0]=6A[n+1]=20/9*A[n]-6*(8/9)^n [EDIT: This is wrong; see my message below]You can also writeA[n] = 2*(20/9)^n + 4*(8/9)^n[Edited by - alvaro on May 15, 2009 6:17:30 AM];  your direct formula is correct, your iterative formula is incorrect.and here is another way to derive mine.with a different series, N (N being number of square faces in the sponge)N[0] = 6N[1] = 8N[0] + 4x6x1  (each face of original is split into 8, and also 4x6 for the holes)N[2] = 8N[1] + 4x6x20 (each face of N[1] is again split into 8, you then get the additional 4x6x20 for the new holes)N[3] = 8N[2] + 4x6x20x20 (same again)noting that the multiplier for 4x6 on the right is the number of cubes.N[n+1] = 8N[n] + 24x20^nthe area series is then given byA[n] = N[n]/9^nA[n+1] = (8/9)A[n] + (24/9)x(20/9)^nwhich givesN[1] = 72  which you can check from diagram of the sponge that it is correctandA[1] = N[1]/9 = 8whereas yours is (using your iterative formula)A[1] = 20/9*6 - 6 = 7.(3) which gives that N[1] would be 66...a direct formula for mine is:which is the same as yours   ;Quote:Original post by luca-deltodescoyour direct formula is correct, your iterative formula is incorrect.Yes, there is a typo. It should have beenA[0]=6A[n+1]=20/9*A[n]-6*(8/9)^(n+1);  Wow, this is great!  Thanks all!   