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.

 Due Date will be : 31 May 2021

Objectives:

The objective of this assignment is to assess the understanding of students about the concepts of Open GL programming in computer graphics.

Instructions:

Please read the following instructions carefully before submitting the assignment:

•      You should consult the recommended books, PowerPoint slides and audio lectures to clarify your concepts.

•      You are supposed to submit your assignment in .doc format. Any other formats like scan images, PDF, ZIP, RAR and BMP etc, will not be accepted.

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

•      The assignment is submitted after the due date.

•      The assignment is copied from the Internet or any other student.

•      The submitted assignment does not open or file is corrupt.

Note: No assignment will be accepted after the due date through email in any case (load shedding, server down, internet malfunctioning, etc.).

It is recommended to upload the solution file at least two days before its closing date.

For any query about the assignment, contact at cs602@vu.edu.pk

 

Question Statement                                                                                                               Marks=15 

Question # 1

Write the midpoint circle algorithm in 5 to 6 steps. Calculate the pixel positions using addition and subtraction. Remember to access the screen coordinates as integer parameters.

 

Question # 2

Write a c++ program to display a raster tide using the midpoint algorithm. The radius of the circle and its coordinates are the inputs to your program. Use the frame buffer technique to set the pixel positions and colors.

 

BEST OF LUCK

Views: 654

Replies to This Discussion

Share the assignment Question & Discuss Here....         

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.

CS602-Assignment-01-Solution-Spring-2021-Complete-Solution

Link file

CS602-Assignment-01-Solution-Spring-2021-Complete-Solution.docx

Cs602 assignment no 1 solution spring 2021

Click on the below link 

Cs602 assignment no 1 solution spring 2021

Total Marks = [20]

Assignment No. 01
Semester: Spring 2021
Computer Graphics – CS602

 

Total Marks: 20

 

Due Date:

May 31, 2021

 

Objectives:

The objective of this assignment is to assess the understanding of students about the concepts of Open GL programming in computer graphics.

Instructions:

Please read the following instructions carefully before submitting the assignment:

•      You should consult the recommended books, PowerPoint slides and audio lectures to clarify your concepts.

•      You are supposed to submit your assignment in .doc format. Any other formats like scan images, PDF, ZIP, RAR and BMP etc, will not be accepted.

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

•      The assignment is submitted after the due date.

•      The assignment is copied from the Internet or any other student.

•      The submitted assignment does not open or file is corrupt.

Note: No assignment will be accepted after the due date through email in any case (load shedding, server down, internet malfunctioning, etc.).

It is recommended to upload the solution file at least two days before its closing date.

For any query about the assignment, contact at cs602@vu.edu.pk

 

Question Statement                                                                                                               Marks=15 

Question # 1

Write the midpoint circle algorithm in 5 to 6 steps. Calculate the pixel positions using addition and subtraction. Remember to access the screen coordinates as integer parameters.

 

Question # 2

Write a c++ program to display a raster tide using the midpoint algorithm. The radius of the circle and its coordinates are the inputs to your program. Use the frame buffer technique to set the pixel positions and colors.

 

CS602 Assignment 1 solution spring 2021 By Abid Farooq Bhutta CS602 Assignment No.1 Spring 2021 100% Correct Complete Solution By Abid Farooq Bhutta. CS602 Assignment 1 Complete Correct Solution Solved 2021 || Spring 2021 CS602 Solution Assignment no.1 2021 || Complete Correct Spring 2021 Solved. CS602 Assignment 1 Complete Solution Spring 2021, CS602 Assignment 1 Complete Solution, CS602 Assignment 1, CS602 , CS602 Assignment 1 solution, CS602 assignment Spring 2021, CS602 assignment solution Spring 2021, CS602 assignment, Assignment 1 CS602 solution, solution CS602 Assignment 1, CS602 Assignment 1 solution 2021, CS602 assignment solution 2021, CS602 Assignment 1, CS602 Assignment 1 solution Spring 2021, CS602 Assignment no 1 solution Spring 2021, CS602 Assignment no 1 solution 2021, CS602 1rd assignment solution 2021, CS602 1rd assignment solution, CS602 1st assignment solution Spring 2021,assignment solution Spring 2021, # CS602

cs602 Assignment 1 solution spring 2021

CS602 Assignment#02 Solution Spring 2021

Question # 1

Write the midpoint circle algorithm in 5 to 6 steps. Calculate the pixel positions using addition and subtraction. Remember to access the screen coordinates as integer parameters.

 

Solution:

Step 1:

Read the Radius (r) of the circle:

Step 2:

Initialize starting position as

x = 0 and y = r

Step 3:

Calculate initial value or decision as

P = 1.25 - r

Step 4:

do

{

plot (x,y)

if (d < 0)

{

x = x + 1

y = y – 1

d = d + 2x + 2y + 1

}

While (x<y)

Step 5:

Determine symmetry points

Step 6:

Stop.

 

ALGORITHM:

Step 1:

Put x = 0 and y = r in equation (2)

We have p = 1 - r

Step 2:

Repeat steps while x ≤y

plot (x,y)

if (p<0)

Then set p = p + 2x + 3

else

p = p + 2 (x - y) + 5

y = y – 1 (end if)

x = x + 1 (loop end)

Step 3:

End

 

 

Question # 2

Write a c++ program to display a raster tide using the midpoint algorithm. The radius of the circle and its coordinates are the inputs to your program. Use the frame buffer technique to set the pixel positions and colors.

Solution:

#include <iostream>

#include<conio.h>

#include<graphics.h>

using namespace std;

main ()

{

int h,k,x=0,y,r,d;

int gdriver= DETECT , gmode, errorcode;

initgraph(&gdriver,gmode,“”);

cout”ENTER CIRCLE X - AXIS”;

cin>>h;

cout”ENTER CIRCLE Y - AXIS”;

cin>>k

cout”ENTER CIRCLE RADIUS”;

cin>>y

r=y;

d=1-r;

while(x>y);

{

If(d>0);

{

d=d+2*x+3;

}

else

{

d=d+2*(x-y)+5;

delay(200);

y=y-1;

}

x=x+1;

putpixel(x+h,y+k,1);

putpixel(y+h,x+k,2);

putpixel(-x+h,y+k,3);

putpixel(-y+h,x+k,4);

putpixel(-x+h,-y+k,5);

putpixel(-y+h,-x+k,6);

putpixel(x+h,-y+k,7);

putpixel(y+h,-x+k,8);

}

 

CS602-Assignment-01-Solution-Spring-2021-Complete-Solution

Link file

CS602-Assignment-01-Solution-Spring-2021-Complete-Solution.docx

RSS

Looking For Something? Search Below

VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

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

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