# Cobordism with pstricks

I'm trying to get rid of the middle line. Whatever changes I make it seems that I make it worse. I would appreciate it if anyone could show me how to draw this cobordism properly.

\begin{pspicture}
\pscustom{
\psbezier[showpoints=true](1.5,2.5)(1.5,1.1)(.4,1.6)(.5,0)
\psline(-0.5,0)
\psbezier[showpoints=true](-0.5,0)(-.4,1.6)(-1.5,1.1)(-1.5,2.5)
\psline(-.5,2.5)
\psbezier[showpoints=true](-.5,2.5)(-.6,1.5)(0.6,1.5)(.5,2.5)
\psline(1.5,2.5)}
\end{pspicture}


-
You need to use liftpen. –  In PSTricks we trust Dec 29 '13 at 10:54
Thanks. I've accepted your answer. Herbert's answer was also very useful. So, thank you both. –  user43334 Dec 29 '13 at 13:00

## 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
% Q = ((A + C)/2 + B)/2
% R = (A + D + 3(B + C))/8
\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.

-

Inside \pscustom only the first \psbezier has four points, for all others the current point is the first bezier point, too:

\documentclass[border=5mm]{standalone}
\usepackage{pstricks}
\begin{document}

\begin{pspicture}(-2,0)(2,2.5)
\pscustom{
\psbezier[showpoints](1.5,2.5)(1.5,1.1)(.4,1.6)(.5,0)% 4 points
\psline(-0.5,0)%% is also the first bezier point for the next \psbezier
\psbezier[showpoints](-.4,1.6)(-1.5,1.1)(-1.5,2.5)% three
\psline(-.5,2.5)
\psbezier[showpoints](-.6,1.5)(0.6,1.5)(.5,2.5)% three
\closepath
}
\end{pspicture}
\end{document}


If you use 4 points then there is no need for the \psline but one liftpen option:

\documentclass[border=5mm]{standalone}
\usepackage{pstricks}
\begin{document}

\begin{pspicture}(-2,0)(2,2.5)
\pscustom{
\psbezier[showpoints](1.5,2.5)(1.5,1.1)(.4,1.6)(.5,0)
\psbezier[showpoints](-0.5,0)(-.4,1.6)(-1.5,1.1)(-1.5,2.5)
\psbezier[showpoints,liftpen=1](-.5,2.5)(-.6,1.5)(0.6,1.5)(.5,2.5)
\closepath
}
\end{pspicture}
\end{document}

-