Normal method
\documentclass[pstricks,border=12pt]{standalone}
\begin{document}
\begin{pspicture}[showgrid=true](-2,-1)(2,3)
\pscustom
{
\psset{showpoints}
\psbezier(1.5,2.5)(1.5,1.1)(.4,1.6)(.5,0)
\psbezier(-.5,0)(-.4,1.6)(-1.5,1.1)(-1.5,2.5)
\psbezier[liftpen=1](-.5,2.5)(-.6,1.5)(.6,1.5)(.5,2.5)
\closepath
}
\end{pspicture}
\end{document}
Abnormal method
Symmetrical properties are taken into account with \reversepath
, \scale
, etc. Unfortunately, \nodexn
and (!N-<nodename>.x N-<nodename>.y)
cannot be used together here so the code become too complicated.
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\psset{saveNodeCoors}
\begin{document}
\begin{pspicture}[showgrid=true](-2,-1)(2,3)
\pstGeonode[PointName=none,PointSymbol=none]
(.5,2.5){A}
(.6,1.5){B}
(-.6,1.5){C}
(-.5,2.5){D}
% P = (A + B)/2
(!N-A.x N-B.x add 2 div N-A.y N-B.y add 2 div){P}
% Q = ((A + C)/2 + B)/2
(!N-A.x N-C.x add 2 div N-A.y N-C.y add 2 div N-B.y add 2 div exch N-B.x add 2 div exch){Q}
% R = (A + D + 3(B + C))/8
(!N-A.x N-D.x add N-B.x N-C.x add 3 mul add 8 div N-A.y N-D.y add N-B.y N-C.y add 3 mul add 8 div){R}
\def\path
{
\psbezier(.5,0)(.4,1.6)(1.5,1.1)(1.5,2.5)
\psbezier[liftpen=1](!N-A.x N-A.y)(!N-P.x N-P.y)(!N-Q.x N-Q.y)(!N-R.x N-R.y)
}%
\pscustom
{
\psset{showpoints}
\path
\reversepath
\scale{-1 1}
\path
\closepath
}
\end{pspicture}
\end{document}
Warning!
(<nodename>)
and (!\pstGetNodeCenter{<nodename>} <nodename>.x <nodename>.y)
cannot be scaled by \scale{}
. That is why I use (!N-<nodename>.x N-<nodename>.y)
here.
liftpen
.