Colorer une région du plan Crée par une droite
📅 May 06, 2024 | 👁️ Views: 101
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-5, xmax=5,
ymin=-5, ymax=5,
axis lines=middle,
xlabel={$x$},
ylabel={$y$},
xtick={-4,-2,...,4},
ytick={-4,-2,...,4},
grid=both,
]
% Define the function
\addplot[domain=-5:5.5, smooth, red, name path=curve] {(1 - x)/2};
% Find intersection with the top-most point on the left
\path[name path=laxis] (axis cs:-5,-5) -- (axis cs:-5,5); % axis x=-5
\path[name intersections={of=curve and laxis,by={A}}];
% Find intersection with the bottom-most point on the right
\path[name path=raxis] (axis cs:5,-5) -- (axis cs:5,5); % axis x=5
\path[name intersections={of=curve and raxis,by={B}}];
% Define the bottom-left corner of our domain
\coordinate (C) at (axis cs:-5,-5);
% Define the bottom-right corner of our domain
\coordinate (D) at (axis cs:5,-5);
% Fill the region below the curve
\fill[blue!20, opacity=0.6] (A) -- (B) -- (D) -- (C) -- cycle;
% Plot the points A, B, and C
\fill (A) circle (1pt) node[left] {A};
\fill (B) circle (1pt) node[right] {B};
\fill (C) circle (1pt) node[below left] {C};
\end{axis}
\end{tikzpicture}
\end{document}
Comme le régionnement du plan est facile à Créer en utilisant GeoGebra, je conseil de l'utiliser pour générer une figure comme cette figure
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-5, xmax=5,
ymin=-5, ymax=5,
axis lines=middle,
xlabel={$x$},
ylabel={$y$},
xtick={-4,-2,...,4},
ytick={-4,-2,...,4},
grid=both,
]
% Define the function
\addplot[domain=-5:5.5, smooth, red, name path=curve] {(1 - x)/2};
% Find intersection with the top-most point on the left
\path[name path=laxis] (axis cs:-5,-5) -- (axis cs:-5,5); % axis x=-5
\path[name intersections={of=curve and laxis,by={A}}];
% Find intersection with the bottom-most point on the right
\path[name path=raxis] (axis cs:5,-5) -- (axis cs:5,5); % axis x=5
\path[name intersections={of=curve and raxis,by={B}}];
% Define the bottom-left corner of our domain
\coordinate (C) at (axis cs:-5,-5);
% Define the bottom-right corner of our domain
\coordinate (D) at (axis cs:5,-5);
% Fill the region below the curve
\fill[blue!20, opacity=0.6] (A) -- (B) -- (D) -- (C) -- cycle;
% Plot the points A, B, and C
\fill (A) circle (1pt) node[left] {A};
\fill (B) circle (1pt) node[right] {B};
\fill (C) circle (1pt) node[below left] {C};
\end{axis}
\end{tikzpicture}
\end{document}
Related Courses, Exams, and Exercises
- Colorer une région du plan Crée par une droite - GeoGebra Course
- Régionement du plan et systèmes linèaires Course
Course PDF:
📥 Download Colorer une région du plan Crée par une droite (PDF)
if you find this content helpful, Please consider supporting me with a small donation
إن وجدت هذا المحتوى مفيدا، من فضلك إدعمني بمبلغ بسيط كتبرع
Buy me a coffee — إشتر لي قهوة
PayPal.me • عبر بايبالOr bank transfer • أو حوالة بنكية
Titulaire : RADOUAN MOSAID RIB : 230 090 6501953211022000 65 IBAN : MA64 2300 9065 0195 3211 0220 0065 BIC / SWIFT : CIHMMAMC
Most Viewed Courses
Tous les sujets des suites numériques des examens nationaux 2008 - 2022
Views: 1.91K
Exam • Maths • 2 Bac Science
DM 1 - Arithmetiques, Calcul vectoriel et projection
Views: 1.68K
Exam • Maths • Tronc Commun Sciences
MATHEMATIQUES Examens nationaux 2003-2021 2 Bac.Sciences expérimentales
Views: 1.67K
Exam • Maths • 2 Bac Science
Control 01 S01 En arithmétiques et Calcul vectoriel - A 2025-2026
Views: 1.66K
Exam • Maths • Tronc Commun Sciences
Recent Articles
Boosting LaTeX Editing with Custom Vim Mappings
23 Nov 2025
Most Viewed Articles
The Ultimate Vim Setup (My 2024 vimrc ) : Essential Commands, Configurations, and Plugin Tips
Views: 1.01K
12 Apr 2024