Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am looking to join two points arc. I want the arc to travel counter clockwise. The two points are (3.15,0) and (-1.05,3.15).

 \documentclass{article}
 \usepackage{tikz}
 \usetikzlibrary{arrows, decorations.markings, calc, fadings, decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}
 \begin{document}
 \begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]
 \draw[->] (0,0) -- (3,0);
 \draw (3.15,0) -- (-1.05,3.15);
 \filldraw[gray] (3.15,0) circle (.15cm); 
 \draw[->] (3.3,0) -- (4,0);
 \draw[->] (0,0) -- (-1,3);
 \filldraw[gray] (-1.05,3.15) circle (.15cm);
 \filldraw[gray] (0,0) circle (.15cm);
 \end{tikzpicture}
 \end{document}
share|improve this question
    
Two points are not enough. You need five points to completely determine an ellipse. –  Jubobs Mar 23 '13 at 17:47
    
@Jubobs I don't want a complete ellipse. I just want an elliptical curve connected that segment only. –  dustin Mar 23 '13 at 17:49
    
Whether you want to draw the portion of the ellipse or the complete ellipse, you still need to know which ellipse you want. –  Jubobs Mar 23 '13 at 17:50
    
From two points passing infinite ellipse. I think you need to give some extra features –  karathan Mar 23 '13 at 17:53
1  
The let's forget it being an ellipse. How can I join those two points by an arc? –  dustin Mar 23 '13 at 18:00
show 2 more comments

2 Answers 2

up vote 3 down vote accepted

Apparently you don't mind what has to be the exact radius of the arc. You only want a curved path between those two points. You can use then (point1) to[bend right] (point2).

However, the way you built the figure causes that you have to take into account the radius of the "big gray dots", in order to properly compute the coordinates of the starting and ending points. This is cumbersome.

It is much easier if instead of using circle primitives to draw those big dots, you use circular shaped nodes, and then tikz will do the computations for you.

This is an alternative way to code the same figure, which is more easy to read and to modify. I defined a style for the big dots, which makes easy to change their diameter (minimum size option) or their color, globally. I also gave names to those nodes, and so later I can refer to those names when drawing arrows.

\usetikzlibrary{arrows}
\tikzset{
  big dot/.style={
    circle, inner sep=0pt, 
    minimum size=3mm, fill=gray
 }
}

\begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]
\node[big dot] (origin) at (0,0) {};
\node[big dot] (A) at (3,0)   {};
\node[big dot] (B) at (-1, 3) {};

 \draw[->] (origin) -- (A);
 \draw[->] (origin) -- (B);
 \draw (A) -- (B);
 \draw[->] (A) -- +(1,0);
 \draw[->] (A) to[bend right] (B);
 \end{tikzpicture}

Result

share|improve this answer
add comment

It's okay something like this. Certainly not what we would called a sophisticated answer

enter image description here

\documentclass{article}
 \usepackage{tikz}
 \usetikzlibrary{arrows, decorations.markings, calc, fadings, decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}
 \begin{document}
 \begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]

    \draw[step=.5cm,gray!50,very thin] (-2.0cm,-1.0cm) grid (4.cm,4.0cm);
 \draw[->] (0,0) -- (3,0);
 \draw (3.15,0) -- (-1.05,3.15);
 \filldraw[gray] (3.15,0) circle (.15cm); 
 \draw[->] (3.3,0) -- (4,0);
 \draw[->] (0,0) -- (-1,3);
 \filldraw[gray] (-1.05,3.15) circle (.15cm);
 \filldraw[gray] (0,0) circle (.15cm);

  \draw[red,<-] (3.15cm,0.0cm)  arc  (0:104:3.29);

 \end{tikzpicture}
 \end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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