I am working on drawing a beam in perspective. I have my point I want to use as the perspective point (10, 3)
. What would be the way to draw along this line? For instance, consider
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0, 0) rectangle (1cm, 1cm);
% I want to draw a 2cm line from (1cm, 0) along the ray that goes to my vanishing point
\end{tikzpicture}
\end{document}
- I could set
\pgfmathsetmacro\myangle{tan(3/10)}
and use the\usetikzlibrary{calc}
but\myangle
is not producing a line that is 17 degrees when I issue\draw (1cm, 0) -- ++(\myangle:2cm);
- I have tried issuing
\def\myangle{tan(3/10)}
but this doesn't work at all. - Or I could use
scope
and rotate a the line\draw (1cm, 0) -- (2cm, 0);
by the intended angle but againtan(3/10)
isn't evaluating correctly (not sure why).
Aucun commentaire:
Enregistrer un commentaire