This task is based on &nbsp; [[Kronecker product| Kronecker product]] &nbsp; of two matrices. 

If your language has no a built-in function for such product then you need to implement it first.

The essence of fractals is self-replication (at least, self-similar replications). 

So, using &nbsp; '''n''' &nbsp; times self-product of the matrix &nbsp; (filled with '''0'''/'''1''') &nbsp; we will have a fractal of the &nbsp; '''n'''<sup>th</sup> &nbsp; order.

Actually, "self-product" is a Kronecker power of the matrix.

In other words: for a matrix &nbsp; '''M''' &nbsp; and a power &nbsp; '''n''' &nbsp; create a function like &nbsp; '''matkronpow(M, n)''', 
<br>which returns &nbsp; M<small>x</small>M<small>x</small>M<small>x</small>... &nbsp; ('''n''' &nbsp; times product).

A formal recurrent <i>algorithm</i> of creating Kronecker power of a matrix is the following:


;Algorithm:
<ul>
  <li>Let M is an initial matrix, and Rn is a resultant block matrix  of the Kronecker power, where n is the power (a.k.a. order).</li>
  <li>Self-product of M, i.e., M x M producing R2 (resultant matrix with order/power 2).</li>
  <li>To receive the next order/power matrix use this recurrent formula: Rn = R(n-1) x M.</li>
  <li>Plot this Rn matrix to produce the <i><b>n</b>th</i> order fractal.</li>
</ul><br>
Even just looking at the resultant matrix you can see what will be plotted.<br>
There are virtually infinitely many fractals of this type. You are limited only by your creativity and 
the power of your computer.


;Task:
Using [[Kronecker_product| Kronecker product]] implement and show two popular and well-known fractals, i.e.:
* [[wp:Vicsek fractal| Vicsek fractal]];
* [[wp:Sierpinski carpet| Sierpinski carpet fractal]].


The last one ([[Sierpinski carpet| Sierpinski carpet]]) is already here on RC, but built using different approaches.<br>


;Test cases:
These 2 fractals (each order/power 4 at least) should be built using the following 2 simple matrices: 
<pre>
          │ 0 1 0 │    and    │ 1 1 1 │
          │ 1 1 1 │           │ 1 0 1 │
          │ 0 1 0 │           │ 1 1 1 │
</pre>

;Note:
* Output could be a graphical or ASCII-art representation, but if an order is set > 4 then printing is not suitable.
* The orientation and distortion of the fractal could be your language/tool specific.
* It would be nice to see one additional fractal of your choice, e.g., based on using a single (double) letter(s) of an alphabet, any sign(s) or already made a resultant matrix of the Kronecker product.


See implementations and results below in JavaScript, PARI/GP and R languages. They have additional samples of "H", "+" and checkerboard fractals.
<br><br>

