summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex
blob: 2b4a165a2800b90813a36b0240e32ac276f1178b (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
\newpage
\section{Classe \Iclass{parallelogram}} % (fold)

\subsection{Parallelogram attributes} % (fold)
\label{sub:parallelogram_attributes}

% subsection square_attributes (end)
Points are created in the direct direction. A test is performed to check whether the points form a parallelogram, otherwise compilation is blocked.

\begin{mybox}
Creation | P.new = parallelogram : new (z.A,z.B,z.C,z.D)|
\end{mybox}

\bgroup
\catcode`_=12
\small
\captionof{table}{Parallelogram attributes.}
\begin{tabular}{lll}
\toprule
\textbf{Attributes}        & \textbf{Application}  &  \\
\Iattr{parallelogram}{pa}   & |z.A = P.new.pa|     &  \\
\Iattr{parallelogram}{pb}   & |z.B = P.new.pb|     &  \\
\Iattr{parallelogram}{pc}   & |z.C = P.new.pc|     &  \\
\Iattr{parallelogram}{pd}   & |z.D = P.new.pd|     &  \\
\Iattr{parallelogram}{type} & |P.new.type= 'parallelogram'|&  \\
\Iattr{parallelogram}{i}    & |z.I = P.new.i|  & intersection of diagonals \\
\Iattr{parallelogram}{ab}   & |P.new.ab|    &  line passing through two vertices \\
\Iattr{parallelogram}{ac}   & |P.new.ca|           &  idem. \\
\Iattr{parallelogram}{ad}   & |P.new.ad|           &  idem. \\
\Iattr{parallelogram}{bc}   & |P.new.bc|           &  idem. \\
\Iattr{parallelogram}{bd}   & |P.new.bd|           &  idem. \\
\Iattr{parallelogram}{cd}   & |P.new.cd|           &  idem. \\
\bottomrule %
\end{tabular}
\egroup
\subsubsection{Example: attributes } % (fold)
\label{ssub:example_attributes}

% subsubsection example_attributes (end)
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
z.A         = point : new ( 0 , 0 )
z.B         = point : new ( 4 , 1 )
z.C         = point : new ( 7 , 5 )
z.D         = point : new ( 3 , 4 )
P.new       = parallelogram : new (z.A,z.B,z.C,z.D)
z.B         = P.new.pb
z.C         = P.new.pc
z.D         = P.new.pd
z.I         = P.new.center
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C,D)
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
z.A         = point : new ( 0 , 0 )
z.B         = point : new ( 4 , 1 )
z.C         = point : new ( 7 , 5 )
z.D         = point : new ( 3 , 4 )
P.new       = parallelogram : new (z.A,z.B,z.C,z.D)
z.B         = P.new.pb
z.C         = P.new.pc
z.D         = P.new.pd
z.I         = P.new.center
\end{tkzelements}
   \hspace{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C,D)
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
\end{minipage}


\newpage

\subsection{Parallelogram methods} % (fold)
\label{sub:parallelogram_methods}

% subsection parallelogram_methods (end)
\bgroup
\catcode`_=12
\small
\captionof{table}{Parallelogram methods.}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments}    \\
\midrule   \\
\Imeth{parallelogram}{fourth (za,zb,zc)} & completes a triangle by parallelogram (see next example)\\
\bottomrule %
\end{tabular}
\egroup

\subsubsection{parallelogram with fourth method} % (fold)
\label{ssub:parallelogram_with_fourth_method}

% subsubsection parallelogram_with_fourth_method (end)
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
   scale = .75
z.A      = point : new ( 0 , 0 )
z.B      = point : new ( 4 , 1 )
z.C      = point : new ( 5 , 3 )
P.four   = parallelogram : fourth (z.A,z.B,z.C)
z.D      = P.four.pd
z.I      = P.four.center
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,D,B,C)
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
z.A      = point : new ( 0 , 0 )
z.B      = point : new ( 4 , 1 )
z.C      = point : new ( 5 , 3 )
P.four   = parallelogram : fourth (z.A,z.B,z.C)
z.D      = P.four.pd
z.I      = P.four.center
\end{tkzelements}

\hspace{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C,D)
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
\end{minipage}
% subsubsection parallelogram_with_side_method (end)