summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.2.0.tex
blob: 2d256cb366054b3a68cd5a377583cbcc63272cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
\input{preamble-standalone.ltx}
\begin{document}

% Ex. No. 72 (Section 11.2 : Random point in a rectangle)

\begin{tikzpicture}
  \tkzInit[xmax=5,ymax=5]\tkzGrid
  \tkzDefPoints{0/0/A,2/2/B,5/5/C}
  \tkzDefRandPointOn[rectangle = A and B]
  \tkzGetPoint{a}
  \tkzDefRandPointOn[rectangle = B and C]
  \tkzGetPoint{d}
  \tkzDrawLine(a,d)
  \tkzDrawPoints(A,B,C,a,d)
  \tkzLabelPoints(A,B,C,a,d)
\end{tikzpicture}

\end{document}