Title: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: Hamzalippisch on June 10, 2017, 02:08:37 PM Hi everyone,
I have developed a set of equations to help easily implement Sierpinski's carpet, i then made variations on that equation and got other interesting fractals and even Sierpisnki's triangles. So from an IFS it is now defined by a function. What's more is that later i generalized this equation to 3D and then to any arbitraly higher d-dimension, and the code for it remains very simple. I primarily coded it in matlab but it will work in just about any language. And finally, i have devised a way to calculate the Hausdorff dimension for any fractal of this family. For the theory and some examples that were produced, check out the paper i made about it : https://drive.google.com/open?id=0B2ITB-CPhYwJX1VzN0Z4S2tsc0E Title: Re: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: DarkBeam on June 10, 2017, 04:04:43 PM It requires a permission to open it! :hurt: :police:
Title: Re: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: Hamzalippisch on June 10, 2017, 05:01:47 PM Im sorry i thought the sharing was activated :- it is now :)
Title: Re: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: SamTiba on June 11, 2017, 01:28:53 PM I really like this one!
Nice formulas, easy implementation and stunning results :) Good job and thanks for sharing your paper with us. Title: Re: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: mclarekin on June 12, 2017, 02:14:21 AM O0 This is very interesting. Would someone write some pseudo code for 3D implementation frag??
Title: Re: Formalization of Sierpinski's carpet and similar fractals in 2d and higher d's Post by: Hamzalippisch on June 12, 2017, 11:40:59 AM I can post some matlab code for 3D and higher, the script itself only outputs an n-dimensional matrix that you'd have to visualize after making some sections if n>3 until you have a 3D matrix then you'll need to plot it as voxels. I could've written my own voxel plotter but i downloaded a free one out of laziness :embarrass: (PATCH_3DArray) A Pseudocode for 3D would be like so :) : Define precision or grid density g Define the number of iterations iter Define k and p (k=3 and p=3 for Menger's sponge for example) Make 3 arrays xgrid,ygrid,zgrid from a meshgrid (0 to 1 by a step of 1/g) (3D grid coordinates) Make a 3D matrix of ones of dimensions gxgxg, lets call it Box. For n=1:iter For i=1:number of elements in Box Box(i)=Box(i)*sign( -sign((cos(2*pi*(k)^(n-1)*xgrid(i)))+cos(pi/(p))) - sign((cos(2*pi*(k)^(n-1)*ygrid(i)))+cos(pi/(p))) - sign((cos(2*pi*(k)^(n-1)*zgrid(i)))+cos(pi/(p))) +3) End End Plot non-zero elements of Box as voxels |