Pstricks の領域の陰影を削除します

Pstricks の領域の陰影を削除します

私のコードは基本的に次のようになります。

\documentclass{article}
\usepackage{pstricks}
\begin{document}
 \psset{xunit=1cm, yunit=1cm, algebraic= true}
 \begin{pspicture}(-6,-7)(6,7)
 \pspolygon[showpoints = false, linearc = 0.2](5,6.2)(5,-6.2)(-5,-6.2)(-5, 6.2)
 \pscircle[](0,0){4.9} %outermost circle
 \pscircle[](0,0){3.5} %inner large circle
 \pscircle[](0,2.2){.5} %tiny circle
 \pscircle[](1.55,2.2){.6} %another tiny circle
\pscustom[fillstyle=solid, fillcolor=lightgray]{
 \psellipse[](-1.3,-.3)(3.2,2) %shaded ellipse
 }
\pscustom[fillstyle=solid, fillcolor=white]{\psellipse[](-.5,-.5)(1.5, 1.5)} %circle within shaded ellipse
 \pscircle[](-.8,-.5){.68} 
 \pscircle[](0,0){3.5} % restoring portion of inner circle shaded over
 \uput{1.7}[180]
        (-1.95,0){xxx}
\end{pspicture}
\end{document}

下の図が生成されます

陰影画像

これはまさに私が望んでいることですが、例外が 1 つあります。楕円の大きな内側の円の外側の xxx とマークされた領域のみをシェーディングせず、他の変更は行わないことです。これを行う簡単な方法はありますか? よろしくお願いします。

答え1

ここにコードがありますtikz(コードには楕円内の 2 番目の円の位置と寸法が欠けています)。

\documentclass{article}
\usepackage{tikz}
\begin{document}
    
    \begin{tikzpicture}
        %\draw[gray!25](-6,-7) grid (6,7);
        \draw[rounded corners] (-5,-6.2) rectangle (5, 6.2);    
        \draw circle(4.9);
        \draw (0,2.2) circle(.5);
        \draw (1.55,2.2) circle(.6);
        \draw (-.8,-.5) circle(.68);
        \begin{scope}
            \clip circle(3.5);
            \fill[lightgray] (-1.3,-.3) ellipse(3.2 and 2);
        \end{scope}
        \draw circle(3.5);
        \draw (1.55,2.2) circle(.6);
        \draw (-.8,-.5) circle(.68);
    \end{tikzpicture}
\end{document}

出力:

ここに画像の説明を入力してください

答え2

\documentclass{article}
\usepackage{pstricks}
\begin{document}
\psset{xunit=1cm, yunit=1cm, algebraic= true}
\begin{pspicture}(-6,-7)(6,7)
    \pspolygon[showpoints = false, linearc = 0.2](5,6.2)(5,-6.2)(-5,-6.2)(-5, 6.2)
    \pscircle[](0,0){4.9} %outermost circle
    \pscircle[](0,2.2){.5} %tiny circle
    \pscircle[](1.55,2.2){.6} %another tiny circle
    \psclip{\pscircle(0,0){3.5}} %inner large circle
        \psellipse[fillstyle=solid, fillcolor=lightgray](-1.3,-.3)(3.2,2) %shaded ellipse
    \endpsclip
    \psellipse[fillstyle=solid, fillcolor=white](-.5,-.5)(1.5, 1.5) %circle within shaded ellipse
    \pscircle[](-.8,-.5){.68} 
    \pscircle[](0,0){3.5} % restoring portion of inner circle shaded over
    \uput{1.7}[180](-1.95,0){xxx}
\end{pspicture}
\end{document}

ここに画像の説明を入力してください

関連情報