TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I improve this code to generate three cycles varying the height of the trigonometric tangent? Note that I managed to correctly draw the red line, but could not improve the green line. What I want is a reduction in their angle and straight. The green line does not have the correct height.

\foreach \radius in {1,2,3}{
    \begin{scope}[xshift=3*\radius cm]
        \draw circle (1);
        \draw[->] (-1.2,0) -- (1.2,0) coordinate (x);
        \draw[->] (0,-1.2) -- (0,1.2);
        \fill[fill=green!25] (0,0) -- (.2,0) arc (0:60/\radius:.2) -- cycle;
        \coordinate (P) at (60/\radius:1);
        \draw[<-,red,line width=1pt] (P) -- (P |- x);
        \fill[blue] (P) circle (1pt);
        \draw (0,0) -- (P);
        \draw[->,orange] (0,0) -- (P |- 0,0);
        \draw[dashed] (0,0) -- (1,\YValue);
        \draw[->,green,line width=1pt] (1,0) -- (1,\YValue);

enter image description here

share|improve this question
up vote 2 down vote accepted

If I understand correctly, the green line is the tangent of the green angle. Then you should rewrite the formulae in the \foreach loop like this:


enter image description here

share|improve this answer
Thank you Count Zero. – Regis da Silva Sep 13 '11 at 15:15

Your Answer


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.