Tuesday, 22 March 2016

Time Table

Time Table for the course

Theory Session:
                           Day                                    Time
                          Monday                          1200 - 1300
                          Tuesday                          1100 - 1200

Lab Session:
                         Monday                           1430 - 1530
                         Tuesday                           1430 - 1530
                         Friday                              1430 - 1530



Note: 80% attendance is compulsory to appear in exam

Lab 1

Implementation of Line Incremental Algorithm

#include<graphics.h>
#include<iostream.h>
#include<conio.h>
void main()
{

int px1, px2, py1, py2, b;
float m;
int dy, dx;
cout<<"Dear please enter P1 points to draw a line";
cin>>px1>>py1;
cout<<"Dear please enter P2 points to draw a line";
cin>>px2>>py2;
dy=py2-py1; //py1-py2;
dx=px2-px1; //px1-px2;
m=float(dy/dx);
b=py1-m*px1;
//b=py2-m*px2;
int gd=DETECT, gm;
initgraph(&gd, &gm,"..\\bgi");
if(m==1)
{
    for(;px1<=px2;px1++)
    {
        putpixel(px1,py1, WHITE);
        py1++;
    }
}
else
    {
        if(m<1)
        {
            for(;px1<=px2;)
            {
                putpixel(px1, py1, GREEN);
                px1++;
                py1=m*px1+b;
            }
        }
else
    {
        for(;py1<=py2;)
        {
            putpixel(px1, py1, RED);
            py1++;
            px1=(py1-b)/m;
        }
    }

}

getch();
}

Monday, 21 March 2016

How to use codeblocks IDE for Graphics

Please watch the video and do as instructed in it
Click here to watch Video

Assiginment

Assignment No 1 and 2
1 is not graded

Assignment no1: 
Title:Submit a report in detail of the following topics:
  1. History of Computer Graphics
  2. Video Display Devices:
  •  Refresh Cathode-Ray Tubes
  • Raster-Scan Displays
  • Random-Scan Displays
  • Color CRT Monitors
  • Direct-View Storage Tubes
  • Flat-Panel Displays
  • Three-Dimensional Viewing Devices
Due date: 31/2/2016
Copy paste is poison for your knowledge-base, avoid it.

Assignment no 2:
Titile: Fill the entire screen using putpixel function with green color and calculate the maximum rows and columns. 
Marks: 5
Due date: 22/3/2016
 
Video Display Devices

Course Details


Course Instructor: Abid Saeed Khattak 
Course Name: Computer Graphics
Course Outlines:
Introduction, Hardware, Point, Line, Circle, Mathematics, Filling Algorithms I
Filling Algorithms II, Filling Attributes, Transformation, Types of Transformation
Drawings in 2d, 3d Concepts, 3d Mathematics, Projections, Parallel Projection, Types of Parallel Projection
Perspective Projection, Perspective Detail, Hidden Surface Removal, Rasterization
Clipping, Light And Light Sources, Light Models, Flat Shading
Gouraud Shading, Phong Shading, Recursive Subdivision, Introduction to Curves and Surfaces, Parametric Curves, Cubic Curves and Interpolation, Hermite Curves and Surfaces
Bezier Curves and Surfaces, Cubic B-Splines Curves and Surfaces, General B-Splines, Rendering of Curves and Surfaces, Buffers and Mappings, Texture Mapping, Environment Maps, Bump Maps
Animation, Recursive Methods and Fractals , Ray Tracing I, Ray Tracing II, Radiosity 


Grading Policy:
Assignments:                10%
Quizzes                             5%
Project:                            15% (Compulsory, in groups, max:3, min:1)
Attendance                     5%  (80% compulsory to appear in exam)       
Mid Exam:                       30%
Final Exam:                      35%