summaryrefslogtreecommitdiff
path: root/info/drawing-with-metapost/src/torn-edge-circle.mp
blob: 9a461eb7370c101e9ca71f2207e7fdf66739542f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
\documentclass{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
input torn-edge
beginfig(1);
path c; c = fullcircle scaled 200;
draw c withcolor .8 white;
y=0; n = 600;
path t; t = for i=0 upto n-1:
  point i/n*length(c) of c 
  + (0, walkr y) rotated angle direction i/n*length(c) of c
  -- 
endfor cycle;
draw t withcolor .67 red;
endfig;
\end{mplibcode}
\end{document}