robot-yaw.tex 872 B

12345678910111213141516171819202122232425262728
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage{amsmath,amssymb}
  5. \usepackage{tikz}
  6. \usetikzlibrary{calc}
  7. \begin{document}
  8. \begin{preview}
  9. \begin{tikzpicture}
  10. \newcommand\angleR{35}
  11. \newcommand\radiusR{4cm}
  12. \coordinate[label=below left:$O$] (O) at (0,0);
  13. \draw[->,very thick] (0,0)--(0,5) node[above] {$x$};
  14. \draw[->,very thick] (0,0)--(-2.5,0) node[left] {$y$};
  15. \node at (90+15:\radiusR+0.5cm) {$\alpha > 0$};
  16. \node at (90-15:\radiusR+0.5cm) {$\alpha < 0$};
  17. \draw[fill=orange!30] (-1,-1) rectangle (1,2);
  18. \draw[fill=blue!30] (0,2) circle (0.3cm);
  19. % Draw angle
  20. \begin{scope}[shift={(0,0)}]
  21. \draw[thick, <->] ([shift={({90+\angleR}:\radiusR)}]-0.0,0) arc ({90+\angleR}:{90-\angleR}:\radiusR);
  22. \end{scope}
  23. \end{tikzpicture}
  24. \end{preview}
  25. \end{document}