A Pattern for Image Processing

As we have seen with turtles and words, there are some general patterns in the programs that we write. With turtles, there was a polygon pattern (based on the Total Turtle Trip Theorem). When working with words and numbers, we used the accumulator pattern.

The image processing pattern is shown in the program below. This program changes the red to the original green, the green to the original blue, and the red to the original green. But, mostly we are trying to describe a pattern that you can use to create many image effects.

Here are our seven steps:

Next Section - Changing Step 5: Increasing and decreasing color values