Thanks for spotting this (was a remnant of an earlier draft of the document). I've updated the code and added a line of explanation so that it now does flip the y-axis.
Looks good. One other thing that might confuse readers is that coords1 is essentially a flipped version of coords (and scaled to be much larger). So when you flip the y-axis in scaleFn it could be a little confusing that the shape generated by rendering coords1 is oriented the same as the shape produced by rendering coords.