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