Advertisement
kkoudas

chapterThomae

Jul 19th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. \chapter{chapterThomae}
  2.  
  3. \begin{center}
  4. \begin{tikzpicture}[scale=8]
  5. \draw [-stealth] (-0.1,0) -- (1.1,0);
  6. \draw [-stealth] (0,-0.1) -- (0,0.6);
  7. \foreach \X in {1,...,7}
  8. {\ifnum\X=1
  9. \else
  10. \draw (0.02,1/\X) -- (-0.02,1/\X) node[left,xshift={(-(1+pow(-1,\X)))*3pt}]{$\frac{1}{\X}$};
  11. \fi
  12. }
  13. \foreach \X [evaluate=\X as \Ymax using {int(\X-1)}]in {95,94,...,2}
  14. {\foreach \Y in {1,...,\Ymax}
  15. {\ifnum\X<6
  16. \draw (\Y/\X,0.02) -- (\Y/\X,-0.02) node[below,fill=white]{$\frac{\Y}{\X}$};
  17. \else
  18. \draw[ultra thin] (\Y/\X,0.01) -- (\Y/\X,-0.01);
  19. \fi
  20. \pgfmathtruncatemacro{\TST}{gcd(\X,\Y)}
  21. \ifnum\TST=1
  22. \fill ({\Y/\X},1/\X) circle(0.05pt);
  23. \fi
  24. }
  25. }
  26. \foreach \X in {0,1,...,80}
  27. {\fill (\X/80,0) circle(0.05pt); }
  28. \end{tikzpicture}
  29. \end{center}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement