July 2015
Intermediate to advanced
286 pages
6h 31m
English
This chapter has been a lot to take in! We’ve looked at a new kind of grid—the polar grid—and talked about how to represent and display it. We talked about how to use adaptive subdivision to keep the cells of our new grid evenly sized, and finally showed how to use modulus arithmetic to remove seams by making opposite boundaries adjacent.
Even so, we hardly scratched the surface. Here are some things you might want to try on your own.
In the earlier implementation, a cell gets subdivided when it’s at least 1.5 times wider than the row is tall. (That’s what the use of the round method was for, on line 13 in PolarGrid#prepare_grid.) Try adding or subtracting something, like 0.25, inside the parentheses ...
Read now
Unlock full access