7
\documentclass[12pt,pstricks,border=15pt]{standalone}
\begin{document}
\def\myFig{%
\pscustom[fillstyle=solid,fillcolor=yellow,opacity=.5]{%
\psarcn(3,0){3}{180}{90}\psarcn(1,3){2}{0}{-90}
\psarc(1,2){1}{-90}{0}\psarc(2,0){2}{90}{180}
}%
\pscustom[fillstyle=solid,fillcolor=blue,opacity=.5]{%
\psarc(0,3){3}{-90}{0}\psarcn(1,3){2}{0}{-90}
\psarcn(2,1){1}{180}{90}\psarc(2,0){2}{90}{180}
\closepath
}%
}

\begin{pspicture}(6,6)
\rput(3,3){\myFig}
\rput{-90}(3,3){\myFig}
\rput{180}(3,3){\myFig}
\rput{-270}(3,3){\myFig}
\end{pspicture}
\end{document}

The above code produces this image:

Existing Image

How do I change it to produce this?

Changed image

0

2 Answers 2

6
\begin{pspicture}(6,6)
  \rput(3,3){\myFig}
  \rput{-180}(3,3){\psscalebox{-1 1}{\myFig}}% -1 1 -> reflecting 
  \rput{180}(3,3){\myFig}
  \rput(3,3){\psscalebox{-1 1}{\myFig}}
\end{pspicture}

enter image description here

4
  • Which package consist of \psscalebox?
    – user173875
    Dec 20, 2018 at 11:07
  • basic command of pstricks
    – user2478
    Dec 20, 2018 at 11:11
  • Wow, only be "basic" command. :-(
    – user173875
    Dec 20, 2018 at 11:13
  • I found some bugs in PSTricks: for the details Dec 23, 2018 at 18:45
4

Not sure if this is the desired look. (yellow to the inside in quadrants II, IV)

\documentclass[12pt,pstricks,border=15pt]{standalone}
\usepackage{graphicx}
\begin{document}
\def\myFig{%
\pscustom[fillstyle=solid,fillcolor=yellow,opacity=.5]{%
\psarcn(3,0){3}{180}{90}\psarcn(1,3){2}{0}{-90}
\psarc(1,2){1}{-90}{0}\psarc(2,0){2}{90}{180}
}%
\pscustom[fillstyle=solid,fillcolor=blue,opacity=.5]{%
\psarc(0,3){3}{-90}{0}\psarcn(1,3){2}{0}{-90}
\psarcn(2,1){1}{180}{90}\psarc(2,0){2}{90}{180}
\closepath
}%
}

\begin{pspicture}(6,6)
\rput(3,3){\myFig}
\rput(6,0){\rotatebox{90}{\myFig}}
\rput{180}(3,3){\myFig}
\rput(0,6){\rotatebox{-90}{\myFig}}
\end{pspicture}
\end{document}

enter image description here

2
  • 1
    A lot of rotations and reflections are possible, but I think OP wants the figure to look like @herbert 's.
    – AlexG
    Dec 20, 2018 at 11:34
  • @AlexG You are obviously correct in your deduction. I guess the implied (bent arrow) "rotation" is what threw me off, when it seems the OP wanted "reflection." Dec 20, 2018 at 11:50

You must log in to answer this question.