I defined some small pstricks makro:


And now I want the output of \leftwall reflected, to produce something like \rightwall. In this specific situation, I could just change the signs of the x coordinates, but this is ugly. How can I do this in general? I'm looking for a command like \psrotate from the pstricks-add package where I can specify two points that define a line along which I can reflect my \leftwall.

  • Please show me the minimal code and use CODE tag please :D
    – xport
    Jan 1 '11 at 14:42

extend the example in a case that \leftwall and \rightwall allow coordinates to get rid of the \rput

\newcommand\rightwall{\psscalebox{-1 1}{\leftwall}}

 \leftwall \rput(0,0){\rightwall}


alt text

  • So the core of your answer (apart from other improvements to the code) is: Use \psscalebox{-1 1}{stuff}. Together with rotations, reflections on arbitrary lines can be made.
    – Turion
    Jan 1 '11 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.