Due date: Wednesday, January 26.
Ex. 1 Download and compile the following program:
simple_image.cc
To copile it, use the following command:
g++ simple_image.cc -o simage
When you execute the program, (type the command simage), it will create
a file named "red2bluye.ppm" that you can visualize with ImageMagic
(display command). It should look something like this:
a. Write a function to generate a vertical gradient.
b. Write another function to generate a radial gradient
where the color varies from (r1, g1, b1) at the center of the image up
to (r2, g2, b2) in the corners. The gradient will be contained in a
circle of radius equal to half of the diagonal.
c. Add 3 command-line options to the program, the first one
being the image file name, the second and third ones being the width
and height of the image. The program should ask the user for the type
of gradient they want to generate, then pick two random colors and
generate the image based on all of this information.
Turn in: modified source code.