Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question actually has a connection to my other question that was posted yesterday.

The following figure illustrates the problem.

enter image description here

Shortly speaking, the cyan dot must always coincide with the yellow one.

\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}

Is it a bug in \psellipticarc or is my calculation wrong?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted
\psellipticarc[linecolor=cyan,correctAngle=false]{-*}(0,0)(!a b){0}{!theta}

see section 3.4. Macro \psellipticarc in http://mirror.ctan.org/graphics/pstricks/base/doc/pst-news10.pdf

share|improve this answer
1  
\psellipticarc[dimen=middle,linecolor=cyan,correctAngle=false]{-*}(0,0)(!a b){0}{!theta}, the default is dimen=outer –  Herbert Mar 11 '12 at 14:05
    
Your information has been applied to tex.stackexchange.com/a/47541/9467. Thanks a lot. –  I am who I say I am Mar 11 '12 at 16:16
add comment

I just investigated that without changing the correctAngle to false we can still solve this issue as follows.

enter image description here

\documentclass[pstricks,border=0pt]{standalone}
\usepackage{pstricks-add}
\pstVerb
{
    /major 2.25 def
    /minor 1.75 def
    /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}
share|improve this answer
    
That is in prinzipal the same –  Herbert Aug 3 '12 at 0:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.