0% found this document useful (0 votes)
23 views6 pages

CG 2024 Journal

Complete choen journal de mreadi

Uploaded by

jeelearning2405
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)
23 views6 pages

CG 2024 Journal

Complete choen journal de mreadi

Uploaded by

jeelearning2405
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/ 6

Expt1

Aim: To study and apply basic GL functions and draw a smiley


Theory:
1. What are header files and how to access it?
2. Explain the use of following functions of graphics.h (declaration format, and what it
does)
*initgraph()
*closegraph()
*getmaxx()
*getmaxy()
*circle ()
*rectangle ()
*line()
*arc()
*drawpoly()
*putpixel()
*floodfill()
*setfillstyle()
*setlinestyle()
*setcolor()
*getcolor()
*setbkcolor()
*getbkcolor()
Output: print code to draw smiley using the inbuilt functions, screenshot of smiley
Conclusion: I have understood the functions in graphics.h and have learnt to apply them

Expt2
Aim: To implement DDA line drawing algorithm
Theory:
- Scan conversion of a point in raster scan display and
random scan display.
- What is a line? Slope of a line? Line segment?
- Scan conversion of a line in raster and random scan displays
- DDA in pseudo code
- Stepwise plotting of different lines using DDA - horizontal,
vertical, 45°, between 0-45°, and 45-90°
Output: print code of DDA to draw a house, screenshot of output
Conclusion: I have understood the working of DDA line drawing algorithm
Expt3
Aim: To implement Bresenham’s line drawing algorithm
Theory:
- Disadvantages of DDA
- Derivation of Bresenham’s line drawing algorithm
- Pseudo code
- Working of algorithm with an example (plotting)
Output: print code of Bresenham’s to draw a parallelogram, screenshot of output
Conclusion: I have understood the derivation and working of Bresenham’s line drawing
algorithm

Expt4
Aim: To implement midpoint circle drawing algorithm
Theory:
-symmetry properties of a circle
-explain the Brute force method and it's disadvantages
- derivation of midpoint circle drawing algorithm
-pseudocode
-stepwise plotting with an example
Output: code of midpoint circle drawing to draw a Venn diagram of 3 sets, screenshot of output
Conclusion: I have understood the derivation and working of midpoint circle drawing algorithm

Expt5
Aim: To implement midpoint ellipse drawing algorithm
Theory:
- Symmetry properties of ellipse
- Derive midpoint ellipse drawing algorithm
- Pseudo code
Output: print code to draw an ellipse and screenshot of output
Conclusion: I have understood the derivation of midpoint ellipse drawing algorithm and
implement it.
Expt6
Aim: To implement polygon filling algorithms
Theory:
example. - Explain boundary fill algorithm with an
example - Explain floodfill algorithm with an example.

1. Boundary Fill2. Flood Fill

- Compare all 3 filling algorithms by stating their advantages and limitations. Output: print code to
draw a traffic signal. Use boundary fill for 3 lights and floodfill for outer rectangle, and
screenshot of output.
Conclusion: I have understood the working of polygon filling algorithms

Expt7
Aim: To implement 2D transformations
Theory:
- What are homogeneous coordinates? Explain with an example.
- Explain the five 2D transformations with 3x3 matrices and
appropriate examples
- translation, scaling, fixed point scaling, rotation, rotation
about pivot point, refection and shearing
- Explain the raster operations to perform simple transformations.
Output: print code to perform composite 2D transformations, screenshot of output
Conclusion: I have understood how to implement 2D transformations in CG
Expt8
Aim: To implement line clipping algorithms
Theory:
- Explain the viewing transformation pipeline
- Explain Cohen-Sutherland line clipping algorithm
with an example
- Derive the Liang Barsky line clipping algorithm
- Pseudocode
- Solve an example using the steps in your pseudo code.
Output: print code to clip lines using LB algorithm (have 4 lines.. all cases - visible, invisible,
clipped oblique line, clipped parallel line), screenshot of output
Conclusion: I have understood how to implement line clipping algorithms in CG

Expt9
Aim: To implement polygon clipping algorithms
Theory:
- Explain Sutherland-Hodgman polygon clipping algorithm with an example -
Explain Weiler-Atherton polygon clipping algorithm with an example -
Pseudocode of Sutherland-Hodgman algorithm
Output: print code to clip a polygon using SH algorithm, screenshot of output
Conclusion: I have understood how to implement polygon clipping algorithms in CG

Sutherland-Hodgman polygon clipping algorithm


Input: Polygon: (100,150), (200,250), (300,200)
Clipping Window: (150,150), (150,200),
(200,200), (200,150)
Output: (150,162), (150,200), (200,200), (200,174)
Expt10
Aim: To implement curve plotting algorithms
Theory:
- What is a Bezeir curve?
- Explain Bezier curve algorithm with an example
- What is B-spline?
- Explain B-spline algorithm with an example
- Pseudocode of B-spline curve plotting algorithm
Output: print code to draw a B-spline, screenshot of output
Conclusion: I have understood how to implement curve
plotting algorithms in CG

Expt11
Aim: To implement fractals
Theory:
- Explain fractal dimensions with an example
- Explain the Koch curve algorithm with an example
- Pseudocode of Koch curve algorithm
Output: print code to draw a Koch curve, screenshot of output
Conclusion: I have understood how to implement fractals in CG

Expt12
Aim: To project a 3D object on a projection plane
Theory:
- Explain parallel 3D projections with an example
- Explain perspective 3D projections with an example
- Pseudocode for perspective projection of 3D object
Output: print code for perspective projection, screenshot of output
Conclusion: I have understood how to implement fractals in CG

Mini Project
Title: <Your Project Title>
Group: <Batch No., Names and roll numbers>
Abstract: <Brief description of what your project is going to deliver. Includes the language used for
coding, algorithms used for GUI design, loops for animations, keyboard/mouse controls and final
output that user can see on the screen>
GUI design: <line drawing of expected output>
Implementation: <code>
Output: <Have at least 2-3 screenshots of output during various stages of execution/animation>

Assignment 1
1. What are the various applications of CG systems? (explain each in brief)
2. Explain the working of CRT monitors with a neat diagram. (both b/w and color)
3. Explain the architecture of raster scan graphics systems with neat diagrams.
4. Compare raster scan display and random scan display.
5. What is aliasing? Explain the techniques used for antialiasing with neat diagrams.
6. Explain scan-line fill algorithm with a suitable example.
7. Explain the 8-connected-pixel flood fill algorithm with an example. Compare it with
boundary fill algorithm
8. Explain the various rules to test if a given point is inside or outside an object. 9.
Explain the three basic 2D transformations.
10. What are the various types of display devices in use? (Explain each in brief)

Assignment 2
1. Prove that two successive rotations are additive.
2. Derive the transformation matrix to magnify a triangle A(0,0), B(1,2), C(3,2) to twice its size
while maintaining (3,2) as a fixed point.
3. Define window, viewport and derive window to viewport transformation 4. Explain
midpoint subdivision line clipping algorithm with an example. 5. What is meant by Bezier
curve? Explain the properties of a Bezier curve 6. Explain the construction of a Koch
curve with suitable examples and neat diagrams 7. Explain back-surface detection method
with an example.
8. Write short notes on:
a. Gourmand and Phong shading technique
b. Sweep representation
c. Illumination models

You might also like