0% found this document useful (0 votes)
28 views

2016 Assignment 1

The document outlines an individual assignment on computer graphics topics. It includes tasks such as defining display units, drawing lines and circles using algorithms, writing code in OpenGL, and comparing graphics concepts and models.

Uploaded by

Migbar Atalay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

2016 Assignment 1

The document outlines an individual assignment on computer graphics topics. It includes tasks such as defining display units, drawing lines and circles using algorithms, writing code in OpenGL, and comparing graphics concepts and models.

Uploaded by

Migbar Atalay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Individual assignment 1

Deadline: April 25,2024


1. Define, compare and contrast different types of display unit (CRT, LED and LCD).
2. As we know we need powerful computers to do different computer graphics such as computer
with GPU and graphics card. Why?
3. Draw line between point (10,2) ,(15,24) and (0,0),(10,5) using this two algorithms (DDA and
Bresenham's) by showing all necessary steps.
4. Draw circle by applying midpoint algorithm by considering the following given
a. Center (0,0) and radius 14
b. Center (5,7) and radius 7
5. Write short review about state of the art (current) application of computer graphics?
6. Compare and contrast Interactive and Passive Graphics with example.
7. Define the following computer graphics terms.
A. Modeling
B. Rendering
C. Animation
D. Pixels
E. Image
F. Aspect Ratio
G. Pixels per Inch (PPI)
H. Image Resolution
I. Display Resolution (by considering differences between 4k,full hd,hd…)
8. Compare and contrast the following screen
 Binary(Black/White)
 Gray-Scale Systems
 Full Color/True Color
 High Dynamic Range
9. What are the main purpose of GKS (Graphical Kernel System)?
10. Compare and contrast RGB and CMY Color Model
11. Write openGL code to display point, line and circle.
12. Draw the output of the following c++ code

#include<stdio.h>
#include<graphics.h>
#include<conio.h>
int main()
{

int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
setcolor(3);
circle(200,150,30);
line(100,200,300,200);
line(100,400,300,400);
line(100,400,100,200);
line(300,400,300,200);
line(170,250,270,250);
line(170,200,270,200);
line(170,250,170,400);
line(270,250,270,400);
line(300,200,200,50);
line(100,200,200,50);
getch();
}
13. Consider the following code and write the function or purpose of each line.

#include <GL/glut.h>
#include <stdlib.h>
void myInit(void) {
glClearColor(1.0, 1.0, 1.0, 0.0);
glColor3f(0,0,0);
glPointSize(4.0);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}

void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glVertex2i(100,50);
glVertex2i(100,130);
glVertex2i(150,130);
glEnd();
glFlush();
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(640,480);
glutInitWindowPosition(10,10);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("GLUT Points demo");
glutDisplayFunc(display);
myInit();
glutMainLoop();
return EXIT_SUCCESS;
}

You might also like