Assignment
Completer the project 2 as specified on page 85.
Generate and plot 1000 points using the rules as follows:
Initialize a point at any place in your window. Each point new q is formed from the previous point p according to the rules:
q.x = M (1+ 2*L)-p.y+|p.x-L*M|
q.y=p.x
Where constants M and L are carefully chosen to scale and position the gingerbread man on the display. (The values M=40 and L =3 might be good choices for a 640-by-480 pixel display.)
Notice that y-coordinate of the new point, q, is simply the x-coordinate of the previous point , p
Write a program that allows the user to choose the starting point for the iterations with the mouse, and draw the dots for the gingerbread man. Use a menu with three choices red, green, and blue to change the color. Initially set the color as red.