Given a 2D sideview with even-sized grid squares and our hero in a known center-ish position like this
... and imagining this hero's line of sight like this...
how could one get the point values needed for the black overlay polygons as shown here? Thanks!