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

% Ex. No. 73 (Section 11.3 : Random point on a segment)

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

\end{document}