2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added Robot yaw

This commit is contained in:
Martin Thoma 2013-11-14 23:05:32 +01:00
parent 5da87d7827
commit 8d2b71adae
4 changed files with 65 additions and 0 deletions

35
tikz/robot-yaw/Makefile Normal file
View file

@ -0,0 +1,35 @@
SOURCE = robot-yaw
DELAY = 80
DENSITY = 300
WIDTH = 512
make:
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
gif:
pdfcrop $(SOURCE).pdf
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
make clean
png:
make
make svg
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
transparentGif:
convert $(SOURCE).pdf -transparent white result.gif
make clean
svg:
make
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg
inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg
rm $(SOURCE)2.svg

3
tikz/robot-yaw/Readme.md Normal file
View file

@ -0,0 +1,3 @@
Compiled example
----------------
![Example](robot-yaw.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,27 @@
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{preview}
\begin{tikzpicture}
\newcommand\angleR{35}
\newcommand\radiusR{4cm}
\coordinate[label=below left:$O$] (O) at (0,0);
\draw[->,very thick] (0,0)--(0,5) node[above] {$x$};
\draw[->,very thick] (0,0)--(-2.5,0) node[left] {$y$};
\node at (90+15:\radiusR+0.5cm) {$\alpha > 0$};
\node at (90-15:\radiusR+0.5cm) {$\alpha < 0$};
\draw[fill=orange!30] (-1,-1) rectangle (1,2);
\draw[fill=blue!30] (0,2) circle (0.3cm);
% Draw angle
\begin{scope}[shift={(0,0)}]
\draw[thick, <->] ([shift={({90+\angleR}:\radiusR)}]-0.0,0) arc ({90+\angleR}:{90-\angleR}:\radiusR);
\end{scope}
\end{tikzpicture}
\end{preview}
\end{document}