在径向褪色的 Tikzpicture 中嵌入 Pspicture

在径向褪色的 Tikzpicture 中嵌入 Pspicture

以下 MWE 取自 如何为图像创造一种与图像相似的彩色光环从而产生“辐射”诺曼窗。

考虑,

\documentclass[border=12pt]{book}
\usepackage{pst-slpe}
\textheight=9in

\usepackage{tikz} 
\usetikzlibrary{fadings}

% Compiles with lualatex or Xelatex

\begin{document}
\thispagestyle{empty}

\tikzfading[name=fade out, inner color=transparent!0,
outer color=transparent!100]
\tikzset{
  star/.style={red, fill=white, path fading=fade out}
}
\begin{tikzpicture}
  \draw[red, shading=mradial, inner color=red!10, 
  middle color=red!60, outer color=red]
  (-3, -3) rectangle (9, 9);
  \clip (-3, -3) rectangle (9, 9);
\end{tikzpicture} 

\vspace*{10pt}

\begin{pspicture} %[showgrid=true]
%(-3,-3)(9,9)
%\psframe*[linecolor=red](-3,-3)(9,9)
\psclip{%
  \pscustom[linestyle=none,dimen=middle]{%
    \psline(6,0)(6,3)
    \psarc(3,3){3}{0}{180}
    \psline(0,0)
  }}
\psBall(4,2){red}{6cm}
\endpsclip
\end{pspicture}
\end{document}

产生图像

在此处输入图片描述

问题:我怎样才能将“光芒四射的”诺曼窗户(即pspicture)置于红色放射状辉光(即tikzpicture)的中心?这似乎应该是一项简单的任务,但我对这两种不同类型的图片都没有成功。谢谢。

答案1

例如pspicture 添加tikzpicture

在此处输入图片描述

\documentclass[border=12pt]{book}
\usepackage{pst-slpe}
\textheight=9in

\usepackage{tikz} 
\usetikzlibrary{fadings}

\begin{document}
    \thispagestyle{empty}
    
    \tikzfading[name=fade out, inner color=transparent!0,
    outer color=transparent!100]
    \tikzset{
        star/.style={red, fill=white, path fading=fade out}
    }
    \begin{tikzpicture}
        \draw[red, shading=mradial, inner color=red!10, middle color=red!60, outer color=red]
        (-3, -3)  rectangle (9, 9);
        \clip (-3, -3) rectangle (9, 9);
        
        \node at (5,5)  {\begin{pspicture}
                \psclip{%
                    \pscustom[linestyle=none,dimen=middle]{%
                        \psline(6,0)(6,3)
                        \psarc(3,3){3}{0}{180}
                        \psline(0,0)
                }}
                \psBall(4,2){red}{6cm}
                \endpsclip
        \end{pspicture}};
    \end{tikzpicture}   

\end{document}

相关内容