CS602 Computer Graphics Assignment No. 02 Solution and Discussion Fall 2014 Due Date: Dec 11, 2014



This assignment is based your Assignment No.1. Please see the given startup code for this assignment (in attached folder Startup_Code) which is same as solution of Assignment No.1 with slight modification i.e. Circle of moon orbit and the text along moon is removed in order to make the task little simple for this assignment. Open Assigment2.dev project file in Dev-C++ and after successful compilation and execution, you will see the output. You can see the code in order to understand how coordinates of the moon are modified to introduce motion effect.
After understanding it’s working, you need to further modify the code as desired in this assignment.



Your Task

Your task is to slightly modify this code just by filling the circles representing the Earth and Moon in desired colors as shown in the executables inside “Desired_Output” folder. You can see, Earth is filled with Green color and Moon is filled with White color. Your efforts will be graded as per the marking scheme given on next page.


Hint: You can implement flood or boundary fill algorithm to fill these circles with desired colors or you can explore and seek using graphics library functions (following link may be helpful).

Sponsored Links

You shall not use any OpenGL library functions in this assignment.




Marking Scheme

20 marks will awarded if you are able to produce clean output without flickering as shown in “Output_without_Flikering.exe”.
15 marks will awarded if you are able to produce clean output with flickering as shown in “Output_with_Flikering.exe”.
5 marks will be deducted if your Moon leaves traces behind i.e. you are not properly erasing.
5 marks will be deducted if motion of Moon is not smooth i.e. jumping from one place to another.

Screenshot of the desired output:

Submission

You are required to submit your solution through LMS in zip format containing two files.

Your Project in zipped form containing both .dev and .cpp file.
An MS Word document containing screenshot of your program output/execution and your own Student-ID must be visible in the screenshot.