Révision | b5ac95337c64a7d9c9672b33593f6d80b87cc626 (tree) |
---|---|
l'heure | 2023-12-09 06:54:40 |
Auteur | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
A couple of simple files to geneata optical illusion with tex.
@@ -0,0 +1,18 @@ | ||
1 | +\documentclass{standalone} | |
2 | +\usepackage{tikz} | |
3 | +\begin{document} | |
4 | + | |
5 | +\begin{tikzpicture} | |
6 | + \fill[color=black!40!white] (-6,-6) rectangle (6,6); | |
7 | + \foreach \n/\r/\twist in {70/5/12,56/4/-12,42/3/12,28/2/-12}{ | |
8 | + \foreach \m in {1,3,...,\n} | |
9 | + \draw [thick,color=white,shift={(360/\n*\m:\r)},rotate=\twist+360/\n*\m] | |
10 | + (-.15,-.15) rectangle (.15,.15); | |
11 | + \foreach \m in {2,4,...,\n} | |
12 | + \draw [thick,color=black,shift={(360/\n*\m:\r)},rotate=\twist+360/\n*\m] | |
13 | + (-.15,-.15) rectangle (.15,.15); | |
14 | + } | |
15 | +\end{tikzpicture} | |
16 | + | |
17 | +\end{document} | |
18 | + |
@@ -0,0 +1,17 @@ | ||
1 | +\documentclass[pstricks,border=12pt]{standalone} | |
2 | +\newpsstyle{gridstyle} | |
3 | +{ | |
4 | + gridlabels=0, | |
5 | + gridwidth=6pt, | |
6 | + subgriddiv=1, | |
7 | + gridcolor=gray, | |
8 | +} | |
9 | +\begin{document} | |
10 | +\begin{pspicture}(8,8) | |
11 | + \psframe*(8,8) | |
12 | + \psgrid[style=gridstyle] | |
13 | + \psset{linecolor=white} | |
14 | + \multips(0,1)(0,1){7}{\multips(1,0)(1,0){7}{\qdisk(0,0){4.242pt}}} | |
15 | +\end{pspicture} | |
16 | +\end{document} | |
17 | + |