TeX Art Fun - Mandalas

One colossal fading...

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{fadings}
\begin{tikzfadingfrompicture}[name=mandela]
\tikzset{%
  filled/.style={%
    fill=pgftransparent,
    draw=pgftransparent!0,
  },
  line join=round,
  doubled/.style={
    double=pgftransparent,
    double distance=#1,
  }, 
  doubled/.default=1.5}
\foreach \i in {0,2,...,15}{
  \tikzset{shift=(360/16*\i:4)}
  \foreach \j in {0,...,19}
    \path[filled,doubled] (360/19*\j:1) circle [radius=1/6];
  \path [filled,doubled] circle [radius=1];
  \foreach \j in {0,...,23}
    \path[filled,doubled] (360/24*\j:6/8) circle [radius=1/16];
}
\foreach \i in {1,3,...,15}{
  \tikzset{shift=(360/16*\i:3), rotate=360/16*\i+90, scale=-1}
  \path [discard] (1,0) arc (315:450:1/2) arc (315:450:1/3) arc (315:360:1/4)
    coordinate (a);
  \path [filled, doubled] 
    (-1,0) arc (225:90:1/2) arc (225:90:1/3) arc (225:180:1/4)
    .. controls ++(90:1/4) and ++(260:1/4) ..(0,5/2) 
    .. controls ++(280:1/4) and ++(90:1/4) .. (a)
    arc (360:315:1/4) arc (450:315:1/3) arc(450:315:1/2);
  \foreach \j in {0,1,-1,2,-2,3,-3}
    \path [filled, doubled, shift=(270:1/3),rotate=90+10*\j]
      (0,0) .. controls ++(1/8,0) and ++(-1/8,0) .. ({1.5-abs(\j/3)},-1/8)
      arc (270:450:1/8) -- cycle;
}
\foreach \i in {0,1}{
  \foreach \j [evaluate={\k=360/8*(\i+\j);}] in {0,2,...,7}{
    \tikzset{shift=(\k:2), rotate=\k+90, scale=-1}
    \path [discard] (1,0) arc (315:450:1/2) arc (315:360:1/3)
      coordinate (a);
    \path [filled, doubled] 
      (-1,0) arc (225:90:1/2) arc (225:180:1/3)
      .. controls ++(90:1/4) and ++(260:1/4) ..(0,9/4) 
      .. controls ++(280:1/4) and ++(90:1/4) .. (a)
      arc (360:315:1/3) arc(450:315:1/2);
    \foreach \k in {0,1,-1}
      \path [filled, doubled, rotate=90+10*\k]
        (1/2,0) .. controls ++(1/8,0) and ++(-1/8,0) .. ({1.5-abs(\k/3)},-1/8)
         arc (270:450:1/8) -- cycle;
  }
}
\foreach \i in {0,2,...,15}{
  \tikzset{shift=(360/16*\i:2)}
  \foreach \j in {0,...,19}
    \path [filled,doubled] (360/19*\j:3/4) circle [radius=1/8];
  \path [filled,doubled] circle [radius=3/4];
  \path [filled,doubled] circle [radius=1/2];
  \path [filled,doubled] circle [radius=1/4];
}
\path [filled, doubled] circle [radius=9/4];
\foreach \i in {0,2,...,31}
  \path[filled,doubled] (360/32*\i:6/4) circle [radius=1/3];
\foreach \i in {0,1}{
 \foreach \j [evaluate={\k=360/16*(\i+\j);}] in {0,2,...,15}{
   \tikzset{shift=(\k:1), rotate=\k+90, scale=-1}
   \path [filled, doubled]
     (-1/4, 0) 
     .. controls ++(135:1/2) and ++(260:1/2) .. (0,7/8)
     .. controls ++(280:1/2) and ++(45:1/2)  .. (1/4,0);
  \path [filled, doubled]
    (0,0) .. controls ++(135:1/8) and ++(270:1/8) ..
    (-1/8,1/3) arc (180:0:1/8) .. controls ++(270:1/8) and ++(45:1/8) .. cycle;
  }
}
\path [filled, doubled] circle [radius=5/4];
\foreach \i in {0,1}
  \foreach \j in {0,1,...,11}
    \path [filled, doubled, rotate=90+30*\j+\i*15]
      (0,0) .. controls ++(1/8,0) and ++(-1/8,0) .. (7/8,-1/8)
       arc (270:450:1/8) -- cycle;     
\path [filled, doubled] circle [radius=3/4];
\foreach \i in {0,1}{
 \foreach \j [evaluate={\k=360/6*(\i+\j);}] in {0,2,...,5}{
   \tikzset{shift=(\k:1/4), rotate=\k+90, scale=-1}
   \path [filled, doubled]
     (-1/8, 0) 
     .. controls ++(135:1/8) and ++(250:1/8) .. (0,1/4)
     .. controls ++(290:1/8) and ++(45:1/8)  .. (1/8,0);
  }
}
\path [filled, doubled] circle [radius=1/4];
\end{tikzfadingfrompicture}
\pgfdeclareradialshading{mandela}{\pgfpointorigin}{%
  color(0cm)=(yellow);
  color(0.2cm)=(red);
  color(0.4cm)=(purple);
  color(0.6cm)=(blue);
  color(0.8cm)=(cyan);
  color(1cm)=(cyan)}
\begin{document}
\begin{tikzpicture}
\shade [shading=mandela, path fading=mandela, fit fading=false]
  (-6,-6) rectangle (6,6);
