the medial axis is the set of points with more than one closest boundary point — the centers of the bitangent circles, the ridge of the distance field. drag the polygon vertices around. the orange points are the discrete medial axis: for each grid point i find its nearest boundary point, then the nearest boundary point that is genuinely far away (a bitangent partner), and keep it if the two distances match. that's literally the definition, done on a grid — not the exact segment-voronoi, but the leaves land on convex corners and it branches into the teeth like it should.