Assignment: Orbital Fractals - Threads
This is the second part of a two-part project.
In the solution to part 1, you saw that, among other things, the # of dots to be drawn can be controlled from the GUI. (Actually, the code draws 1000 times the number entered into the GUI.) When this number is large, you will find that several seconds are required to complete the drawing. During that time, the GUI is "locked up" - unresponsive.
Your task is to further modify [login to view URL] (starting from your code or my solution to part 1) by moving the drawing code into a separate thread so that the GUI remains responsive at all times. Grading criteria are
Does your code compile once you have introduced the threading?
Does your threaded code still draw the graphics correctly?
Assuming both of the above are satisfied, can the GUI elements be manipulated even during a lengthy draw?
Assuming all of the above are satisfied, what happens when the colors or drawing parameters are altered during a lengthy drawing operation? Best would be that each such change causes the drawing thread to abandon the old draw and to start over with the new information. Next best is for the new information to be ignored until the first draw is complete and then have the fractal redrawn with the new information. Worst is for the fractal to be drawn partly with the old information and partly with the new.
Does your code display the fractal incrementally, or just display the completed figure (may depend on your processor speed)?