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

Graphics Aim Algorithm

The document describes 7 experiments related to computer graphics algorithms and image processing. Experiment 1 discusses the Bresenham line drawing algorithm. Experiment 2 covers the Bresenham circle drawing algorithm. Experiment 3 is about line clipping. Experiments 4 and 5 involve 2D and 3D transformations. Experiment 6 transforms an image between color and grayscale modes. Experiment 7 creates animations using Photoshop. Each experiment lists the aim, algorithm steps taken, and results.

Uploaded by

Saran S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Graphics Aim Algorithm

The document describes 7 experiments related to computer graphics algorithms and image processing. Experiment 1 discusses the Bresenham line drawing algorithm. Experiment 2 covers the Bresenham circle drawing algorithm. Experiment 3 is about line clipping. Experiments 4 and 5 involve 2D and 3D transformations. Experiment 6 transforms an image between color and grayscale modes. Experiment 7 creates animations using Photoshop. Each experiment lists the aim, algorithm steps taken, and results.

Uploaded by

Saran S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

EX.NO: 1 1.

BRESENHAM DDA LINE DRAWING

DATE : ALGORITHMS

AIM:

To create a Program Line using DDA drawing algorithm.

ALGORITHM:

Step1: Start the Process

Step2: Read the Starting point of the line x1,y1.

Step3: Read the end point of the line x2,y2.

Step4: Delete the graph gx,gy

Step5: Initialize the graph gx,gy.

Step6: Assign the value and initialize and repeat the following

Step7: Stop the Process and Execute the process.


RESULT:

Thus the program has been executed successfully.


EX.NO: 1 BRESENHAM LINE DRAWING ALGORITHM

DATE :

AIM:

To create a program line drawing bresenham drawing algorithm

ALGORITHM:

Step1: Start the process

Step2: Read the following Starting point of the line x1y1 and x2y2

Step3: Read the end point of the line x2,y2

Step4: Delete the graph gx,gy

Step5: Assign and Initialize the following steps

Step6: Stop the Process and run the program.


RESULT:

Thus the program has been executed successfully.


EX.NO: 2 2.BRESENHAM CIRCLE DRAWING ALGORITHMS

DATE :

AIM:

To create a program circle using Bresenham Algorithm.

ALGORITHM:

Step1: Start the Program.

Step2: Reading the Starting point xc,yc

Step3: Read the end point of circle r.

Step4: Calculate dx=abs(xc,yc),dy=2tdydx

Step5: Calculate decision parameter for next it acess.

Step6: else a pixel on x,y.

Step7: put pixel on x,y

Step8: repeat the Statement a,10 for x end times.


RESULT:

Thus the program has been executed successfully.


EX.NO: 3 3. LINE CLIPPING

DATE :

AIM:

To write and create a program clipping algorithm using line clipping.

ALGORITHM:

Step1: Start the Process.

Step2: Declare the variable x1,y1, x2,y2

Step3: Initialize the graphics g,a

Step4: Set the style (1,0,1)

Step5: Calculate the decision parameter for next it access.

Step6: Stop the process and execute the program.


RESULT:

Thus the program has been executed successfully.


EX.NO: 1 4. 2D TRANSFORMATIONS

DATE :

AIM:

To create a cube and apply 2d transformation like scaling,rotation about axis and
translation.

ALGORITHM:

Step1: Start the process

Step2: Detect the graph gd,gm

Step3: Initialize the graph gd,gm

Step4: Set the will style and color of the graph

Step5: Align the function and call function axis()

Step6: Print and read the scaling sactou call the function axis()

Step7: Print “after scaling” then


RESULT:

Thus the program has been executed successfully.


EX.NO: 5 5.3D TRANSFORMATIONS

DATE :

AIM:

To create a cube apply 3D transformation line scaling rotation about axis 3D


translation.

ALGORITHM:

Step1: Include the graphics header file

Step2: Initialize graphics using initgraph()

Step3: Initialize the variable and

Step4: Enter the choice for transformation

Step5: Stop the process and execution the program.


RESULT:

Thus the program has been executed successfully.


EX.NO: 6 6. PERFORMING VARIOUS EDITING

DATE : OPERATIONS ON AN IMAGE

AIM:

To transform an image from colour mode to gray scale mode and vice versa.

ALGORITHM:

Step1: Open an image file

Step2: To change the RGB colour mode to gray scale, select image mode gray scale.

Step3: To change the Gray scale mode to RGB color mode select image RGB mode

Step4: To get the color information of the image, select file Revert.

Step5: Stop the process.


RESULT:

Thus the program has been executed successfully.


EX.NO: 7 7. CREATING DIFFERENT ANIMATIONS

DATE :

AIM:

To create gid image using Photoshop 7.0 and image ready for publish to the web.

ALGORITHM:

Step1: Start Program Adobe Photoshop7.0

Step2: From the Photoshop you can create/insert two different type of picture form the layer.

Step3: You can arrange the image from each frames

Step4: File Same Optimized

Step5: Save as HTML and Images

Step6: Click Chrome browser can see the output run


RESULT:

Thus the program has been executed successfully.

You might also like