Catifa de Sierpinski
La catifa de Sierpinski és un conjunt fractal descrit per primer cop per Wacław Sierpiński el 1916.[1] Constitueix una generalització a dues dimensions del conjunt de Cantor. Comparteix amb ell moltes propietats: també és un conjunt compacte, no numerable i de mesura nul·la. La seva Dimensió de Hausdorff-Besicovich és
[2]
No s'ha de confondre amb altres generalitzacions com la pols de Cantor.
És universal per a tot objecte compacte del pla. Així, qualsevol corba dibuixada en el pla amb les autointerseccions que vulguem, per complicada que sigui, serà homeomorfa a un subconjunt de la catifa de Sierpinski.
Taula de continguts |
Construcció [modifica]
La construcció de la catifa de Sierpinski es defineix de forma recursiva:
- Comencem amb un quadrat.
- El quadrat es talla en 9 quadrats congruents, i eliminem el quadrat central.
- El pas anterior torna a aplicar-se recursivament a cada un dels 8 quadrats restants.
La catifa de Sierpinski és el límit d'aquest procés després d'un nombre infinit d'iteracions.
| Construcció de la catifa de Sierpinski: | |||||
| Pas 1 | Pas 2 | Pas 3 | Pas 4 | Pas 5 | |
La següent implementació és vàlida en C, C++ i Java:
/** * Decides if a point at a specific location is filled or not. * @param x is the x coordinate of the point being checked * @param y is the y coordinate of the point being checked * @param width is the width of the Sierpinski Carpet being checked * @param height is the height of the Sierpinski Carpet being checked * @return 1 if it is to be filled or 0 if it is not */ int isSierpinskiCarpetPixelFilled(int x, int y, int width, int height) { // base case 1 of 2 if ((x <= 0)||(y <= 0)||(x>=width)||(y>=height)) //top row or left column or out of bounds should be full { return 1; } { /* If the grid was split in 9 parts, what part(x2,y2) would x,y fit into? */ int x2 = x * 3 / width; // an integer from 0..2 inclusive int y2 = y * 3 / height; // an integer from 0..2 inclusive // base case 2 of 2 if (x2 == 1 && y2 == 1) // if in the center square, it should be empty return 0; // general case /* offset x and y so it becomes bounded by 0..width/3 and 0..height/3 and prepares for recursive call some offset is added to make sure the parts have all the correct size when width and height isn't divisible by 3 */ x -= (x2 * width+2) / 3; y -= (y2 * height+2) / 3; width = (width +2-x2)/3; height = (height+2-y2)/3; } return isSierpinskiCarpetPixelFilled(x, y, width, height); }
Referències [modifica]
- ↑ W. Sierpinski. Sur une courbe cantorienne qui contient une image biunivoquet et continue detoute courbe donée. C.R. Acad. París (1916) 629-632.
- ↑ Xavier Tolsa. «Els problemes de Vitushkin i de Painlevé» (pdf). [Consulta: 18-09-2011].
Vegeu també [modifica]
Enllaços externs [modifica]
| A Wikimedia Commons hi ha contingut multimèdia relatiu a: Catifa de Sierpinski |
| Açò és un esborrany sobre matemàtiques. Amplieu-lo! (citant les fonts) |