# [pstricks] Nodes and \rput

Michael Sharpe msharpe at ucsd.edu
Sun Mar 29 06:16:42 CEST 2009

On Mar 28, 2009, at 8:41 PM, Hubert Lam (TeX/PSTricks) wrote:

> Michael Sharpe wrote:
>> \rput doesn't seem to translate positions involving nodes. For
>> example,
>>
>> \begin{pspicture}(6,6)
>> \pnode(1,1){P}
>> \rput(2,3){\psline(1,1)}% makes line from (2,3) to (3,4)
>> \rput(2,3){\psline(P)}% makes line from (2,3) to (1,1)
>> \end{pspicture}
>>
>> Is this something that can be changed by evaluating the expression in
>> another way? It doesn't seem to help to replace \psline(P) by
>> \psline(! \psGetNodeCenter{P} P.x P.y).
>>
>> Michael
>>
>
> Hi Michael
>
> Try using pst-eucl
>
> \pnode(1,1){P} % Original line start
> \pnode(3,4){Q} % Original line end
> \pnode(6,5){Z} % Translate line PQ to ZZ'
>
> \pstTranslation{P}{Q}{Z}[Z']
>
> Hubert
Hubert,

Thanks for that reference.  I do know about \psParallelLine (from
pstricks-add) which has a similar effect, but both \psParallelLine and
\pstTranslation have to be applied to each node separately. I was
hoping to find a way to construct an object expressed in terms of
possibly many nodes, and translate the entire object.

Regards,
Michael