coordinate-system-2.tex 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tkz-euclide}
  3. \usepackage{tikz}
  4. \usetikzlibrary{decorations.pathreplacing}
  5. \begin{document}
  6. \usetkzobj{all}
  7. \begin{tikzpicture}
  8. \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]
  9. \tkzSetUpLine[line width=1]
  10. \tkzDefPoints{0/0/O, 1/0/X, 0/1/Y, 2/1/P}
  11. \tkzDrawLine[add=3 and 2](O,X)
  12. \tkzLabelLine[below,pos=3](O,X){$g_1$}
  13. \tkzLabelLine[right,pos=3](O,Y){$g_2$}
  14. \tkzDrawLine[add=3 and 2](O,Y)
  15. \tkzDefLine[orthogonal=through P,/tikz/overlay](O,X) \tkzGetPoint{helper}
  16. \tkzInterLL(O,X)(P,helper) \tkzGetPoint{xp}
  17. \draw [decorate,decoration={brace,amplitude=4pt,mirror}]
  18. (O) -- (xp) node [black,midway,xshift=0cm, yshift=-0.3cm]
  19. {\footnotesize $x_P$};
  20. \tkzDefLine[orthogonal=through P,/tikz/overlay](O,Y) \tkzGetPoint{helper}
  21. \tkzInterLL(O,Y)(P,helper) \tkzGetPoint{yp}
  22. \draw [decorate,decoration={brace,amplitude=4pt}]
  23. (O) -- (yp) node [black,midway,xshift=-0.4cm]
  24. {\footnotesize $y_P$};
  25. \tkzDrawPolygon(O,xp,P,yp)
  26. \tkzLabelPoint[above right](P){$P$}
  27. \tkzLabelPoint[below left](O){$0$}
  28. \node at ($(-2,2)$){$X$};
  29. \tkzDrawPoints(P)
  30. \end{tikzpicture}
  31. \end{document}