I am trying to create angled lines from a point to specific border. Here is a minimal example:
\documentclass[margin=2mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0, 0);
\coordinate (B) at (5, 0);
\coordinate (C) at (5, -5);
\coordinate (D) at (1, -4);
\clip (A) rectangle (C);
\draw (A) -- (B) -- (C);
\foreach \a in {10,30,...,70}{
\draw (D) -- +(\a:3);
}
\end{tikzpicture}
\end{document}
How do I set the length of these lines? 3 is to short. Setting the value to 10 solves the problem. However, resizing A, B and C gives the same problem. Is it possible to draw the lines until they hit a border? Or can I calculate a length in TikZ? I only know the calculation of points, but here I need a length.


veclenand create another solution. I post it in this thread. – Dirk Jun 05 '13 at 14:28