Adobe Scan 10-Oct-2024
Adobe Scan 10-Oct-2024
lomg
-azaheneic
pahh panly inh-ga
82 SJowe jhan BTembons) fastx than D0A
Use of mulipicaho 4) Use only addittan oc
and Dixisidh opraliensSbskadian opraians
is inmduce d
is Iooduced
)the Ca-rdinte locadia 7) qhe CG-ndbct Jacs
is Same a fhat of is Same
Byesenham's
Ql.a) Explain the following terms:
i) Persistence
i) Resolution
iii) Aspect ratio
iv) Pixel
v) Refresh Buffer
Ans:
i. Persistence:
" Resolution indicates the maximum number of points that can be displayed without
overlap on the CRT.
" Itis defined as the number of points per centimetre that can be plotted horizontally and
vertically.
Resolution depends on the type of phosphor, the intensity to be displayed and the
focusing and deflection systems used in the CRT.
iii. Aspect Ratio:
" Itis the ratio of verticalpoints to horizontal points to produce equal length lines in both
directions on the screen.
An aspect ratio of 4/5 means that a vertical line plotted with four points has the same
length as a horizontal line plotted with five points.
iv. Pixel:
" As display buffer is used to store display list and it is used for refreshing.
" The display bufer memory is also called refresh buffer.
Q.1.b) Discuss the significance of OpenGLPipeline and OpenGL Libraries
Ans:
The OpenGL (Open Graphics Library) pipeline and libraries play a crucial role in computer
graphics, providing a standardized interface for rendering 2D and 3D vector graphics.
" Efficiency:
The pipeline is designed to be highly efficient, allowing for real-time rendering, which
is essential in gaming, simulations, and interactive applications.
" Parallelism:
The pipeline supports parallel processing, enabling modern GPUs o handle massive
amounts of data simultancously, enhancing performance.
Customization:
Programmers can use shaders (custom programs) at various stages of the pipeline to
achieve specific effects, giving them fine-grained control over rendering.
Standardization:
OpenGL provides a cross-platform API that ensures consistency across different hardware
and operating systems. This standardization is vital for developers who want to create
applications that run on various devices without modification.
Portability:
By using OpenGL libraries, developers can write code that works across different platforms,
from desktop computers to mobile devices, without worrying about the underlying graphics
hardware.
Extensibility:
OpenGL is extensible, meaning that it can be expanded with additional functionality via
extensions. This allows developers to access the latest graphics features on cutting-edge
hardware while maintaining compatibility with older systems.
Wide Adoption:
OpenGL's widespread adoption across the industry makes it a go-to choice for many
graphics-intensive applications, including video games,CAD software, vitual reality, and
more.
PYQ
Other Subjects: www.pyqspot.com
Ql.c) Derive the expression forDecision Parameter used in Bresenhams line drawing algorithm.
Ans:
As shown in the Figure, the line does not pass through all raster points (pixels). It passes
through raster point (0, 0) and subscquently crosses three pixels. It is seen that the intercept of
line with the line x = lis closer to the liney = 0, ic. pixel (1,0) than to the line y = I i.e. pixcl
(1, 1).
Hence, in this case, the raster point at (1,0) better represents the path of the line than that at
(1, ). The intercept of theline with the linex= 2 is close to the line y = 1, i.e. pixel (2, 1)
than to the line y = 0, i.e. pixel (2, 0). Hence, the raster point at (2, 1) better represents the path
of the line, as shown in the Figure.
DA M.
" Let us define e = D - D . Now if e > 0, then it implies that D > D , ie., the
pixel above the line is closer to the true line. If D, < Da (ie. e < 0) then we can
say that the pixel below the line is closer to the true line. Thus by checking only
the sign of error term it is possible to determine the better pixel to represent the
line path.
" The error term is initially set as
e = 2 Ay - Ax
where Ay = y- y, and Ax = X, - x
Then according to value of e following actions are taken.
while (e 0)
y=y+1
e=e-2* Ax
X =Xt 1
e=e+2*Ay
Q3.c) Explain Weiler Atherton Polygon Clipping Algorithm.
Ans:
The clipping algorithms previously discussed require a convex polygon. In context of many
applications, e.g. hidden surface removal, the ability to clip to concave polygon is required.
" A powerful but somewhat more complex clipping algorithm developed by Weiler and Atherton
meets this requirement. This algorithm defines the polygon to be clipped as a subject polygon
and the clipping region is the clip polygon.
" The algorithm describes both the subject and the clip polygon by a circular list of vertices. The
boundaries of the subject polygon and the clip polygon may or may not intersect. If they
intersect, then the intersections occur in pairs.
" One of the intersections occurs when a subject polygon edge enters the inside of the clip
polygon and one when it leaves. As shown in the Figure, there are four intersectionvertices I1,
12, I3 and 14. In these intersections Il and I3 are entering intersections, and 12 and I3 are leaving
intersections.
" The clip polygon vertices are marked as C1, C2, C3 and C4.
" The algorithm starts at an entering intersection (Il) and follows the subject polygon vertex list
in the downward direction (i.e. II, V3, V4, 12). At the occurrence of leaving intersection the
algorithm follows the clip polygon vertex list from the leaving intersection vertex in the
downward direction (i.e. 12, I1). Atthe occurrence of the entering intersection the algorithm
follows the subject polygon vertex list from the entering intersection vertex.
This process is repeated until we get the starting vertex. This process we have to repeat for all
remainingg entering intersections which are not included in the previous traversing of vertex
list.
In our example, entering vertex 13 was not included in the first traversing of vertex list,
Therefore, we have to go for another vertex traversal from vertex I3.
The above two vertex traversals give two clipped inside polygons.
There are: II, V3, V4, I2, I1 and 13, V6, 14, I3
User Interfaces:
User friendliness is one of the main factors underlying the success and popularity of
any system. It is nowa well-established fact that graphical interfaces provide an attractive and
easy interaction between users and computers. The built-in graphics provided with user
interfaces use visual control items such as buttons, menus, icons, scroll bar etc, which allows
user to interact with computer only by mouse-click. Typing is necessary only to input text to
be stored and manipulated.
PYO
SPOr
Other Subjects: www.pyqspot.com
Cartography:
Computer graphics is also used to represent geographic maps, weather maps,
oceanographic charts, contour maps, population density maps and so on.
While the cost of raster scan is lesser than It is costlier than raster scan because it requires
random scan. more sophisticated hardware to control the
electron beam directly
While in raster scan, any alteration is not so easy. In random scan, any alteration is easy in
comparison of raster scan.
While in raster scan, interlacing is used. In random scan, interlacing is not used.
While in which, for image or picture rendering,|In random scan, mathematical function is used
raster scan uses pixels. It is suitable for creating for image or picture rendering. It is suitable for
realistic scenes. applications requiring polygon drawings.
Electron Beam is directed from top to bottom Electron Beam is directed to only that part of
and one row at a time on screen. It is directed to screen where picture is required to be drawn, one
whole screen. line at a time.
It stores picture definition as a set of intensity It stores picture definition as a set of line
values of the pixels in the frame buffer. commands in the Refresh buffer.
Refresh rate is 60 to 80 frames per second and is Refresh rate depends on the number of lines to
independent of picture complexity. be displayed i.e. 30 to 60 times per secon.
In raster scan, Solid Pattern is easy to fill. In random scan, Solid Pattern is tough to fill.
Example. TV Sets Example. Pen Plotter