这个问题实际上与我昨天发布的另一个问题有联系。
下图说明了这个问题。
简而言之,青色点必须总是与黄色一致。
\documentclass{article}
\usepackage{pstricks-add,multido}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}
\PreviewBorder=0pt
\begin{document}
\multido{\i=0+10}{37}{
\begin{pspicture}(-2.5,-2.0)(2.5,2.0)
\psframe*[linecolor=black](-2.5,-2.0)(2.5,2.0)
\pstVerb{/theta \i\space def}%
\pstVerb{/a 2.25 def}%
\pstVerb{/b 1.75 def}%
\ifnum\i=0
% don't draw arc!
\else
\psellipticarc[linecolor=cyan]{-*}(0,0)(!a b){0}{!theta}
\fi
\psline[linecolor=yellow]{-*}(0,0)(!theta cos a mul theta sin b mul)
\uput{5mm}[0](0,0){\color{white}\tiny \i}
\end{pspicture}}
\end{document}
是错误\psellipticarc
还是我的计算有误?
答案1
\psellipticarc[linecolor=cyan,correctAngle=false]{-*}(0,0)(!a b){0}{!theta}
参见3.4. Macro \psellipticarc
http://mirror.ctan.org/graphics/pstricks/base/doc/pst-news10.pdf
答案2
我刚刚调查过,如果不进行更改correctAngle
,false
我们仍然可以按如下方式解决此问题。
\documentclass[pstricks,border=0pt]{standalone}
\usepackage{pstricks-add}
\pstVerb
{
/major 2.25 def
/minor 1.75 def
% b a t p2c ---> x y
% where b (semi-minor), a (semi-major), t (theta)
/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def
}
\psset{arrows=-*}
\begin{document}
\multido{\i=0+10}{37}
{
\begin{pspicture}(-2.5,-2.0)(2.5,2.0)
\ifnum\i=0
% don't draw arc!
\else
\psellipticarc[linecolor=cyan,dimen=middle](!major minor){0}{(!minor major \i\space p2c)}%dimen=middle must be specified!
\fi
\psline[linecolor=red](!minor major \i\space p2c)
\uput{5mm}[!\i\space 10 add](0,0){\tiny$\i^\circ$}
\end{pspicture}
}
\end{document}