Graphics, Figures & TablesPSTricks: pscustom deforms object

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
WorksAsIntended
Posts: 1
Joined: Fri Sep 23, 2016 9:47 am

PSTricks: pscustom deforms object

Post by WorksAsIntended »

Hi there,
I am new at your community. I work with LaTex for many years now, but only have very basic knowledge about pstricks, where i stumbled over the following problem:

If I combine psline and pscurve to create an object and put it into pscustom, the object gets deformed. To me it looks like the bezier curve gets some additional boundary conditions due to closing the paths, but I might be completly mistaken there. This example is part of a bigger scetch (therefore the maybe odd numbers), I tried to scetch a concave lense:

Code: Select all

\begin{pspicture}(.2,1)
    \pscustom[fillstyle=solid, fillcolor=lightgray, linestyle=dashed]{
        \psline(2.9,2.15)(3.1,2.15)
        \pscurve(3.1,2.15)(3.03,1.65)(3.1,1.15)
        \psline(3.1,1.15)(2.9,1.15)
        \pscurve(2.9,1.15)(2.97,1.65)(2.9,2.15)}

    \psline(2.9,2.15)(3.1,2.15)
    \pscurve(3.1,2.15)(3.03,1.65)(3.1,1.15)
    \psline(3.1,1.15)(2.9,1.15)
    \pscurve(2.9,1.15)(2.97,1.65)(2.9,2.15)
 \end{pspicture}
Doubling and linestyle=dashed ofc just for demonstration. Is there any way to get this done correctly?
example.jpg
example.jpg (2.94 KiB) Viewed 4015 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
Post Reply