\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}
\psset{plotpoints=51}
\begin{document}
\multido{\iAngle=351+1}{10}{%
\begin{pspicture}[showgrid](-4,-3)(4,3)
\pstVerb
{
/smjr 4 def % semi major
/smnr 3 def % semi minor
/ecc 1 smnr smjr div 2 exp sub sqrt def % eccentricity
/coe1 smjr smnr mul 2 div def % coefficient 1
/coe2 ecc smjr mul 2 div def % coefficient 2
}%
% draw ellipse
\psellipse(!smjr smnr)
% draw Focus
\pnode(!ecc smjr mul 0){Focus}
\qdisk(Focus){2pt}
\pscurvepoints{0}{\iAngle}{smjr t cos mul smnr t sin mul}{P}
\pspolylineticks[metricFunction,Os=0,Ds=.25]{P}
{
coe1 x smjr div acos DegtoRad mul
coe2 y mul
sub
}
{0}{5}
\psset{linecolor=red}
\multido{\i=0+1}{5}{\qdisk(PTick\i){2pt}}
\rput(0,2){\textcolor{red}{\Huge$\iAngle^\circ$}}
\end{pspicture}}
\end{document}
当距离\pscurvepoints
接近时360
,有些勾号会消失。这是为什么呢?
答案1
您设置Ds=0.25
。将其更改为0.1
或任何您需要的值。对于整个椭圆上的 5 个刻度,使用:
\documentclass[pstricks]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3.1,-2.1)(3.1,2.1)
\psparametricplot[algebraic]{0}{Pi dup add}{3*cos(t) | 2*sin(t)}%
\pscurvepoints{0}{Pi dup add}{3*cos(t) | 2*sin(t)}{P}%
\pspolylineticks[ticksize=-2pt 2pt,Ds=3.2]{P}{ ds }{0}{5}%
\multido{\iA=0+1}{5}{\Put{6pt;(PNormal\iA)}(PTick\iA){\tiny \iA}}
\end{pspicture}
\end{document}