Усуньте проміжне, назавжди
Фрактал Розщілини будується за одним правилом, яке застосовується рекурсивно. Поділіть квадрат на сітку 3x3 з дев’яти рівних підквадратів, видаліть центральний і потім застосуйте ту ж саму дію до кожного з восьми що залишилися підквадратів. Повторюйте стільки разів, скільки потрібно. Ваклав Сьєрпинський описав його у 1916 році, за два роки до більш відомого трикутника, який носить його ім’я, і це двовимірний аналог множини Кантора — одна й та ж сама дія видалення центру, один вимір вгору, в сітці замість лінії.
function carpet(x, y, size, level) {
if (level === 0) { fillSquare(x, y, size); return; }
const s = size / 3;
for (let row = 0; row < 3; row++)
for (let col = 0; col < 3; col++) {
if (row === 1 && col === 1) continue; // skip the centre cell
carpet(x + col * s, y + row * s, s, level - 1);
}
}
How much area survives
Every level keeps 8 of the 9 sub-squares, so after n levels the remaining area is (8/9)ⁿ of the original square. That ratio shrinks slowly at first — 88.9% after one level, 79% after two — but it is a genuine geometric decay: by level 10 barely under 28% of the square remains, and by level 20 less than 8%.
In the limit as n → ∞, the area goes to exactly zero, even though the carpet still contains infinitely many points and, remarkably, is still path-connected — you can walk between any two surviving points without leaving the carpet, unlike the fully-disconnected Cantor set.
A dimension between a line and a plane
The carpet’s fractal (Hausdorff) dimension follows directly from the construction: each level replaces 1 square with 8 copies at 1/3 scale, so the dimension solves 8 = 3^D, giving D = log 8 / log 3 ≈ 1.8928. That number sits between 1 (a plain line) and 2 (a filled plane) precisely because the carpet is almost a filled square — it retains most of its area at low iteration counts and only asymptotically thins to zero-area, dimension ≈1.89 dust.
This is the same log(count)/log(scale) formula that gives the Sierpinski triangle its dimension of log 3 / log 2 ≈ 1.585 (3 copies at half scale) and the Cantor set its dimension of log 2 / log 3 ≈ 0.631 (2 copies at one-third scale). Comparing the three side by side is the fastest way to build intuition for what "fractional dimension" is actually measuring: how densely a self-similar shape fills the space it’s embedded in.
The 3D cousin: the Menger sponge
Extend the same subdivide-and-remove idea to a cube split into a 3×3×3 grid of 27 sub-cubes, removing the centre cube of each face plus the very centre cube (7 removed, 20 kept), and you get the Menger sponge — a solid with zero volume, infinite surface area, and a cross-section through the middle that is exactly a Sierpinski carpet. Its dimension is log 20 / log 3 ≈ 2.727, again strictly between the dimension of a surface (2) and a solid (3).
Applications outside pure mathematics
Sierpinski carpet geometry is utilized in antenna design. Specifically, antennas constructed using Sierpinski-carpet or Sierpinski-triangle geometries are naturally multi-band due to the recursive nature of the pattern. Each iteration level resonates at a different self-similar scale, allowing a single physical antenna to efficiently respond across multiple frequency bands instead of requiring separate antennas for each band. This concept is also applied in truss and lattice engineering, where material removal at various scales reduces weight while maintaining structural integrity.
Часті запитання
Яка площа залишається після нескінченної кількості ітерацій?
Нуль. Кожен рівень утримує 8/9 від попередньої площі, а (8/9)^n → 0 при n → ∞. Килим все ще містить нескінченну кількість точок та залишається зв'язним шляхом, але його площа (вимірювальний інтеграл) дорівнює точно нулю в межі.
Чому розмірність становить 1.8928 замість цілого числа?
Кожен поділ замінює один квадрат на 8 самосхожих копій у масштабі 1/3, а розмірність фракталу розв'язує 8 = 3^D, що дає D = log 8 / log 3 ≈ 1.8928. Він знаходиться між 1 і 2, оскільки форма не є простим виміром або заповненою областю — це самосхожий набір, який зріджується за певним, вимірюваним темпом.
Чи є килим Серпінського однаковим із трикутником Серпінського?
Ні, вони будуються з різних базових форм і відношень. Трикутник видаляє центр трикутника, розділеного на 4 частини, зберігаючи 3 копії у півмасштабі (розмірність ≈1.585); килим видаляє центр квадрата, розділеного на 9 частин, зберігаючи 8 копій у третину масштабу (розмірність ≈1.893). Менгерів піна є 3D узагальненням килима.
Спробуйте наживо
Усе, що вище, працює прямо у вашому браузері — відкрийте Sierpinski Carpet і змінюйте параметри під час роботи. Нічого не встановлюється, нічого не завантажується на сервер, уся модель живе в одній вкладці.
▶ Відкрити симуляцію Sierpinski Carpet