\end{tikzpicture}
\end{document}

enter image description here


This is a very quickly written proposal to get the party started.

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[pics/leaf/.style={code={
 \pgfgettransformentries{\myxx}{\myxy}{\myyx}{\myyy}{\tmp}{\tmp}
 \pgfmathsetmacro{\myscale}{sqrt(\myxx*\myyy-\myxy*\myyx)}
 \draw[line width=\myscale*1pt,pic actions] (-0.1,0) to[out=80,in=-80] (0,0.5)
 to[out=100,in=-90] (-0.5,1) to[out=90,in=-80] (-0.03,2) -- (0,2)
 to[out=-80,in=90] (0.5,1) to[out=-90,in=80] (0.1,0.5)
 to[out=-100,in=95] (0.1,0) -- cycle;}}]
 \path foreach \Radius [count=\Cnt] in {4,2,1,0.5} 
 {foreach \Angle [evaluate=\Angle as \EffAngle using {\Angle-15*\Cnt}] 
 in {0,30,...,330} { (\EffAngle:\Radius) 
 pic[rotate=\EffAngle-90,scale=\Radius,fill=white]{leaf}}};
\end{tikzpicture}
\end{document}

enter image description here

Or at the special request of a small marmot.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shadings}
\begin{document}
\begin{tikzpicture}[pics/leaf/.style={code={
 \pgfgettransformentries{\myxx}{\myxy}{\myyx}{\myyy}{\tmp}{\tmp}
 \pgfmathsetmacro{\myscale}{sqrt(\myxx*\myyy-\myxy*\myyx)}
 \begin{scope}[line width=\myscale*1pt]
 \draw[clip] (-0.1,0) to[out=80,in=-80] (0,0.5)
 to[out=100,in=-90] (-0.5,1) to[out=90,in=-80] (-0.03,2) -- (0,2)
 to[out=-80,in=90] (0.5,1) to[out=-90,in=80] (0.1,0.5)
 to[out=-100,in=95] (0.1,0) -- cycle;
 \shade[shading=color wheel] (O) circle[radius=12cm];
 \end{scope}}}]
 \path (0,0) coordinate (O);
 \path foreach \Radius [count=\Cnt] in {4,2,1,0.5} 
 {foreach \Angle [evaluate=\Angle as \EffAngle using {\Angle-15*\Cnt}] 
 in {0,30,...,330} { (\EffAngle:\Radius) 
 pic[rotate=\EffAngle-90,scale=\Radius,fill=white]{leaf}}};
\end{tikzpicture}
\end{document}

enter image description here

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shadings}
\begin{document}
\begin{tikzpicture}[pics/leaf/.style={code={
 \pgfgettransformentries{\myxx}{\myxy}{\myyx}{\myyy}{\tmp}{\tmp}
 \pgfmathsetmacro{\myscale}{sqrt(\myxx*\myyy-\myxy*\myyx)}
 \begin{scope}[line width=\myscale*1pt]
 \draw[clip] (-0.1,0) to[out=80,in=-80] (0,0.5)
 to[out=100,in=-90] (-0.5,1) to[out=90,in=-80] (-0.03,2) -- (0,2)
 to[out=-80,in=90] (0.5,1) to[out=-90,in=80] (0.1,0.5)
 to[out=-100,in=95] (0.1,0) -- cycle;
 \shade[#1,shading=color wheel] (O) circle[radius=12cm];
 \end{scope}}}]
 \path (0,0) coordinate (O);
 \path foreach \Radius [count=\Cnt] in {4,2,1,0.5} 
 {foreach \Angle [evaluate=\Angle as \EffAngle using {\Angle-15*\Cnt}] 
 in {0,30,...,330} { (\EffAngle:\Radius) 
 pic[rotate=\EffAngle-90,scale=\Radius,fill=white]{leaf={transform canvas={rotate=-pi*\EffAngle}}}}};
\end{tikzpicture}
\end{document}

enter image description here


Here is a suggestion, using knots and springs from the nice fiziko library for MetaPost by @sergey-slyusarev. Compile with context.

\startMPpage[offset=3bp]
\input fiziko;
u:=2cm;
path p[];
p[0] = function(2,"(4+3cos(5x))*cos(x)","(4+3cos(5x))*sin(x)",epsed(0),epsed(2pi),1/50) .. cycle;

p[1] := p[0] scaled u;
p[2] := p[1] rotated 24;
p[3] := p[2] rotated 24;
p[4] := fullcircle scaled 13u;
p[5] := fullcircle scaled 8u;
p[6] := fullcircle scaled 3u;

springwidth:=1/10u;
for i=1 upto 15:
draw spring(origin,(u-1/8cm,0) rotated (24i-12),5) withpen pencircle scaled 0.5;
endfor;

addStrandToKnot (flowerouter) (p1, 1/8cm, "e", "1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1");
addStrandToKnot (flowerouter) (p2, 1/8cm, "e", "1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1");
addStrandToKnot (flowerouter) (p3, 1/8cm, "e", "1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1");
addStrandToKnot (flowerouter) (p4, 1/2cm, "e", "");
addStrandToKnot (flowerouter) (p5, 1/2cm, "e", "");
addStrandToKnot (flowerouter) (p6, 1/2cm, "e", "");
draw knotFromStrands (flowerouter);
\stopMPpage

The mandala showing

Tags:

Fun