Cleanup

Removed checks for rectangular squares.
Added comments
replaced toHeat method

new method uses cosines to determine color.