[pstricks] Current point
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Tue Dec 4 21:50:24 CET 2007
Hensh, Richard schrieb:
> Is there a way to move the current point without relying on the \pscustom environment (which doesn't seem to work)? For example, I have written the following postscript:
>
> \pstVerb{%
> /polar@ {dup cos 3 1 roll sin 3 1 roll dup 4 1 roll mul 3 1 roll mul} def % (r,theta) -> (x,y)
> }
>
> Now, I can specify the rectangular point (\sqrt{3},1) using:
>
> \pnode(!2 30 polar@){A}
\pnode(2;30){A} does the same
> \cp(2,0) %%Now (2,0) is the current point.
> \pnode(!6 60 polar@){C}
> \cp(0,0) %%The default
>
> instead of
>
> \pnode(!6 60 polar@){C}
> \pstTranslation{A}{D}{C}
>
> as shown below. It's not a big deal but it would be nice.
there is an easier way:
\documentclass[12pt]{article}
\usepackage{pst-eucl}%
\usepackage{pstricks-add}%
\begin{document}
\psset{unit=6mm}
\psset{PointSymbol=none,PointName={}}
\begin{pspicture}(-1,-1)(8,6)
\pstTriangle(0,0){A}(7,0){B}(6;60){C}
\psRelLine(B)(A){0.75}{D}
\psRelLine(B)(C){0.75}{E}
\psline(D)(E)
\uput{6pt}[180](A){{$A$}}
\uput{6pt}[0](B){{$B$}}
\uput{6pt}[90](C){{$C$}}
\uput{6pt}[-90](D){{$D$}}
\uput{6pt}[45](E){{ $E$}}
\end{pspicture}
\end{document}
Herbert
More information about the PSTricks
mailing list