I am trying to create parallel lines in tikz
. Although I can create those lines, I can't seem to be able to control the length of those lines, which I want them to stop in the red box's face.
My code is
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.5]
%target
\draw[fill=gray!30,gray!30] (0,3)rectangle(2,-3);
%tracks
\draw[->,thick] (-2,2)--(0,2);
\draw[->,dashed] (0,2)--(-3,-3);
\draw[->,thick] (-2,1)--(2,1);
\draw[->,dashed] (2,1)-- +($(-3,-3)-(0,2)$);
\draw[->,thick] (-2,-1)--(2,-1);
\draw[->,dashed] (2,-1)-- +($(-3,-3)-(0,2)$);
\draw[->,thick] (-2,-2)--(0,-2);
\draw[->,dashed] (0,-2)-- +($(-3,-3)-(0,2)$);
%detector
\draw[red, rotate around={60:(-1,-3)}] (-3,0) rectangle (-2,-6);
\end{tikzpicture}
\end{document}
My output is
Any idea on how to control the length and end point of the parallel line?