summaryrefslogtreecommitdiff
path: root/info/mathtrip/src/angle.tex
blob: 73ab45a61c8fcba11a6fba99482ac3679511aa72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%This document can be run standalone if few comments
%are removed (or added). This is useful to check and modify the drawing.
%
%
%The document accept one parameter whose value is "pstricks", "tikz", "inclusion"
%to define if the drawing is made with ps-tricks, tikz or simply
%by the inclusion of an external file. 
%\documentclass[tikz]{article}

%\usepackage{angle}

%\chardef\DrawMethod=0\relax
%\begin{document}
\ifcase\DrawMethod
   %TikZ
   \setlength{\anglebase}{2.5cm}
   \setlength{\angleside}{2.5cm}
   \setlength{\PointRadius}{2pt}

   \savebox\AngleBox{%
      \begin{tikzpicture}
         %Coordinates of the angle
         \coordinate (O) at (0,0);
         \coordinate (B) at (\anglebase,0);
         \coordinate (C) at (2.0479,1.4339); %2.5*cos(35),2.5*sin(35)
         %Position do place the letter Theta for marking the angle 
         \coordinate (Theta) at (.4296cm,.2cm);
         %Position where to place the label "l_2"
         \coordinate (L2Label) at (1.1cm,0.58cm);
         %Position of the centre of the circle indicating point x1,y1 and y2,y2
         \coordinate (XOne) at (\anglebase+\PointRadius,0);
         \coordinate (XTwo) at (\anglebase+\PointRadius,0);
         %
         %Draw the base of the angle
         \draw [thick] (O) -- (B) node[midway,below] {$\ell_1$};
         %Draw the angle
         \draw [thick] (O) -- (\ThetaAngle:\angleside);  
                                            
         %Draw the small circle at the end of the angle to mark the point X1,y1 and x2,y2
         \draw (O) node{$\circ$};
         \draw (B) node{$\circ$};
         \draw (C) node{$\circ$};

         %Draw the angle mark
         \draw (.20\anglebase,0) arc(0:\ThetaAngle:.20\anglebase);
         %Put the letter for the angle and the 3 points of the angle.
         \draw (Theta) node[right]{$\theta$};
         \draw (O) node[below,left]{$(0,0)$};
         \draw (B) node[below,right]{$(x_1,y_1)$};
         \draw (C) node[below,right]{$(x_2,y_2)$};
         \draw (L2Label) node[below,right] {$\ell_2$};
      \end{tikzpicture}
   }
\or
  %Inclusion
  \relax
\else
  \relax
\fi

%Finally, the draw is typeset
%\begin{center}
%    \usebox\AngleBox
%\end{center}
%\end{document}