Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS602: Computer Graphics Assignment No. 03 Semester: Fall 2014 Total Marks: 20 Due Date:12/02/2015


Total Marks: 20


Due Date:12/02/2015


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 about rotation of Line.



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, a line and a point on screen as shown in following screenshot.

By opening project file in Dev-C++ and successful compilation, execution, you will see the above output. Notice the small Dot near the middle of screen; this is our center of rotation.


Your Task

Your task is to add few lines of code in order to rotate the line around the “point near the center” as shown in “DesiredSolution.exe”. Each time, you press Spacebar button on the keyboard, the line is slightly moved along the circular path. If keep on press the spacebar, the line will keep revolving around this central point. This simply requires only few lines of code to modify the x and y coordinates of the Line. You shall add your code inside the while loop in the areas indicated with comments “Add your code here to modify coordinates of Line”.

Hint: You have to use your mathematical skills in order to calculate the coordinates of Line for its rotation about the given point.

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.



Views: 3080


Replies to This Discussion

I know....

yes...... i Got It.....

See Page Number 128 ... Lecture Number 13.... 

just change the name of variables .. given in the project file.....

it will definitely work...


wah bhai rauf kia bat he ap ki

bhai koi to upload kar dy solution kesy karni hai ye assignment

Dear bro compile ir execute ho jata ha,, bt rotating nhi kr rha... by pressing space bar... plzzzzzzzzzz help me out.. how do it to fix this issue...

mera to yr compikle b ni ho ra 18 errors aa ry hain us code sy 

Dear app ki Graphics liberary phr set nhi hoigi thats why app k error ziyda a rhy hai...

app vullms se graphics libery ki zip file download kr loo r us ko extract kro..  

graphics  file ko dev  k foler ma  include waly folder ma paste kro..

or dusri file jo hai us ko lib folder m pastee kroo or again se phr run kroo. erooor kam ho jaingay.. 

Linker files Add karen apne project me....

please follow the instructions given in 1st Assignment 


Adul rauf bro..  Rotation ma help kroo....

Code thek se execute hota hai bt space bar press krnay se rotation nhi kr rhi line.

Bro... page 128 pe jo code hai.. As it is wo hi likha jae ga Bus co ordinates ka Name change hoga

Dear friends.... Ap log Bhi Kia yaad karo ge.. Kis SAKHI se pala para hai...... 

Please change your Student ID in the main program



Looking For Something? Search Below

Top Trends 

1 Sara


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

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