1

Consider the following picture:

figure

I would like to draw this figure using PSTricks.

My problem is the ends; the "cross" in the middle is no problem at all.

Here is what I have so far:

\documentclass{article}

\usepackage{multido}
\usepackage{pstricks}

\begin{document}

\begin{pspicture}(-4,-4)(4,4)
 \psset{fillstyle = solid}
  \psframe[fillcolor = black](-4,-4)(4,4)
  \multido{\i = 0+90}{4}{\rput{\i}(0,0){%
    \pspolygon[
      linecolor = white,
      fillcolor = white
    ](0,0)(0,2.5)(0.5,2.5)(0.5,0.5)(2.5,0.5)(2.5,0)}}
\end{pspicture}

\end{document}

output

Update

The following figure shows the "bulge" clostest to the egde (in Herbert's answer), which I would like to get rit of. I would like to "flatten" the end to make it look more the the original picture.

bulge

2
\documentclass{article}
\usepackage{multido}
\usepackage{pstricks}
\makeatletter
\def\psElement{\pst@object{psElement}}
\def\psElement@i{{%
  \addbefore@par{xunit=0.65,fillcolor=\pslinecolor,fillstyle=solid}%
  \use@par
  \pscustom[]{%
    \psline(0.5,0)(0.5,1)%
    \pscurve(0.7,1.25)(1,1.15)(0.9,1.05)(1.1,0.9)(1.4,1.1)(1.2,1.6)(0.9,1.7)(0.2,1.5)(0,1.2)
    \psline(0,0)
    \closepath}}}
\def\psmySymbol{\pst@object{psmySymbol}}
\def\psmySymbol@i(#1){{%
  \pst@killglue
  \use@par
  \multido{\i=0+90}{4}{\rput{\i}(#1){%
        \psElement\psscalebox{-1 1}{\psElement}}}}}
\makeatletter
\begin{document}

\begin{pspicture}(-2,-2)(6,2)
\psframe*[linecolor=black](-2,-2)(6,2)
\psmySymbol[linecolor=white](0,0)
\psmySymbol[linecolor=red!30](4,0)
\end{pspicture}

\end{document}

enter image description here

With a modified path:

 \pscurve(0.7,1.25)(1,1.15)(0.9,1.05)(1.1,0.9)(1.4,1.1)(1.2,1.4)(0.9,1.5)%
         (0.2,1.4)(0,1.2)

enter image description here

  • play with the xunit=0.65 – user2478 Apr 2 '16 at 15:13
  • 1
    then modify the coordinates of the curve. – user2478 Apr 2 '16 at 17:33
  • \pscurve(0.7,1.25)(1,1.15)(0.9,1.05)(1.1,0.9)(1.4,1.1)(1.2,1.4)(0.9,1.5)% (0.2,1.4)(0,1.2) It is also possible to use an arc – user2478 Apr 18 '16 at 10:34
  • sue, but I do not really understand your problem. – user2478 Apr 18 '16 at 16:48
  • 1
    see my edited answer – user2478 Apr 18 '16 at 17:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.