coordinate-system-2.tex 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. \tkzMarkAngle[fill=green!20,size=0.3cm,opacity=.5](X,O,Y)
  12. \tkzLabelAngle[pos=0.15](X,O,Y){$\cdot$}
  13. \tkzDrawLine[add=3 and 2](O,X)
  14. \tkzLabelLine[below,pos=3](O,X){$g_1$}
  15. \tkzLabelLine[right,pos=3](O,Y){$g_2$}
  16. \tkzDrawLine[add=3 and 2](O,Y)
  17. \tkzDefLine[orthogonal=through P,/tikz/overlay](O,X) \tkzGetPoint{helper}
  18. \tkzInterLL(O,X)(P,helper) \tkzGetPoint{xp}
  19. \draw [decorate,decoration={brace,amplitude=4pt,mirror}]
  20. (O) -- (xp) node [black,midway,xshift=0cm, yshift=-0.3cm]
  21. {\footnotesize $x_P$};
  22. \tkzDefLine[orthogonal=through P,/tikz/overlay](O,Y) \tkzGetPoint{helper}
  23. \tkzInterLL(O,Y)(P,helper) \tkzGetPoint{yp}
  24. \draw [decorate,decoration={brace,amplitude=4pt}]
  25. (O) -- (yp) node [black,midway,xshift=-0.4cm]
  26. {\footnotesize $y_P$};
  27. \tkzDrawPolygon(O,xp,P,yp)
  28. \tkzLabelPoint[above right](P){$P$}
  29. \tkzLabelPoint[below left](O){$0$}
  30. \tkzLabelPoint[below](xp){$P_X$}
  31. \tkzLabelPoint[left](Y){$P_Y$}
  32. \node at ($(-2,2)$){$X$};
  33. \tkzDrawPoints(P,Y,xp)
  34. \end{tikzpicture}
  35. \end{document}