Write down Cohen-Sutherland Line clipping algorithm.

Step 1: Scan end points for the line P1(x1, y1) and P2(x2, y2) Step 2: Scan corners for the window as (Wx1, Wy1) and (Wx2, Wy2) Step 3: Assign the region codes for endpoints P1 and P2 by ... if any of the end point of it appear outside the window. Step 8: Draw the remaining line. Step 9: Exit

Explain types of Parallel Projection with example.

Orthographic projection - the projection direction is a normal one to the plane and it is categorized as o Top projection o Front projection o Side projection Oblique projection - the ... gives a better view and it is categorized as o Cavalier projection o Cabinet projection

Explain stroke method and Bitmap method with example.

1)STROKE METHOD Stroke method is based on natural method of text written by human being. In this method graph is drawing in the form of line by line. Line drawing algorithm DDA follows ... resolution devices such as inkjet printer or laser printer may use character arrays that are over 100x100.

Explain differ types of Text clipping in brief.

Many techniques are used to provide text clipping in a computer graphics. It depends on the methods used to generate characters and the requirements of a particular application. There are three methods ... then we discard only that portion of character that is outside of the clipping window.

List out basic transformation techniques. Explain scaling transformation with respect to 2D.

Basic transformations techniques are: Translation Scaling Rotation Scaling Transformation Scaling means to change the size of object. This change can either be positive or negative. To change ... . If we provide values greater than 1, then we can increase the size of the object.

Explain and write steps for DDA line drawing algorithm.

This algorithm generates a line from differential equations of line and hence the name DDA. DDA algorithm is an incremental scan conversion method. A DDA is hardware or software used for linear interpolation of variables over ... : Steps 1: Read the end points of line (x1,y1) and (x2,y2).

Differentiate between Random Scan and Raster Scan.

Random Scan Display Raster Scan Display In vector scan display the beam is moved between the end points of the graphics primitives. In raster scan display the beam is moved all over the screen ... e.g. monitors, TV It uses beam-penetration method. It uses shadow-mask method

Give matrix representation for 2D scaling

Let us assume that the original co-ordinates are (X, Y), the scaling factors are (SX, SY), and the produced co-ordinates are (X', Y'). This can be mathematically represented as shown below: ... X and Y direction respectively. The above equations can also be represented in matrix form as below:

List various polygon filling algorithms

Various polygon filling algorithms are: Flood Fill Algorithm Boundary Fill Algorithm Scan Line Algorithm

List types of Polygon

Polygon can be of two types:- Convex polygon Concave polygon

Explain Raster Scan

In Raster scan, the electron beam from electron gun is swept horizontally across the phosphor one row at time from top to bottom. The electron beam sweeps back and forth from left to right across ... by repeating scanning of the same image. This process is known as refreshing of screen.

Give the characteristics of display adaptor.

The characteristics of common display adapters are given in Table. The present-day display adapter supports all the modes of the preceding display adapters

Define: (i)Pixel (ii)Frame Buffer

Pixel Pixel or Pel is defined as "the smallest addressable screen element". OR A pixel may be defined as the smallest size object or color spot that can be displayed and addressed on a ... buffer, or sometimes framestore) is a portion of RAM containing a bitmap that drives a video display.

Write a Program in ‘C’ for DDA Circle drawing algorithm

#include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> void main() { int gdriver=DETECT,gmode,errorcode,tmp,i=1,rds; float st_x,st_y,x1,x2,y1,y2,ep; initgraph(& ... =y2; }while((y1-st_y)<ep || (st_x-x1)>ep); getch(); }

Write a program in ‘C’ to generate Hilbert’s curve.

#include #include #include #include void move(int j,int h,int &x,int &y) { if(j==1) y-=h; else if(j==2) x+=h; else if(j==3) y+=h; else if(j==4) x-=h; lineto(x,y); } ... initgraph(&gd,&gm,NULL); moveto(x,y); hilbert(r,d,l,u,n,h,x,y); delay(10000); closegraph(); return 0; }

What is interpolation? Describe the Lagrangian Interpolation method.

Specify a spline curve by giving a set of coordinate positions, called control points, which indicates the general shape of the curve These, control points are then fitted with piecewise continuous parametric ... -point positions above the surface Lagrangian Interpolation Method :

Consider the line from (0,0) to (4,6). Use the simple DDA algorithm to rasterize this line.

Describe the vector scan display techniques with neat diagram.

A pen plotter operates in a similar way and is an example of a randomscan, hard-copy device. When operated as a random-scan display unit, a CRT has the electron beam directed only to the parts ... drawn one line at a time by positioning the beam to fill in the line between specified end points.

Describe Sutherland-Hodgeman algorithm for polygon clipping.

