Optimized code that determines point color.
Better coordinate system grid (more lines).