[pstricks] I need some advise for a generic drawing
Martin Buchmann
Martin_Buchmann at gmx.net
Thu Jul 17 14:09:52 CEST 2003
Herbert,
>seems to be no problem,...
Great :-)
>but what are the parameters? The vertical length is not the only one?
>[...]
>which are variable and which are constant.
>
>\dendrit{<vertical length>}{<1. horiz. length>}{n. horiz. length>}{<n>}
>
>maybe a possible macro.
Hmm, you are right. Actually after thinking a bit more about it i
realised that something like:
<--- dendrit.tex --->
\documentclass{article}
\usepackage{pstricks}
\usepackage{multido}
\newcommand{\dendrit}[6][]{%
\psline[#1](0,0)(0,#2)
\multido{\na=#4+-#5,\nb=0.4+#6}{#3}{%
\rput[c](0,\nb){\psline[#1](-\na,0)(\na,0)}}}
\pagestyle{empty}
\begin{document}
\begin{pspicture}(0,0)(6,4)
\rput(0,0){\dendrit[linecolor=red,linestyle=dashed]{2}{4}{0.8}{0.1}{0.4}}
\rput(2,0){\dendrit{2}{4}{1}{0.2}{0.4}}
\rput(4.5,0){\dendrit[linecolor=blue]{3}{6}{1.2}{0.15}{0.5}}
\end{pspicture}
\end{document}
<-------->
should do the job. I thought that i could find some rules which
determine the distances and length, etc. but it's much easier to make
it a parameter and check what looks best for the current purpose. At
the moment it will become only a small feature in a already existing
picture therefore is should not waste too much time on it.
Nevertheless thanks
Martin
--
How to become immortal:
Read this signature tomorrow and follow its advice.
More information about the PSTricks
mailing list