AOA To All....
Assignment No. 01
CS602: Computer Graphics
Total Marks: 20
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 objective of this assignment is to;
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 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.
+ 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)
Please Discuss here about this assignment.Thanks
Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.
Discuss assignment idea
dosto discuss start karo yar
Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....
Just modification karni ha code sara dia ha bus small circle k color change and positon change ka code hum nay add karna ha given code ma
mr adi code chang ks trhn krna hai hai ap hi help kar do
how do we write the code for changing the position of the moon in the orbit in blinking position???
in which format we write the code ???
mara to existing code hi execute nae ho rha
Any IDEA???? please
Help k folder me jo file hai Wo read karen ap./// Insha Allah ho jae ga execute
nahi ho rha mujh say tou koi tou help karo .
Assignment 1.dev nhi open ho rha mera :( compiler ki setting kia karni ho gi is kay liye?