3
\documentclass[border=15pt,pstricks,12pt]{standalone}
\usepackage{pst-intersect}
\begin{document}
\begin{pspicture}[showgrid](3,2)
{\psset{linestyle=dashed}
\pssavepath{MyPath}{\pscurve(0,2)(0,0.5)(3,1)}
\pssavebezier{MyBez}(0,0)(0,1)(1,2)(3,2)(1,0)(3,0)
\psintersect[showpoints]{MyPath}{MyBez}}

\psclip{\pscurve(0,2)(0,0.5)(3,1)}{
\pscustom[fillstyle=vlines]{\pssavebezier{hi}(0,0)(0,1)(1,2)(3,2)(1,0)(3,0) 
\gsave \grestore}}
\endpsclip
\end{pspicture}
\end{document}

enter image description here

Both the figures do not coincide each other. Why so?

  • 2
    Thank you for including a MWE and an image. Please be more clear as to your question. – Karlo Feb 14 at 15:35
6

you have a lot of trailing spaces:

\documentclass[border=15pt,pstricks,12pt]{standalone}
\usepackage{pst-intersect}
\begin{document}
    \begin{pspicture}[showgrid](3,2)
    {\psset{linestyle=dashed}
        \pssavepath{MyPath}{\pscurve(0,2)(0,0.5)(3,1)}%%%
        \pssavebezier{MyBez}(0,0)(0,1)(1,2)(3,2)(1,0)(3,0)%%%%
        \psintersect[showpoints]{MyPath}{MyBez}}%%%%%
    \psclip{\pscurve(0,2)(0,0.5)(3,1)}{%
        \pscustom[fillstyle=vlines]{%
            \pssavebezier{hi}(0,0)(0,1)(1,2)(3,2)(1,0)(3,0)}}
    \endpsclip
    \end{pspicture}
\end{document}

enter image description here

Your Answer

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