%% 
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%% 
%%  Example 6-2-5 on page 337.
%% 
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss 
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 

\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{135.83385pt}
\StartShownPreambleCommands
\usepackage{pstricks,pst-node}
\SpecialCoor
\makeatletter
\def\nodeBetween(#1)(#2)#3{%
  \pst@getcoor{#1}\pst@tempA \pst@getcoor{#2}\pst@tempB
  \pnode(!%
    \pst@tempA /YA exch \pst@number\psyunit div def
    /XA exch \pst@number\psxunit div def
    \pst@tempB /YB exch \pst@number\psyunit div def
    /XB exch \pst@number\psxunit div def
    XB XA add 2 div YB YA add 2 div){#3}}
\makeatletter
\StopShownPreambleCommands
\begin{document}
\begin{pspicture}[showgrid=true](-0.3,-0.45)(3,2)
  \psline[linestyle=dashed]{o-o}(0.25,0.33)(2.333,2)
  \nodeBetween(0.25,0.33)(2.333,2){center}
  \pscircle[linecolor=blue](center){3pt}
\end{pspicture}

\bigskip A node \rnode{B}{demonstration}.
\nccurve[arrows=->,linecolor=blue,nodesep=5pt]{B}{center}
\end{document}
