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 want to draw a line from one arc to other but I do not know if it is possible to mark a point on an arc and start drawing on that point. Is it possible to draw lines like below image?

enter image description here

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
  \draw[thick] (90:3cm) arc (90:0:3cm);
  \draw[thick] (90:3cm) arc (180:90:3cm);
\end{tikzpicture}

\end{document}
share|improve this question
1  
This is fixed in the CVS version and can be done by putting nodes and coordinates but for the time being you can use the marking decoration to mark the arc path with a node. –  percusse Dec 24 '12 at 0:56
add comment

1 Answer

up vote 7 down vote accepted

There are a lot of possibilities with tikz.

First method

Below is one if you want to specify the points manually.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
  \draw[thick] (90:3cm) arc (90:0:3cm);
  \draw[thick] (90:3cm) arc (180:90:3cm);
  \coordinate (A) at (80:3cm);
  \path (90:3cm) arc (180:135:3cm) node [inner sep=0pt] (B) {};
  \draw [blue,thick] (A) -- (B);
  \foreach \X in {A,B}
    \fill [blue] (\X) circle (2pt);

  \coordinate (C) at (33:3cm);
  \path (90:3cm) arc (180:123:3cm) node [inner sep=0pt] (D) {};
  \draw [red,thick] (C) -- (D);
  \foreach \Y in {C,D}
        \fill [red] (\Y) circle (2pt);
\end{tikzpicture}

\end{document}

enter image description here

With decorations.markings library

And here is a solution using decorations.markings library.

%http://tex.stackexchange.com/questions/88053/marking-a-specific-point-on-an-arc/88060#88060
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

\begin{tikzpicture}[
every node/.style={circle,inner sep=1.5pt,outer sep=0pt},
decoration={
markings,% switch on markings
mark=at position 1cm with {\node (A) [fill=blue] {};},
mark=at position 3cm with {\node (B) [fill=red] {};},
mark=at position 0.7 with {\node (C) [fill=blue] {};},
mark=at position 0.8 with {\node (D) [fill=red] {};}
}
]

\draw [thick,postaction={decorate}] (90:3cm) arc (90:0:3cm)(90:3cm) arc (180:90:3cm);
\draw [blue,thick] (A) -- (C);
\draw [red,thick] (B) -- (D);
\end{tikzpicture}
\end{document}

enter image description here

The advantage of the second method is that you can specify the placement of the points relatively (0.1, 0.23 and so on) between the first coordinate/node and the last coordinate/node of your path. So this may apply even to arbitrary paths.

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.