A loop like a circle

View: New views
1 Messages — Rating Filter:   Alert me  

A loop like a circle

by Alain Matthes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

This idea comes when I try to create a graph probabilist
I would a loop but


like an arc of circle



Th idea  was to choice a first node with a shape circle and to design  
two anchors
North east(C) and south east(D) then to build an arc with a center


\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{fullpage}
\usepackage{tikz}
\usetikzlibrary{arrows,calc}

\newcommand{\tikzAngleOfLine}{\tikz@AngleOfLine}
\def\tikz@AngleOfLine(#1)(#2)#3{%
\pgfmathanglebetweenpoints{%
\pgfpointanchor{#1}{center}}{%
\pgfpointanchor{#2}{center}}
\pgfmathsetmacro{#3}{\pgfmathresult}%
}
\thispagestyle{empty}
\begin{document}


\begin{tikzpicture}[>=stealth']
\node [circle,draw](A) {first node};
\coordinate  (C) at (A.north east);
\coordinate  (D) at (A.south east);
\coordinate  (B) at ([xshift=1cm]A);

\tikzAngleOfLine(B)(D){\AngleStart}
\tikzAngleOfLine(B)(C){\AngleEnd}
\draw[red,thick,->]%
    let \p1 = ($ (B) - (D) $), \n2 = {veclen(\x1,\y1)}
    in
      (B) ++(0:\n2) node[fill=white]{$\alpha$}
      (D) arc (\AngleStart-360:\AngleEnd:\n2);
  \end{tikzpicture}

\end{document}

I would to know if it exists a more simple solution

Best Regards

Alain Matthes



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

=?windows-1252?Q?Capture_d=92=E9cran_2009-09-22_=E0_04.56.55.png?= (12K) Download Attachment