In Sutherland-Hodgeman, a polygon is clipped by processing the polygon boundary as a whole against each window edge. Clipping window must be convex. This could be accomplished by processing all polygon ... is successively passed to process next edge of clipping window. Step 7: Stop.

Obtain a transformation matrix for rotating an object about a specified pivot point.

To do rotation of an object about any selected arbitrary point P1(x1 ,y1), following sequence of operations shall be performed. 1. Translate: Translate an object so that arbitrary point P1 is moved to ... to P1and hence it is translation factor. It is demonstrated in following figure:

State the different character generation methods. Describe any one with diagram.

Character Generator Methods: 1) Stroke Method 2) Bitmap Method 3) Starburst Method 1) STROKE METHOD Stroke method is based on natural method of text written by human being. In this method ... Character A : 0011 0000 0011 1100 1110 0001 Character M:0000 0011 0000 1100 1111 0011

Write the midpoint subdivision algorithm for line clipping.

Step 1: Scan two end points for the line P1(x1, y1) and P2(x2, y2). Step 2: Scan corners for the window as (x1, y1) and (x2, y2). Step 3:Assign the region codes for ... 5 for both subdivided line segments until you get completely visible and completely invisible line segments. Step 6: Exit.

Translate the polygon with co-ordinates A (3, 6), B (8, 11), & C (11, 3) by 2 units in X direction and 3 units in Y direction.

X’=x+tx Y’=y+ty tx=2 ty=3 for point A(3,6) x’=3+2=5 y’=6+3=9 for point B(8,11) x’=8+2=10 y’=11+3=14 for point C(11,3) x’=11+2=13 y’=3+3=6 A’=(x’,y’)=(5,9) B’=(x’,y’)=(10,14) C’=(x’,y’)=(13,6)

Rephrase the Bresenham’s algorithm to plot 1/8th of the circle and write the algorithm required to plot the same.

The key feature of circle that it is highly symmetric. So, for whole 360 degree of circle we will divide it in 8-parts each octant of 45 degree. In order to that we will use Bresenham's Circle Algorithm for calculation of the ... Call Putpixel (Y + h, -X - k). Call Putpixel (-Y + h,-X + k).

Compare vector scan display and raster scan display

Compare vector scan display and raster scan display

Write the transformation matrix for y-shear.

The Y-Shear can be represented in matrix from as:

What is homogeneous co-ordinate? Why is it required?

Homogeneous coordinates are another way to represent points to simplify the way in which we express affine transformations. Normally, book-keeping would become tedious when affine transformations of ... 3D graphics hardware can be specialized to perform matrix multiplications on 4x4 matrices.

Define convex and concave polygons.

Convex Polygon: It is a polygon in which if you take any two positions of polygon then all the points on the line segment joining these two points fall within the polygon itself. Concave ... points on the line segment joining these two points does not fall entirely within the polygon.

List any two line drawing algorithms. Also, list two merits of any line drawing algorithm.

Line drawing algorithms: Digital Differential Analyzer (DDA) algorithm Bresenham's algorithm Merits of DDA algorithms: It is the simplest algorithm and it does not require special skills ... , and multiplication by 2, which can be accomplished by a simple arithmetic shift operation.

Define virtual reality. List any two advantages of virtual reality.

Virtual reality (VR) means experiencing things through our computers that don't really exist. OR Virtual Reality (VR) is the use of computer technology to create a simulated environment. ... in video games, engineering, entertainment, education, design, films, media, medicine and many more.

List any four applications of computer graphics.

DTP (Desktop Publishing) Graphical User Interface (GUI) Computer-Aided Design Computer-Aided Learning (Cal) Animations Computer Art Entertainment ... Image processing Medical Applications Presentation and Business Graphics Simulation and Virtual Reality

Define aspect ratio. Give one example of an aspect ratio

Aspect ratio: It is the ratio of the number of vertical points to the number of horizontal points necessary to produce equal length lines in both directions on the screen. or In computer ... Resolution 1280x1024 has an aspect ratio 5:4 Resolution 2160x1440, 2560x1700 has an aspect ratio 3:2

Explain Cyrusblek line clipping algorithm.

Cyrus Beck Line Clipping algorithm: Cyrus Beck Line Clipping algorithm is used to clip 2D/3D lines against convex polygon/polyhedron. Cyrus Beck Line clipping algorithm is actually, a parametric line-clipping algorithm. ... Step 12 : Draw line segment P(tL) to P(tU). Step 13 : Stop.

Explain character generation methods: i. Stroke ii. Starburst iii. Bitmap

