我想要如下阴影。
但是,下面的代码产生了如下意外结果。
\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[dimen=m](-1,-1)(11,11)
\pstGeonode[PosAngle={-135,-45,45,135,180,90}]
(0,0){A}
(10,0){B}
(10,10){C}
(0,10){D}
(0,5){M}
(5,10){N}
\psframe(10,10)
\psarcn(A){10}{90}{0}
\psarcn(M){5}{90}{-90}
\psarcn(N){5}{0}{180}
\pstInterCC[RadiusA=\pstDistVal{10},RadiusB=\pstDistVal{5}]{A}{}{N}{}{P1}{P2}
\pstInterCC[RadiusA=\pstDistVal{5},RadiusB=\pstDistVal{5}]{M}{}{N}{}{P3}{P4}
\pscustom[fillstyle=solid,fillcolor=gray]
{
\psarcn[origin=M](M){5}{(D)}{(P4)}
\psarc[origin=N](N){5}{(P4)}{(P2)}
\psarc[origin=O](O){10}{(P2)}{(D)}
\closepath
}
\end{pspicture}
\end{document}
问题
我找不到罪魁祸首,你能吗?
答案1
使用 pst-eucl 语法来绘制自定义曲线。请注意,可能由于近似误差,我不得不绘制两次半圆。
\documentclass[pstricks, svgnames, border=12pt,12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[dimen=m](-1,-1)(11,11)
\pstGeonode[PosAngle={-135,-45,45,135,180,90}]
(0,0){A}
(10,0){B}
(10,10){C}
(0,10){D}
(0,5){M}
(5,10){N}
\psframe(10,10)
\psarcn(A){10}{90}{0}
\psarcn(M){5}{90}{-90}
\psarcn(N){5}{0}{180}
\pstInterCC[RadiusA=\pstDistVal{10},RadiusB=\pstDistVal{5}]{A}{}{N}{}{D}{P2}%D = P1
\pstInterCC[RadiusA=\pstDistVal{5},RadiusB=\pstDistVal{5}]{M}{}{N}{}{D}{P4}% D = P3
\pscustom[fillstyle=solid,fillcolor=Silver!40!Lavender, linestyle=none]
{
\pstArcnOAB{M}{D}{P4}
\pstArcOAB{N}{P4}{P2}
\pstArcOAB{A}{P2}{D}
\closepath
}
\psarcn(A){10}{90}{0}
\psarcn(M){5}{90}{-90}
\psarcn(N){5}{0}{180}
\end{pspicture}
\end{document}