CS2405 Cg Lab Manual

October 26, 2017 | Author: Ragavendhran N | Category: Space, Geometry, Computer Graphics, Areas Of Computer Science, Scientific Modeling
Share Embed Donate


Short Description

Download CS2405 Cg Lab Manual...

Description

COLLEGE OF ENGINEERING Mudaiyur-606902

(COMPUTER SCIENCE AND ENGINEERING) (2012-2013)

CS2405 – COMPUTER GRAPHICS LABORATORY

Name

……………………………………………………..

Roll No

…………… Reg. No ……………………………..

Year

………….. Semester …………………………….

Subject

……………………………………………………..

COMPUTER GRAPHICS LABORATORY

ANNAMALAIAR COLLEGE OF ENGINEERING Mudaiyur-606902

DEPARTMENT OF

______________________

CERTIFICATE This is Certified that the bonafied record of practical work done by Selvan/Selvi …………………………….. ….Reg No …………………… Sem …………………… In the Subject of ….…………………………… during 2011 - 2012.

Head of the Department

Submitted for the Practical Examination held on

Internal Examiner

Staff in-Charge

…………………...

External Examiner

ANNAMALAIAR COLLEGE OF ENGINEERING

COMPUTER GRAPHICS LABORATORY

INDEX

Ex. Date No

Name of the Experiment

P. No

Sign

BRESENHAM’S LINE DRAWING ALGORITHM

1 BRESENHAM’S CIRCLE DRAWING ALGORITHM

2 BRESENHAM’S ELLIPSE DRAWING ALGORITHM

3 OUTPUT PRIMITIVES

4 TWO – DIMENSIONAL TRANSFORMATION

5

6

COMPOSITE TWO – DIMENSIONAL TRANSFORMATION COHEN SUTHERLAND 2D LINE CLIPPING

7 WINDOWING TO VIEWPORT MAPPING

8

9

SUTHERLAND – HODGEMANN POLYGON CLIPPING ALGORITHM THREE – DIMENSIONAL TRANSFORMATION

10 11

COMPOSITE THREE – DIMENSIONAL TRANSFORMATION

12

GENERATING FRACTAL IMAGES

ANNAMALAIAR COLLEGE OF ENGINEERING

COMPUTER GRAPHICS LABORATORY

EX NO: 1 DATE :

BRESENHAM’S LINE DRAWING ALGORITHM

Aim: To write a C program to draw a line using Bresenham’s Algorithm.

Algorithm: Step 1:Start the program. Step 2:Input the two endpoints (x1,y1) and (x2,y2). Step 3:Plot the pixel value (x1,y1) with a specified color. Step 4:Calculate the value of dx and dy and find the starting value of decision parameter as dp=2*dy-dx. Step 5:Calculate the values of s1 and s2 depending on (x1,y1) and (x2,y2) values. Step 6:If dpx2) { x=x2; y=y2; xend=x1; } else { x=x1; y=y1; xend=x2; } putpixel(x,y,2); for(i=x;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF