Our applet uses two different approaches, depending on whether the user wants to flip or rotate. Since our image matrix is one-dimensional, it is much easier (not to mention computationally "cheaper") to simply reverse every image data line (horizontal flip), or every image data column (vertical flip).
When the applet was originally written, it took every coordinate, converted it to polar form, added the angle value, reconverted it to rectangular form (Cartesian), and mapped it to the appropriate matrix location based on the coordinate. Sounds good in theory, huh? Well, it didn't work very well, because the images were always missing spots, and the more rotation occurred, the more spots were missing. This was clearly unacceptable, so the applet was rewritten.
Have you figured out what's wrong? Because of the numerical accuracy, you will almost always have pixels missing in your image. The solution, however, is much simpler than you may think. All you really have to do, it turns out, is do the same procedure in reverse. Rather than starting mapping to the matrix from the original data, we mapped from the matrix. This meant that every pixel either had some corresponding pixel in the data or was colored black to be part of the background.
You're finished with the explanation! What better time to try out these effects?