Just watch
Credit to @cs8brown for the amazing original algorithm. In theory, this algorithm offers slightly better performance than the original and doesn't have weird flashing where there isn't a spot. :)