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}

아래 그림이 생성됩니다.

음영 그림

이는 한 가지 예외를 제외하고 정확히 내가 원하는 것입니다. 큰 내부 원 외부의 타원 영역과 xxx로 표시된 부분은 다른 변경 사항 없이 음영 처리가 해제되어야 합니다. 이를 수행하는 간단한 방법이 있습니까? 미리 감사드립니다.

답변1

다음은 코드입니다 tikz(타원 내부의 두 번째 원의 위치와 치수가 코드에 부족함).

\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}

여기에 이미지 설명을 입력하세요

관련 정보