\documentclass[a4paper,12pt]{article}
\usepackage{myXsim}

\author{Benjamin Bertrand}
\title{Géométrie repérée - Cours}
\date{2022-01-13}

\pagestyle{empty}

\begin{document}

\maketitle

\bigskip

\section*{Milieu d'un segment}

\begin{propriete}[Coordonnée du milieu d'un segment]
    \begin{minipage}{0.5\linewidth}
        Soit $M$ et $N$ deux points quelconques et $K$ le milieu du segment $[MN]$. Alors
        \begin{itemize}
            \item L'abscisse de $K$ est la moyenne des abscisses de $M$ et $N$
                \[
                    x_K = \frac{x_M + x_N}{2}
                \]
            \item L'ordonnée de $K$ est la moyenne des ordonnées de $M$ et $N$
                \[
                    y_K = \frac{y_M + y_N}{2}
                \]
        \end{itemize}
    \end{minipage}
    \hfill
    \begin{minipage}{0.4\linewidth}
        \begin{tikzpicture}[scale=1.2]
            \draw[->, very thick] (-1, 0) -- (4, 0);
            \draw[->, very thick] (0, -1) -- (0, 4);
            \draw (0, 0) node [below left] {0};
            \draw (1, 0) node {+} node [below left] {1};
            \draw (0, 1) node {+} node [below left] {1};

            \draw (1.3, 1.4) node {+} node [below left] {$M$};
            \draw (1.3, 0) node {+} node [below] {$x_M$};
            \draw (0, 1.4) node {+} node [left] {$y_M$};

            \draw[dashed] (1.3, 1.4) --(1.3, 0);
            \draw[dashed] (1.3, 1.4) --(0, 1.4);

            \draw (3.3, 3.4) node {+} node [below right] {$N$};
            \draw (3.3, 0) node {+} node [below] {$x_N$};
            \draw (0, 3.4) node {+} node [left] {$y_N$};

            \draw[dashed] (3.3, 3.4) --(3.3, 0);
            \draw[dashed] (3.3, 3.4) --(0, 3.4);

            \draw (2.3, 2.4) node {+} node [below right] {$K$};
            \draw (2.3, 0) node {+} node [below] {$x_K$};
            \draw (0, 2.4) node {+} node [left] {$y_K$};

            \draw[dashed] (2.3, 2.4) --(2.3, 0);
            \draw[dashed] (2.3, 2.4) --(0, 2.4);

            \draw (1.3, 1.4) -- node [midway, sloped] {//}
                (2.3, 2.4) -- node [midway, sloped] {//}
                (3.3, 3.4);
            \draw (1.3, 0) -- node [midway, sloped] {$\bullet$}
                (2.3, 0) -- node [midway, sloped] {$\bullet$}
                (3.3, 0);
            \draw (0, 1.4) -- node [midway, sloped] {$\diamond$}
                (0, 2.4) -- node [midway, sloped] {$\diamond$}
                (0, 3.4);
        \end{tikzpicture}
    \end{minipage}
\end{propriete}

\paragraph{Exemple}: Coordonnée de $I$ milieu du segment $[AB]$ avec $A(23; 45)$ et $B (-3; 12)$

\[
   x_I = \frac{x_A + x_B}{2} = \frac{23 + (-3)}{2} = 10 
   \qquad \qquad
   y_I = \frac{y_A + y_B}{2} = \frac{45 + 12}{2} = 28.5
\]
Les coordonnées de $I$ sont $(10; 28.5)$.

\end{document}
