Anonymous user
Kronecker product based fractals: Difference between revisions
→{{header|Maxima}}
imported>Maxima enthusiast |
imported>Maxima enthusiast |
||
Line 2,792:
=={{header|Maxima}}==
Using function defined in Kronecker product task page. [[https://rosettacode.org/wiki/Kronecker_product#Maxima|KroneckerProduct]]
[[File:Vicsek.png|thumb]]
Line 2,803:
/* Examples (images are shown in format png)*/
/* A to generate Vicsek fractal */
/* B to generate Sierpinski carpet fractal */
A:matrix([0,1,0],[1,1,1],[0,1,0])$
B:matrix([1,1,1],[1,0,1],[1,1,1])$
/* Vicsek */
pow_kron(A,3)$
at(%,[0="",1="x"]);
/* Sierpinski carpet */
pow_kron(B,3)$
at(%,[0="",1="x"]);
|