pentagon-inscribed-circle.tex 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage{tikz}
  5. \usepackage{tkz-euclide}
  6. \usetkzobj{all}
  7. \usetikzlibrary{shapes, calc, decorations}
  8. \usepackage{amsmath,amssymb}
  9. \usepackage{helvet}
  10. \usepackage[eulergreek]{sansmath}
  11. \begin{document}
  12. \begin{preview}
  13. \begin{tikzpicture}[very thick,font=\sansmath\sffamily]
  14. \tkzDefPoint(0, 0){CircleCenter}
  15. \tkzDrawCircle[R](CircleCenter,3cm)
  16. % Define 5 points on a circle
  17. \tkzDefPoint( 30:3){BCT}
  18. \tkzDefPoint( 90:3){CDT}
  19. \tkzDefPoint(135:3){DET}
  20. \tkzDefPoint(215:3){EAT}
  21. \tkzDefPoint(300:3){ABT}
  22. % Tangents
  23. \tkzDefLine[perpendicular=through EAT](CircleCenter,EAT)\tkzGetPoint{EAT2}
  24. \tkzDefLine[perpendicular=through BCT](CircleCenter,BCT)\tkzGetPoint{BCT2}
  25. \tkzDefLine[perpendicular=through CDT](CircleCenter,CDT)\tkzGetPoint{CDT2}
  26. \tkzDefLine[perpendicular=through DET](CircleCenter,DET)\tkzGetPoint{DET2}
  27. \tkzDefLine[perpendicular=through ABT](CircleCenter,ABT)\tkzGetPoint{ABT2}
  28. % Find the points by intersecting the tangents
  29. \tkzInterLL(EAT,EAT2)(ABT,ABT2)\tkzGetPoint{A}
  30. \tkzInterLL(ABT,ABT2)(BCT,BCT2)\tkzGetPoint{B}
  31. \tkzInterLL(BCT,BCT2)(CDT,CDT2)\tkzGetPoint{C}
  32. \tkzInterLL(CDT,CDT2)(DET,DET2)\tkzGetPoint{D}
  33. \tkzInterLL(DET,DET2)(EAT,EAT2)\tkzGetPoint{E}
  34. % Background
  35. \tkzDrawPolygon[thick,fill=gray!10](A,B,C,D,E)
  36. \tkzDrawSegments(CircleCenter,EAT CircleCenter,BCT CircleCenter,CDT CircleCenter,DET CircleCenter,ABT)
  37. \tkzLabelSegment[left](CircleCenter,EAT){r}
  38. \tkzLabelSegment[below](CircleCenter,BCT){r}
  39. \tkzLabelSegment[right](CircleCenter,CDT){r}
  40. \tkzLabelSegment[right](CircleCenter,DET){r}
  41. \tkzLabelSegment[right](CircleCenter,ABT){r}
  42. % Draw points
  43. \tkzDrawCircle[R,thick,draw=red](CircleCenter,3cm)
  44. \tkzLabelPoints[below left,font=\sansmath\sffamily](A)
  45. \tkzLabelPoints[below right,font=\sansmath\sffamily](B)
  46. \tkzLabelPoints[above right,font=\sansmath\sffamily](C)
  47. \tkzLabelPoints[above left,font=\sansmath\sffamily](D)
  48. \tkzLabelPoints[left,font=\sansmath\sffamily](E)
  49. % % Draw polygon
  50. \tkzDrawPolygon[very thick](A,B,C,D,E)
  51. \end{tikzpicture}
  52. \end{preview}
  53. \end{document}