2

p1 and p2 are points given by their x and y coordinates. The line must have this left to right direction.

I have no idea how I can do this, I tried using something like

\draw [dashed] plot [smooth, tension=2] coordinates { (-5,0) (-4, 1) (-3,3)};

But it doesn't work for my purposes.

enter image description here

1 Answer 1

4

Like this?

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
   \coordinate (A) at (0,0);
   \coordinate (B) at (5,4);
   \draw [dashed,thick] (A) to[out=90,in=180] (B);
   \fill (A) circle [radius=1pt] (B) circle [radius=1pt];
\end{tikzpicture}
\end{document}

result

Actually you can use the coordinates directly instead of specifying them first with \coordinate. The in and out options take an angle as value.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .