triangle-thales-circle.tex 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{amsmath,scalerel}
  3. \DeclareMathOperator*{\Bigcdot}{\scalerel*{\cdot}{\bigodot}}
  4. \usepackage{tkz-euclide}
  5. \usetikzlibrary{angles,quotes}
  6. \begin{document}
  7. \usetkzobj{all}
  8. \begin{tikzpicture}
  9. \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]
  10. \tkzSetUpLine[line width=1]
  11. \tkzDefPoints{0/0/O, -5/0/A, 5/0/B, 5/5/M, -5/5/N}
  12. \tkzDefPoint(60:5){X}
  13. \tkzDefPoint(150:5){Y}
  14. \tkzDrawArc[color=black, thick, fill=gray!10](O,B)(A)
  15. % Avoid too long edges of polygon
  16. \tkzClipPolygon(A,B,M,N)
  17. \tkzClipCircle(O,B)
  18. % Draw polygons and mark right angle
  19. \tkzDrawPolygon[fill=red,fill opacity=0.3](A,B,X)
  20. \draw pic[very thick, draw, angle radius=3mm,"$\Bigcdot$",angle eccentricity=.6]{angle= A--X--B};
  21. \tkzDrawPolygon[fill=green,fill opacity=0.3](A,B,Y)
  22. \draw pic[very thick, draw, angle radius=3mm,"$\Bigcdot$",angle eccentricity=.6]{angle= A--Y--B};
  23. % lines should not colored
  24. \tkzDrawPolygon(A,B,X)
  25. \tkzDrawPolygon(A,B,Y)
  26. \tkzDrawArc[color=black, thick](O,B)(A)
  27. \end{tikzpicture}
  28. \end{document}