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 apologize if this question has been asked. I think it should be fairly simple, but I've looked around a bit and I can't find anything that does what I'm looking for.

I know you can calculate, e.g., the point 10% of the way between two nodes:

\node (A) at (0,0) {};
\node (B) at (1,0) {};
\coordinate (C) at ($(A)!0.1!(B)$);

But what if I were drawing a bent line between nodes A and B:

\draw (A) to [bend left=30] (B);

How to I calculate the coordinate that is 10% of the way along this bent path?

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You can use \path (A) to [bend left=30] coordinate [pos=0.1] (C) (B) to place a coordinate at a specified distance along the path:

\documentclass{article}

\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (A) {A};
\node (B) at (2,0) {B};
\draw (A) to [bend left=30] (B);
\path (A) to [bend left=30] coordinate [pos=0.1] (C) coordinate [pos=0.7] (D) (B) ;
\fill [red] (C) circle [radius=2pt] (D) circle [radius=2pt];
\end{tikzpicture}

\end{document}
share|improve this answer
    
Thanks, that worked perfectly! –  user18452 Sep 7 '12 at 14:10
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.