fractals.vicsek¶
Authors Bastien Capiaux & Mehdi Oudghiri
The Vicsek fractal algorithm is a recursive algorithm that creates a pattern known as the Vicsek fractal or the Vicsek square. It is based on the concept of self-similarity, where the pattern at each level of recursion resembles the overall pattern. The algorithm involves dividing a square into 9 equal smaller squares, removing the center square, and then repeating this process on the remaining 8 squares. This results in a pattern that exhibits self-similarity and has a square-shaped outline with smaller squares within it.
Source: https://en.wikipedia.org/wiki/Vicsek_fractal
Functions¶
|
Draw a cross at the specified position and with the specified length. |
|
Recursively draw the Vicsek fractal at the specified position, with the |
|
Draw the Vicsek fractal at the specified position, with the specified |
|
|
|
Module Contents¶
- fractals.vicsek.draw_cross(x: float, y: float, length: float)¶
Draw a cross at the specified position and with the specified length.
- fractals.vicsek.draw_fractal_recursive(x: float, y: float, length: float, depth: float)¶
Recursively draw the Vicsek fractal at the specified position, with the specified length and depth.
- fractals.vicsek.draw_vicsek_fractal(x: float, y: float, length: float, depth: float, color='blue')¶
Draw the Vicsek fractal at the specified position, with the specified length and depth.
- fractals.vicsek.main()¶
- fractals.vicsek.set_color(rgb: str)¶