0% found this document useful (0 votes)
11 views1 page

DDA Line Drawing C Programs Guide

The document outlines a series of practical tasks for a Computer Graphics Lab, focusing on the implementation of the Digital Differential Analyzer (DDA) line drawing algorithm in C. It includes writing programs to draw lines, closed polygons, and various line styles, as well as generating an integer grid. Each task requires user input for coordinates and other parameters.

Uploaded by

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

DDA Line Drawing C Programs Guide

The document outlines a series of practical tasks for a Computer Graphics Lab, focusing on the implementation of the Digital Differential Analyzer (DDA) line drawing algorithm in C. It includes writing programs to draw lines, closed polygons, and various line styles, as well as generating an integer grid. Each task requires user input for coordinates and other parameters.

Uploaded by

Aman Choudhary
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Graphics Lab Practicals

1.​ Write a C program to implement the Digital Differential Analyzer (DDA) line drawing
algorithm. The program should accept two endpoints of a line segment as input and
display the line using graphics functions.​

2.​ Write a C program to draw a closed polygon (triangle or rectangle) by using the DDA
algorithm for each edge. The coordinates of the vertices should be taken as input from
the user.​

3.​ Write a C program using the DDA algorithm to draw these (accept endpoints and style
choice as user input):​

○​ a solid line​

○​ a dashed line

4.​ Write a C program to generate an integer grid (like graph paper) using horizontal and
vertical lines with the DDA algorithm. The size of the grid should be input by the user.

You might also like