Thanks to papipupepappa for the original project No-Pen Polygon. I've added arrows to make it clearer what's going on. Reflex angles are indicated by an R. @papipupepappa's own explanation is much better: https://scratch.mit.edu/projects/1187463401/