我想为这个文档制作动画。基本上我想将值\X
从 6 改为 3.7。
以下是图片和代码,供参考
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl,multido,fp}
\FPset\Width{6.00}% paper width
\FPset\Height{4.00}% paper height
% \FPset\Step{0.50}% interline skip
% \FPeval\Lines{round(Height/Step-1:0)}% number of lines
\def\X{3.7}% abscissa of the top point
\def\Y{0}% ordinate of the right point
\psset
{
PointName=none,
PointSymbol=none,
}
\begin{document}
\begin{pspicture}[showgrid=true](\Width,\Height)
\pstGeonode(0,0){BottomLeft}(\Width,\Height){TopRight}(\X,\Height){Top}(\Width,\Y){Right}
\pstOrtSym{Top}{Right}{TopRight}
\pspolygon[dimen=inner](BottomLeft)(BottomLeft|Top)(Top)(Right)(TopRight|BottomLeft)
% \multips(\Step,\Step)(0,\Step){\Lines}{\psline[linewidth=3pt](!\Width\space 1 sub 0)}
\pspolygon[fillstyle=solid,linestyle=none](Top)(TopRight)(Right)
\pspolygon[fillstyle=solid,linejoin=1](Top)(TopRight')(Right)
\end{pspicture}
\end{document}
答案1
知道了!
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl,multido,fp}
\FPset\Width{6.00}
\FPset\Height{4.00}
\psset
{
PointName=none,
PointSymbol=none,
}
\def\Picture#1#2{%
\def\X{#1}\def\Y{#2}
\begin{pspicture}[showgrid=tru](\Width,\Height)
\pstGeonode(0,0){BottomLeft}(\Width,\Height){TopRight}(\X,\Height){Top}(\Width,\Y){Right}
\pstOrtSym{Top}{Right}{TopRight}
\pspolygon[dimen=inner](BottomLeft)(BottomLeft|Top)(Top)(Right)(TopRight|BottomLeft)
\pspolygon[fillstyle=solid,linestyle=none](Top)(TopRight)(Right)
\pspolygon[fillstyle=solid,linejoin=1](Top)(TopRight')(Right)
\end{pspicture}%
}
\begin{document}
\multido{\nx=\Width+-0.1}{24}{\Picture{\nx}{0}}
\FPeval\Start{round(Width+14*(-0.25):2)}%
\end{document}