I am reading Computational Geometry (Arrangements and Duality chapter) and I cannot understand the equation for $\mu(h_p(\phi))$ where it is defined as shaded area bounded by half-plane $h$ in unit square $U = [0:1]\times[0:1]$.
The discrepancy of the half-plane $h$ is defined as supremum of the discrepancies over all possible half-planes, where discrepancy is a absolute difference between the fraction of shaded area in $U$ minus fraction of points that are in shaded area.
Book says there is local maximum discrepancy for a given point. They provide a way to compute shaded region based on a given point. I do not understand the math behind this calculation (I guess I forgot some basic geometry/trigs). I also do not understand their statement "In this case there are at most two local extrema". Why? How do we find this local extrema?

