[Tex/LaTex] fill space between a quadrilateral drawn with four lines in tikz

drawfilltikz-pgf

I want to fill the space between four lines (quadrilateral) using gray color using tikz. How can I do it.

I also want to tag the origin point as 's'

\documentclass[12pt]{beamer}
\usepackage[T1]{fontenc}
\usetheme{metropolis}

\mode<handout>{
  \usepackage{pgfpages}
  \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
}
\usepackage{tikz}
\usetikzlibrary{calc}

\makeatother

\begin{document}
\begin{frame}{Introduction}
\begin{block}{Pareto Optimal Solutions}
\begin{center}
\begin{tikzpicture}
\coordinate (Origin)   at (0,0);
\draw[thick,->] (0,0) -- (6,0);
\draw[thick,->] (0,0) -- (0,4.5);
\coordinate (Bone) at (1.7,2.8);
\coordinate (Btwo) at (3.2,1.2);
\coordinate (Bthree) at (4,2.8);
\draw [thick,-] (Origin) -- (Bone) (Bone) -- (Bthree) (Bthree) -- (Btwo) (Btwo) -- (Origin) node {};
\end{tikzpicture}
\end{center}
\end{block}
\end{frame}
\end{document}

Best Answer

enter image description here

\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate[label={[below]$s$}] (Origin)   at (0,0);
\coordinate (Bone) at (1.7,2.8);
\coordinate (Btwo) at (3.2,1.2);
\coordinate (Bthree) at (4,2.8);
\draw[thick,->] (0,0) -- (6,0);
\draw[thick,->] (0,0) -- (0,4.5);
\draw [thick,-,fill=gray] (Origin) -- (Bone) -- (Bthree) -- (Btwo) -- cycle;
\end{tikzpicture}
\end{document}

Edit: To add the label S in the middle, you can either guess the coordinates, using e.g. something like

\node at (2.5,2) {$S$};

or you can compute the position:

\usepackage{tikz}
\usetikzlibrary{calc}
...
\node at ($0.25*(Origin)+0.25*(Bone)+0.25*(Btwo)+0.25*(Bthree)$) {$S$};