OOD Project: LFSR

Animations using java
duke

Screen Shot 2015-02-23 at 12.19.21 AM

If you are still trying to fit all the piece together, look again at the transform method from PhotoMagic.java:

The transform() method
Takes a Picture and an LFSR as arguments and returns a new Picture object that is the result of transforming the argument picture using the LFSR as follows:

  1. For each pixel (col, row), in column-major order—(0, 0), (0, 1), (0, 2), … —extract the red, green, and blue components of the color (each component is an integer between 0 and 255).
  2. Then, xor the red component with a newly-generated 8-bit integer.
  3. Do the same for the green (using another new 8-bit integer) and, finally, the blue.
  4. Create a new Color object using the result of the xor operations, and set the pixel in the new picture to that color.