Le 25 juin 09 à 00:05, Werner Grundlingh a écrit :
> I think your best bet here would be to attempt a tree in PStricks.
> Consider viewing the more complex examples contained in the package
> documentation at
>
http://www.dante.de/CTAN/graphics/pstricks/base/doc/pstricks-doc.pdf> More specifically, view the example tree on page 110. Alternatively,
> the tree examples at
>
http://www.tug.org/PSTricks/main.cgi?file=pst-tree/pst-tree> also shows some options to follow.
hi,
it's possible to make something like tree22.tex
with
\documentclass[]{article}
\usepackage{tikz,fullpage}
\makeatletter
\newdimen\pt@ax
\newdimen\pt@ay
\newdimen\pt@bx
\newdimen\pt@by
\newdimen\pt@cx
\newdimen\pt@cy
\begin{document}
\begin{tikzpicture}
\node[draw](A) at (0,0) {A};
\node[draw](B) at (2,3) {B};
\node[draw](C) at (5,0) {C};
\draw (B.south)--(C.north);
\draw (B.south)--(A.north);
% the next code can be used in a macro
\makeatletter
\pgfextractx{\pgf@x}{\pgfpointanchor{B}{south}}
\pgfextracty{\pgf@y}{\pgfpointanchor{B}{south}}
\pt@ax\pgf@x
\pt@ay\pgf@y
\pgfextractx{\pgf@x}{\pgfpointanchor{A}{north}}
\pgfextracty{\pgf@y}{\pgfpointanchor{A}{north}}
\pt@bx\pgf@x
\pt@by\pgf@y
\pgfextractx{\pgf@x}{\pgfpointanchor{C}{north}}
\pgfextracty{\pgf@y}{\pgfpointanchor{C}{north}}
\pt@cx\pgf@x
\pt@cy\pgf@y
\pgfmathanglebetweenpoints{\pgfpoint{\pt@ax}{\pt@ay}}%
{\pgfpoint{\pt@bx}{\pt@by}}
\pgfmathsetmacro{\firstangle}{\pgfmathresult}
\pgfmathanglebetweenpoints{\pgfpoint{\pt@ax}{\pt@ay}}%
{\pgfpoint{\pt@cx}{\pt@cy}}
\pgfmathsetmacro{\secondangle}{\pgfmathresult}
\makeatother
\fill[shift=(B.south),fill=black] (0,0) --(\firstangle:.5cm) arc
(\firstangle:\secondangle:.5cm)--cycle;
\end{tikzpicture}
\end{document}
perhaps Mark Wibrow can find a better solution
Best Regards
Alain Matthes
------------------------------------------------------------------------------
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users