Troubleshooting

The major problem with blobs like these is the sheer magnitude of the numbers we're dealing with. Here are the three scenarios that could crop up:

Overflow


Too big!

In this case, we haven't been dividing our multiplied distances by a large enough value (the 8589934592 above, for example). Hence the three tiny, sharp blobs and the colourful swirls as the number gets so large it wraps around. It could be less obvious than this, though: divide by even less and you could end up with a screen of noise, or just pure blackness. Make sure:

  1. That you're dividing by a large enough number, and
  2. That the variable type you are storing the multiplied number in is large enough to hold it without danger of overflowing.

Too large a dividing factor


Too small!

In this case, we have been dividing our multiplied distances by too large a value, meaning that the resulting value is 0 which ends up producing the brightest pixels all over the display. This is a quick fix - just make that number smaller!

Square blobs


No, that's not a low-quality JPEG.

This is a precision problem. Dividing your tables by a constant value to reduce the overall value might sound like a good idea in theory, but will usually result in odd-looking effects like the above. Use the straight values instead...