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

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

  • Which package consist of \psscalebox? – user173875 Dec 20 '18 at 11:07
  • basic command of pstricks – user2478 Dec 20 '18 at 11:11
  • Wow, only be "basic" command. :-( – user173875 Dec 20 '18 at 11:13
  • I found some bugs in PSTricks: for the details – Money Oriented Programmer Dec 23 '18 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

  • 1
    A lot of rotations and reflections are possible, but I think OP wants the figure to look like @herbert 's. – AlexG Dec 20 '18 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." – Steven B. Segletes Dec 20 '18 at 11:50

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.