1) STROKE METHOD Stroke method is based on natural method of text written by human being. In this method graph is drawing in the form of line by line. Line drawing algorithm DDA follows this ... Character A : 0011 0000 0011 1100 11100001 Character M:0000 0011 0000 1100 11110011

Write C program for Hilbert’s Curve.

#include <stdio.h> #define N 32 #define K 3 #define MAX N * K typedefstruct{int x; int y; } point; void rot(int n, point *p, int rx, int ry){ int t; if(!ry){ if(rx == 1){ ... y < MAX; ++y)printf("%c", pts[y][x]); printf("\n"); } return0; }

Write DDA Arc generation algorithm.

1. Read the centre of curvature, say(x0,y0) 2. Read the arc angle, say Ɵ 3. Read the starting point of the arc, say(x,y) 4. Calculate dƟ dƟ=min(0.01,1/3.2*(|x-x0|+|y-y0|))) 5. Initialize angle = 0 6. ... Plot(x,y) x=x-(y-y0) *dƟ y=y-(x-x0) *dƟ Angle =Angle + dƟ } 7. stop

Explain composite transformation over arbitrary point.

To do rotation of an object about any selected arbitrary point P1(x1 ,y1), following sequence of operations shall be performed. 1. Translate: Translate an object so that arbitrary point P1 is moved ... to P1and hence it is translation factor. It is demonstrated in following figure:

Explain inside and outside test for polygon.

This method is also known as counting number method. While filling an object, we often need to identify whether particular point is inside the object or outside it. There are two methods by which we can identify ... + 1 = 1; which is non-zero. So the point is said to be an interior point.

Explain Text Clipping.

Many techniques are used to provide text clipping in a computer graphics. It depends on the methods used to generate characters and the requirements of a particular application. There are three methods ... then we discard only that portion of character that is outside of the clipping window.

Explain Koch curve with diagram.

Koch Curve: - In Koch curve, begin at a line segment. Divide it into third and replace the center by the two adjacent sides of an equilateral triangle as shown below. This will give the curve which starts and ... 4/3, the length of the curve will be infinite but it is folded in lots of tiny

Explain 2D transformations with its types.

A transformation is a function that maps every position (x, y) into a new position (x', y'). Instead of applying the transformation function to every point in every line that makes up the object, we ... the object. If we provide values greater than 1, then we can increase the size of the object.

Write procedure to fill polygon with flood fill.

flood_fill(x,y,old_color,new_color) { if(getpixel(x,y) = old_color) { putpixel(x,y,new_color); flood_fill(x+1,y,old_color, new_color); flood_fill(x-1,y,old_color, new_color); flood_fill(x,y+1, ... flood_fill(x+1,y-1,old_color, new_color); flood_fill(x-1,y+1,old_color, new_color); } }

Explain with diagram the techniques of Raster Scan Display.

The most common type of graphics monitor employing a CRT is the Raster-scan displays, based on television technology JPG images are raster based. Light occurs when an electron beam stimulates a phosphor. ... on the screen. If the intensity is zero (0) then no dot is displayed. monitor.

Explain interpolation techniques in curve generation.

Specify a spline curve by giving a set of coordinate positions, called control points, which indicates the general shape of the curve These, control points are then fitted with piecewise continuous ... a design application. Straight lines connect the control -point positions above the surface.

Explain midpoint subdivision line clipping algorithm.

Step 1: Scan two end points for the line P1(x1, y1) and P2(x2, y2). Step 2: Scan corners for the window as (Wx1, Wy1) and (Wx2, Wy2). Step 3: Assign the region ... through 5 for both subdivided line segments until you get completely visible and completely invisible line segments. Step 6: Exit.

Write 2D and 3D scaling matrix.

2D Scaling Scaling means to change the size of object. This change can either be positive or negative. To change the size of an object, scaling transformation is used. In the scaling process, you ... . Therefore, point after scaling with respect to origin can be calculated as, P=P . S

Explain scan line algorithm of polygon clipping.

For each scan line crossing a polygon, the area-fill algorithm locates the intersection points of the scan line with the polygon edges. These intersection points are then sorted from left to right ... 4 : Fill all those pair of coordinates that are inside polygons and ignore the alternate pairs.

Write short note on Augmented Reality.

Augmented reality (AR) is made up of the word augment which means to make something great by adding something to it. Augmented Reality is a type of virtual reality that ... Reality is used in entertainment, military training, engineering design, robotics, manufacturing and other industries.

List various character generation methods.

Stroke Method Bitmap Method Starburst Method

Define Bitmap Graphics.

A bitmap is an image or shape of any kind-a picture, a text character, a photo-that's composed of a collection of tiny individual dots. A wild landscape on your screen is a bitmapped graphic, or simply a bitmap. It is a pixel based image, not scalable and size of image is high.