1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
\begin{tikzpicture}[scale=1.5]
\tkzInit[xmax=4,ymax=5]\tkzGrid[sub]
\tkzDefPoint(1,2){A} \tkzDefPoint(3,4){B}
\tkzDefPoint(3,2){C} \tkzDefPoint(3,1){D}
\tkzDrawSegments(A,B A,C A,D)
\tkzDrawPoints[color=red](A,B,C,D)
\tkzLabelPoints(A,B,C,D)
\tkzFindSlope(A,B){SAB} \tkzFindSlope(A,C){SAC}
\tkzFindSlope(A,D){SAD}
\pgfkeys{/pgf/number format/.cd,fixed,precision=2}
\tkzText[fill=Gold!50,draw=brown](1,4)%
{La pente de (AB) est : $\pgfmathprintnumber{\SAB}$}
\tkzText[fill=Gold!50,draw=brown](1,3.5)%
{La pente de (AC) est : $\pgfmathprintnumber{\SAC}$}
\tkzText[fill=Gold!50,draw=brown](1,3)%
{La pente de (AD) est : $\pgfmathprintnumber{\SAD}$}
\end{tikzpicture}
|