4

I want to draw parallel arrows (for example 10 arrows) from a line to a curve. It is not good idea that dividing the line and curve to 10 parts and then join them to each other because of mathematical reason the resulting arrows are not parallel.

What I have done is the following.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\begin{document}
\begin{tikzpicture}[allow upside down]

\draw  (0,0) circle (3.5);
\draw (0,3.5) arc (90:-90:1.75 and 3.5) \foreach \p in {0,5,...,100} {
    node[inner sep=0cm,above,pos=\p*0.01,
    anchor=center,
    minimum height=\p*0.03cm,minimum width=(10+\p)*0.3cm]
    (N \p){}
};

\draw (0,3.5) --(0,-3.5) \foreach \p in {0,5,...,100} {
    node[inner sep=0cm,above,pos=\p*0.01,
    anchor=center,
    minimum height=\p*0.03cm, minimum width=(10+\p)*0.3cm]
    (M \p){a}
};  

\foreach \p in {5,10,15,...,95} {
    \draw[-latex,blue] (N \p.center) -| (0,0);
}
\end{tikzpicture}
\end{document}
  • 1
    Your code is not compileable. – AndréC Jan 12 '19 at 8:26
6

I do not really know if I understand what you want but a slight modification of your code produces "parallel arrows from a line to a curve".

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[allow upside down]

\draw  (0,0) circle (3.5);
\draw (0,3.5) arc (90:-90:1.75 and 3.5) \foreach \p in {0,5,...,100} {
    node[inner sep=0cm,above,pos=\p*0.01,
    anchor=center,
    minimum height=\p*0.03cm,minimum width=(10+\p)*0.3cm]
    (N \p){}
};
\draw (0,3.5) -- (0,-3.5);

\foreach \p in {5,10,15,...,95} {
    \draw[latex-,blue] (N \p.center) -- (0,0 |- N \p.center);
}
\end{tikzpicture}
\end{document}

enter image description here

ADDENDTUM: To reverse the arrows, you only need to replace \draw[latex-,blue]... but \draw[-latex,blue]. However, making the distance equal, requires slightly more effort

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[allow upside down]

\draw  (0,0) circle (3.5);
\draw[name path=arc] (0,3.5) arc (90:-90:1.75 and 3.5);
\draw (0,3.5) -- (0,-3.5);

\foreach \p in {-3.25,-3,...,3.25} {
\path[name path=line] (0,\p) -- (3,\p);
\draw[latex-,blue,name intersections={of=line and arc}] 
(0,\p) -- (intersection-1);
}
\end{tikzpicture}
\end{document}

enter image description here

You do not need intersections in this case, you could just use

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[allow upside down]

\draw  (0,0) circle (3.5);
\draw (0,3.5) arc (90:-90:1.75 and 3.5);
\draw (0,3.5) -- (0,-3.5);

\clip  (0,3.5) arc (90:-90:1.75 and 3.5) -- cycle;
\foreach \p in {-3.25,-3,...,3.25} {
\draw[latex-,blue] 
(0,\p) -- (3,\p);
}
\end{tikzpicture}
\end{document}
| improve this answer | |
  • Is it possible to reverse the arrows and with equal distance? – C.F.G Jan 12 '19 at 13:19
  • 1
    @C.F.G Sure. I added a possible way. – user121799 Jan 12 '19 at 15:08
2

A PSTricks solution only for fun purposes.

\documentclass[pstricks]{standalone}
\usepackage{pst-plot}

\begin{document}
\begin{pspicture}[algebraic](-4,-4)(4,4)
    \pscircle{3}\psline(0,-3)(0,3)
    \psellipticarc(0,0)(1,3){-90}{90}
    \curvepnodes[plotpoints=20]{-3}{3}{sqrt(1-(t/3)^2)|t}{A}
    \foreach \i in {1,...,\numexpr\Anodecount-1}{\pcline[nodesepB=.4pt]{<-}(0,0|A\i)(A\i)}
\end{pspicture}
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.