We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

AOA To All....

Assignment No. 01
Semester: Fall 2014

CS602: Computer Graphics


Total Marks: 20


Due Date:25/11/2014



Please read the following instructions carefully before submitting assignment:

Read and follow the instructions given in document inside the Help folder attached.

It should be clear that your assignment will not get any credit if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Solution is copied from any other source.


The objective of this assignment is to;

  • Learn and practice basic concepts of computer graphics using Dev-C++. (you can download Dev-C++ setup from LMS)
  • Learn to draw text, rectangle and circles using graphics library functions.



In this assignment, you are provided with a small startup code attached with this assignment in folder “StartupCode”. Your job is to slightly modify this code as desired in this assignment.

First, you need to understand the working of the given code and execute it in Dev-C++. This program essentially draws some text on screen with a rectangle and two circles labeled as “Earth” and “Moon” and a large circle represents the orbit of Moon as shown in following screenshot.


Initially, you need to open Assigment1.dev project file in Dev-C++. After successful compilation and execution, you will see the output. You will notice that small circle representing the Moon is blinking. The blinking effect is introduced just by simple continuous drawing this circle in WHITE and BLACK colors with some delay in between. When circle is drawn in WHITE color, it appears on the screen. After some delay, we draw the same circle in BLACK color which makes the circle disappear because our background color is also black. Delay of 100ms is introduced by using delay() function.

Your Task

Your task is to slightly modify this code in order to introduce motion effect to the Moon as shown in “Earth_Moon.exe”. This simply requires only few lines of code to modify the x and y coordinates of the Moon. You shall add your code in the areas indicated with comments “Add your code here to modify coordinates of Moon”.

Hint: You have to use your mathematical skills in order to calculate the coordinates of Moon along the orbit.

Screenshot of the desired  output:



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.




+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 1935


Replies to This Discussion

assignment folder me help follow kro step wise step.

Help k folder me jo file hai Wo read karen ap./// Insha Allah ho jae ga execute

today is extended day plz any idea 

for example:
if P(x,y) is the current pixel point then if we increment the value of x then pixcel will move towards right and when we decrement the value of y then the pixcel will move towards below and when we increment the valyue of x by 1 and along it decrement the value of y by 1 then the pixcel will move towards right and below...........
good luck.....

please koi to solution day do yar aaj extended day hai


Looking For Something? Search Here


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service