# How to concatenate a set of paths and a set of the reflected paths about a certain axis in a single \pscustom?

I want to draw a symmetric object made of a large number of points. To make the code cleaner, I want to use reflection technique. It means I just specify points on one side of the symmetrical axis, the points on the other side will be obtained by reflecting the specified points.

Finally I want to concatenate those parts in \pscustom and do other operations such as filling or stroking.

The following code snippet is just a simple example that has been trimmed off for the sake of simplicity, but it failed to produce the required symmetric object.

\documentclass{article}

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}
\PreviewBorder=10pt\relax

\begin{document}
\begin{pspicture}[showgrid](-3,-3)(3,3)
\def\left{\psline(0,2)(2,0)(0,-2)}%
\pscustom[
fillstyle=solid,
fillcolor=yellow,
linecolor=red
]{
\left
\psscalebox{-1 1}{\left}
}
\end{pspicture}
\end{document}


How to concatenate a set of paths and a set of the reflected paths about a certain axis in a single \pscustom?

Note: I also want to get the corners on which the part and its reflected part meet properly glued as usual.

-

\documentclass{article}
\usepackage{pstricks}

\begin{document}
\begin{pspicture}[showgrid](-3,-3)(3,3)
\pscustom[fillstyle=solid,
fillcolor=yellow,
linecolor=red]{%
\psline(0,2)(2,0)(0,-2)
\code{ -1 1 scale }\moveto(0,2)
\psline(0,2)(2,0)(0,-2)}
\end{pspicture}

\end{document}

-
I still don't understand why the top and bottom points look jagged. \pscustom should make the corners nice as usual. I give up! –  In PSTricks we trust Mar 13 '12 at 7:27
for the top use linejoin=1 the bottom is a problem, because the path is not really a closed one. –  Herbert Mar 13 '12 at 9:48
no, it is a very special case that you want to mirror a path and then filling it. It already works correct for a default path setting. –  Herbert Mar 13 '12 at 12:29