Reworked to be more like the final product in chapter 4 and added some simple anti-aliasing, but that will need more work