Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

English 1st Sem

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

OCTOBER 2019 Third Semester - COMPUTER GRAPHICS

Part A
1. What do you mean by retracing? Define horizontal as well as vertical retracing.

Retracing: At the end of each scan line, the electron beam returns to the left side
of the screen to begin displaying the next scan line. Horizontal retrace The return
to the left of the screen, after refreshing each scan line. Vertical retrace
2. What are electroluminescent diplays?

The electroluminescent display or EL display is the most widely used flat type
display technology. Most popular display technologies like laser phosphor &
LED works on the principle of electroluminescence. When the display is supplied
with electrical energy, then semiconductor generates quantum of energy as well
as photons.
3. Write a brief notes on Light Pen

The light pen works by detecting the change in brightness of nearby pixels,
which indicates that the CRT's electron beam is scanning in that area; it then
sends the timing of this event to the computer, which then compares this
information to the timestamp of the last scan by the electron beam, allowing the
computer to infer the precise location of the pen.
4. What are the conditions for checking the sign of circle function in Midpoint circle Algorithm?

Boundary Condition : Whether the mid-point lies inside or outside the circle
can be decided by using the formula:- Given a circle centered at (0,0) and radius
r and a point p (x,y) F (p) = x2 + y2 – r2 if F (p)<0, the point is inside the circle F
(p)=0, the point is on the perimeter F (p)>0, the point is outside the circle
5. Where is Bitmap fonts stored?

Bitmapped Font, Bitmap Font: A character FONT in which each individual letter
form is stored as a table of PIXELS (a picture), in contrast to an OUTLINE FONT
where each character is stored as a set of lines or strokes (a description of how
to draw the character).
6. Illustrate the need of homogeneous coordinates?

What is the need of homogeneous coordinates? To perform more than one


transformation at a time, use homogeneous coordinates or matrixes. They
reduce unwanted calculations intermediate steps saves time and memory and
produce a sequence of transformations.
7. Define viewing transformation.
Viewing Transformation is the mapping of coordinates of points and lines that
form the picture into appropriate coordinates on the display device. A 3D scene
can be viewed from any posistion in 3D space.
8. Explain point clipping

“Point clipping is a process which is used to define the point position.” The
point is either inside the view pane (window) or outside the view pane.

9. What is Sweep Representation?

Sweep Representations:- Sweep representations are used to construct three


dimensional objects from two dimensional shape.There are two ways to
achieve sweep: Translational sweep and Rotational sweep. In translational
sweeps, the 2D shape is swept along a linear path normal to the plane of the
area to construct three dimensional object.

10. Define voxels of octrees.

A voxel is a unit of graphic information that defines a point in three-


dimensional space. Since a pixel (picture element) defines a point in two
dimensional space with its X and Y coordinates, a third z coordinate is needed. In
3-D space, each of the coordinates is defined in terms of its position, color, and
density.
11. Write notes on Key frame systems.
Key frame. In media production, a key frame or keyframe is a location on a timeline which marks the
beginning or end of a transition. It holds special information that defines where a transition should start or

12. Write notes on Direct Motion Specification.


Direct motion specification : -
The most straightforward method for defining a motion sequence is direct specification of
the motion paremeters. Here, We explicitly give the rotation angles and translation vectors.
Then the geometric transformation matrices are applied to transform co-ordinate positions.
Alternatively, We could use an approximating equation to specify certain kinds of motions.
These methods can be used for simple user programmed animation sequencs.
Part B
13. Briefly discuss about Presentation Graphics.

Pre-requisites: Graphics are defined as any sketch or a drawing or a special network that
pictorially represents some meaningful information. Computer Graphics is used where a set of
images needs to be manipulated or the creation of the image in the form of pixels and is drawn
on the computer. Computer Graphics can be used in digital photography, film, entertainment,
electronic gadgets, and all other core technologies which are required. It is a vast subject and
area in the field of computer science. Computer Graphics can be used in UI design, rendering,
geometric objects, animation, and many more.
Presentation graphics provides predefined backgrounds and simple page layouts to help in the
creation of slides. These slides can be moved automatically within seconds.

Slides:
Slides mean we have text, graphics, audio clips, video clips, animations, and other effects
Presentation graphics is also known as Presentation Software. The best example of
presentation graphics is Microsoft PowerPoint.
In recent days we have a new presentation tool that is: our Web browser and that is for
creating Web pages, like Microsoft’s FrontPage and Adobe’s PageMill.

Rules to Design Presentation:


 Keep it simple: Make it simple to understand. It only contains information regarding
your topic.
 Correct Spelling: We have to be careful with the spelling that we have written.
 Consistency: There is need to be continuous flow from one slide to another.
 Don’t put too much on a Slide: Don’t write too much. just give a brief description and
important points.
 Use Fonts Properly: Only you can use two font styles in the presentation.
 Find Your Equipment: First, you have to be confident with your topic and details about
it.

Uses:
Presentation graphics programs are mainly concerned with the display of graphs and charts but
now allow users to attach anything from text to animations. When Compared to other
programs like Excel, PowerPoint follows a slideshow format.

Applications:
In the following areas we can use presentation software:
 Google Slides
 Microsoft Office
 WPS Office
 Photo Slideshow with Music

Advantages:
 Less Cost: The cost is low to use presentation software
 Logical Ideas: Tables and graphs are used to represent information then a logical order is
created to give a clear idea for viewers.
 Acceptability: By using this busy person can easily get an idea about the topic.

Disadvantages:
 Time-taking process. It needs more time to prepare.
 Data can sometimes be lost.
 Errors and Mistakes can occur during design.
14. Illustrate Digital Differential Analyzer Algorithm by generating a line
Digital Differential Analyzer Line Drawing Algorithm
 1. Digital Differential Analyzer Line Drawing Algorithm Kasun Ranga Wijeweera 2. A
Straight Line Segment • A straight line segment in a scene is defined by the coordinate
positions for the end points of the segment. • The graphics system must first project the
end points to integer screen coordinates and determine the nearest pixel positions along
the line path between the two end points. • A computed line position of (11.48, 21.51), for
example, is converted to pixel position (11, 22). • This rounding of coordinate values to
integers causes all but horizontal and vertical lines to be displayed with a stair-step
appearance.
 3. Line Equations • The Cartesian slope-intercept equation for a straight line is • m is the
slope of the line and b is the y intercept. • Given that the two end points of a line segment
are specified at positions (x0, y0) and (xend, yend), the values for the m and b can be
determined with the following calculations.
 4. Line Equations… • For any given x interval δx along a line, corresponding y interval δy
can be computed as follows. • Similarly, the x interval δx corresponding to a specified δy
can be obtained as • Lines are plotted with pixels, and step size in the horizontal and
vertical directions are constrained by pixel separations. • Depending on the value of |m|,
axis of sampling should be selected. • |m| < 1, along the x-axis • |m| > 1, along the y-axis
 5. DDAAlgorithm • The digital differential analyzer (DDA) is line drawing algorithm based
on calculating either δy or δx. • A line is sampled at unit intervals in one coordinate and
the corresponding integer values nearest the line path are determined for the other
coordinate.
 6. DDAAlgorithm…
 7. DDAAlgorithm… • The DDA algorithm is a faster method for calculating pixel positions
than one directly implements y = m * x + c. • The accumulation of round-off error in
successive additions of the floating-point increment, however, can cause the calculated
pixel positions to drift away from the true path for long line segments. • The rounding
operations and floating-point arithmetic in this procedure are still time consuming.

15. Illustrate Bresenham's Line Drawing Algorithm by generating a line

Bresenham's Line Algorithm


This algorithm is used for scan converting a line. It was developed by Bresenham. It is an efficient
method because it involves only integer addition, subtractions, and multiplication operations. These
operations can be performed very rapidly so lines can be generated quickly.
In this method, next pixel selected is that one who has the least distance from true line.
The method works as follows:
Assume a pixel P1'(x1',y1'),then select subsequent pixels as we work our may to the night, one pixel
position at a time in the horizontal direction toward P2'(x2',y2').
Once a pixel in choose at any step
The next pixel is

1. Either the one to its right (lower-bound for the line)


2. One top its right and up (upper-bound for the line)
The line is best approximated by those pixels that fall the least distance from the path between
P1',P2'.

To chooses the next one between the bottom pixel S and top pixel T.
If S is chosen
We have xi+1=xi+1 and yi+1=yi
If T is chosen

We have xi+1=xi+1 and yi+1=yi+1


The actual y coordinates of the line at x = xi+1is
y=mxi+1+b
The distance from S to the actual line in y direction
s = y-yi
The distance from T to the actual line in y direction
t = (yi+1)-y
Now consider the difference between these 2 distance values
s-t
When (s-t) <0 ⟹ s < t
The closest pixel is S
When (s-t) ≥0 ⟹ s < t
The closest pixel is T
This difference is
s-t = (y-yi)-[(yi+1)-y]
= 2y - 2yi -1

Substituting m by and introducing decision variable


d i=△x (s-t)

d i=△x (2 (xi+1)+2b-2yi-1)
=2 △xy i-2△y-1△x.2b-2yi△x-△x
di=2△y.xi-2△x.yi+c
Where c= 2△y+△x (2b-1)
We can write the decision variable d i+1 for the next slip on
d i+1=2△y.xi+1-2△x.yi+1+c
di+1-di=2△y.(xi+1-xi)- 2△x(yi+1-yi)
Since x_(i+1)=xi+1,we have
d i+1+di=2△y.(xi+1-xi)- 2△x(yi+1-yi)

Special Cases
If chosen pixel is at the top pixel T (i.e., d i≥0)⟹ yi+1=yi+1
di+1=di+2△y-2△x
If chosen pixel is at the bottom pixel T (i.e., d i<0)⟹ yi+1=yi
di+1=di+2△y

Finally, we calculate d1
d1 =△x[2m(x1+1)+2b-2y1-1]

d1=△x[2(mx1+b-y1)+2m-1]

Since mx1+b-yi=0 and m = , we have


d1=2△y-△x
Advantage:
1. It involves only integer arithmetic, so it is simple.
2. It avoids the generation of duplicate points.
3. It can be implemented using hardware because it does not use multiplication and division.
4. It is faster as compared to DDA (Digital Differential Analyzer) because it does not involve floating
point calculations like DDA Algorithm.
Disadvantage:
1. This algorithm is meant for basic line drawing only Initializing is not a part of Bresenham's line
algorithm. So to draw smooth lines, you should want to look into a different algorithm.
16. What do you know about rotation ? Derive the matrix equation for 2D rotation

Rotation Definition
Rotation means the circular movement of an object around a centre. It is possible to rotate different
shapes by an angle around the centre point. Mathematically, a rotation means a map. All the rotations
around a fixed point that make a group under a structure are called the rotation group of a unique space.
When coming to the three-dimensional shapes, we can turn or rotate the objects about an infinite
number of imaginary lines known as rotational axes. Now one might have the question of what the
rotation of axes is? Here is the answer. The rotations around X, Y and Z axes are known as the principal
rotations. The rotations around any axis can be performed by taking the rotation around the X-axis,
followed by the Y-axis and then finally the z-axis.

Rotation Matrix in 2D Derivation


Let G be a vector in the x-y plane with a length r and it traces out an angle v with respect to the x-
axis. We now rotate G in the counter-clockwise direction by an angle θ. If (x, y) were the original
coordinates of the tip of the vector G, then (x', y') will be the new coordinates after rotation.

Expressing (x, y) in the polar form we have;


x = r cos v -- (1)

y = r sin v -- (2)

Similarly, expressing (x', y') in polar form

x' = r cos (v + θ)

y' = r sin (v + θ)

Expanding the brackets using trigonometric identities we get,

x' = r (cos v.cos θ - sin v.sin θ)

= r cos v.cos θ - r sin v.sin θ

From (1) and (2) we have,

x' = x cos θ - y sin θ -- (3)

y' = r (sin v.cos θ + cos v.sin θ)

= r sin v.cos θ + r cos v.sin θ

y' = y cos θ + x sin θ -- (4)

If we take the help of a 2 x 2 rotation matrix to denote (3) and (4) we get,

cosθ −sinθ
Thus,⎣

Sinθ cosθ] will be the rotation matrix.


17. Describe any two interactive picture construction techniques
Interactive picture construction techniques :
“An interaction technique is the fusion of input and output, consisting of all
software and hardware elements, that provides a way for the user to
accomplish a task “.
Various interactive techniques:-
(1) Basic Positioning Techniques :- It very basic technique of graphical input. It is also known as
locating. With the help of input device, user indicates position on the screen. The process of
positioning involves two steps, in first step user have to move cursor to desired spot on screen and in
second step user inform computer by pressing key or button.
(2) Constraints :-A constraint is a rule for altering input coordinates values to produce a specified
orientation or alignment of the displayed coordinates. The most common constraint is a horizontal or
vertical alignment of straight lines.
(3) Grids: - Another kind of constraint is a grid of rectangular lines displayed in some part of the
screen area. When a grid is used, any input coordinate position is rounded to the nearest intersection
of two grid lines.
18. Explain in detail the difference between Parallel Projection and Perspective projection.

Difference Between Parallel Projection And Perspective Projection :

SR.NO Parallel Projection Perspective Projection

1 Parallel projection represents the Perspective projection represents


object in a different way like the object in three dimensional
telescope. way.

2 In parallel projection, these effects In perspective projection, objects


are not created. that are far away appear smaller,
and objects that are near appear
bigger.

3 The distance of the object from the The distance of the object from
center of projection is infinite. the center of projection is finite.

4 Parallel projection can give the Perspective projection cannot give


accurate view of object. the accurate view of object.

5 The lines of parallel projection are The lines of perspective projection


parallel. are not parallel.

6 Projector in parallel projection is Projector in perspective projection


parallel. is not parallel.

7 Two types of parallel projection : Three types of perspective


1.Orthographic, projection:
2.Oblique 1.one point perspective,
2.Two point perspective,
3. Three point perspective,

8 It does not form realistic view of It forms a realistic view of object.


object.
19. Discuss about Boundary Representations and Space-Partitioning Representation.

B-rep or boundary representation is a rendering technique for solid modeling.


It is a popular approach to create a solid model of a physical object. Brep is that a
three-dimensional object model is enclosed by surfaces or faces and has its own
interior and exterior.

Space partitioning : In geometry, space partitioning is the process of dividing a space


(usually a Euclidean space) into two or more disjoint subsets (see also partition of a
set). In other words, space partitioning divides a space into non-overlapping regions.
Any point in the space can then be identified to lie in exactly one of the regions.
Space-partitioning systems are often hierarchical, meaning that a space (or a region
of space) is divided into several regions, and then the same space-partitioning system
is recursively applied to each of the regions thus created. The regions can be
organized into a tree, called a space-partitioning tree.
Most space-partitioning systems use planes (or, in higher dimensions, hyperplanes)
to divide space: points on one side of the plane form one region, and points on the
other side form another. Points exactly on the plane are usually arbitrarily assigned
to one or the other side. Recursively partitioning space using planes in this way
produces a BSP tree, one of the most common forms of space partitioning.
20. Discuss about raster animation?
Raster Animations
On raster systems, real - time animation in limited applications can be generated using
raster operations.
Sequence of raster operations can be executed to produce real time animation of either 2D
or 3D objects.
We can animate objects along 2D motion paths using the color – table transformations.
-Predefine the object as successive positions along the motion path, set the successive
blocks of pixel values to color table entries.
- Set the pixels at the first position of the object to „on‟ values, and set the pixels at the
other object positions to the background color.
- The animation is accomplished by changing the color table values so that the object is
„on‟ at successive positions along the animation path as the preceding position is set to the
background intensity.
Computer Animation Languages
Animation functions include a graphics editor, a key frame generator and standard graphics
routines.
The graphics editor allows designing and modifying object shapes , using spline surfaces,
constructive solid geometry methods or other representation schemes.
Scene description includes the positioning of objects and light sources defining the
photometric parameters and setting the camera parameters.
Action specification involves the layout of motion paths for the objects and camera.
Keyframe systems are specialized animation languages designed dimply to generate the in
- betweens from the user specified keyframes. Parameterized systems allow object motion
characteristics to be specified as part of the object definitions. The adjustable parameters
control such object characteristics as degrees of freedom
motion limitations and allowable shape changes. Scripting systems allow object
specifications and animation sequences to be defined with a user input script. From the
script, a library of various objects and motions can be constructed.
Keyframe Systems
Each set of in - betweens are generated from the specification of two keyframes.
For complex scenes, we can separate the frames into individual components or objects
called cells, an acronym from cartoon animation.
Morphing
Transformation of object shapes from one form to another is called Morphing.
21. Diffrentiate keyframe Systems from paramererized systems?
A keyframe, also written as “key frame,” is something that defines the starting and/or
ending point of any smooth transition. That something can be a drawing in animation or a
particular frame of a shot when dealing with film or video. Any shot, animated or live-
action, is broken down into individual frames. You can think of keyframes as the most
important frames of a shot that set the parameters for the other frames and indicate the
changes that will occur throughout as transitions. For more information, refer to our
filmmaker’s guide to frame rates.
Keyframe Characteristics:
 Important individual frames from within a shot
 Keyframes exist in animation and live-action
 Sets a start/stop point for a transition
Parametric keyframe interpolation incorporating kinetic adjustment and phrasing control
Parametric keyframing is a popular animation technique where values for parameters which control the
position, orientation, size, and shape of modeled objects are determined at key times, then interpolated
for smooth animation. Typically the parameter values defined by the keyframes are interpolated by
spline techniques with the result that the parameter change kinetics are implicitly defined by the given
keyframe times and data points. Existing interpolation systems for animation are examined and found to
lack certain desirable features such as continuity of acceleration or convenient kinetic control. The
requirements of interpolation for animation are analyzed in order to determine the characteristics of a
satisfactory system. A new interpolation system is developed and implemented which incorporates
second-derivative continuity (continuity of acceleration), local control, convenient kinetic control, and
joining and phrasing of successive motions. Phrasing control includes the ability to parametrically
control the degree and extent of smooth motion flow between separately defined motions.

Part C
22. Explain the working of Cathode Ray Tube with suitable diagram.

The diagram given below shows the internal structure of the CRT

Cathode Ray Tube (C R T)

Definition: Cathode ray tube, CRT is the heart of CRO which produces
images when electron beam from the back of the tube strikes the fluorescent
screen with sufficient energy. CRT technique is used in traditional televisions
and computer monitors.
Constructional details of Cathode Ray Tube
CRT consist of the following parts:
3. Electron gun
4. Deflection plate assembly
5. Glass envelope
6. Fluorescent screen
7. Base, for connections
A sharply focused beam is produced by the electron gun assembly. This high-
velocity beam strikes fluorescent screen thus causing a luminous spot on the
screen.
The two electrostatic deflection plates deflect the accelerated beam by the
application of voltage. This applied voltage moves the beam vertically up and
down and horizontally from one side to other.
These two movements are independent of each other which causes the beam to
be positioned anywhere on the screen.
Working of Cathode Ray Tube :
The main parts of CRT are responsible for the working of it that is explained
below-
Electron gun
The electron gun is the main source of focused accelerated electron beam.
It consists of a heater, a cathode, pre-accelerating anode, accelerating anode
which emits electrons and forms them into a beam.
The cathode is heated indirectly from which electrons are emitted. To obtain
high emission of electrons at a moderate temperature a layer of barium and
strontium oxide is deposited at the end of the cathode.
An indirectly heated cathode requires current and voltage value 600 mA at 6.3
V. In case of a highly efficient system the value is 300 mA at 6.3 V.
The emitted electrons further pass through a small hole present in the control
grid. The control grid is basically a nickel cylinder of aperture 0.5. It is a low
permeability steel material. The intensity by which beam of electron moves
depends entirely on the electron emitted from the cathode. The number of
electrons emitted from the cathode is controlled by the grid.
A positive high potential is applied at the pre-accelerating anode by which
the beam gets accelerated. This high positive potential is about 1500 V.
Focusing anode helps in focusing the electron beam and is connected with a
lower adjustable voltage of about 500 V.
The highly focused beam moves towards vertical and horizontal deflection
plates after which it reaches to fluorescent screen.
Focusing of an electron beam is accomplished by two methods- Electrostatic
focusing and Electromagnetic focusing.
Let us now discuss electrostatic focusing in detail
Electrostatic Deflection
The figure shown below describes the general arrangement for electrostatic
deflection.

A potential is applied between two parallel plates. A uniform electrostatic field is


produced by these plates in the Y direction. Thus the entering electron will
experience a force in the y-direction and will be accelerated in that particular
direction. There is no force in X and Z directions resulting in no acceleration in
these two directions.
After leaving the deflection plates, electrons travel in a straight line and a highly
accelerated beam is sometimes difficult to deflect and called “hard beam”.
Post deflection acceleration
After passing beyond the deflection plates, the electron may and may not
experience additional acceleration. But this primarily depends on maximum
frequency applied to CRT.
In electrostatic deflection system, a low value of accelerating voltage must be
used and this voltage usually kept below 4 KV. This low value gives better
sensitivity but leads to the reduction in brightness. If maximum frequency to
be displayed is below 10 MHz generally monoaccelerator tubes may be used. If
a signal of frequency more than 10 MHz is to be displayed, post-deflection
acceleration is necessary so as to increase the brightness of the traces.
Deflection Plates
When electron beam leaves the electron gun, it passes through 2 pairs of
deflection plates.
One pair of plates is mounted in the horizontal direction and produces an
electric field in the vertical plane. Thus produces vertical deflection and is called
vertical deflection plates or Y plates.
The other pair is mounted in the vertical direction and produces an electric field
in the horizontal plane. Thus producing horizontal deflection and is called
horizontal deflection plates or X plates.
The plates are flared so that the beam can pass through it without striking.
Screen for CRT
The front portion of the CRT is called the faceplate. It is flat for small screen
sizes to about 100mm Χ 100mm and is slightly curved in case of larger
displays.
The inner surface of the faceplate is coated with a phosphor; this phosphor
converts electrical energy into light energy. When an electron beam strikes the
phosphor crystal, it raises their energy level.
This is known as cathodoluminescence. During phosphor excitation, light is
excited and this is called fluorescence.
To have a flicker-free display, a phosphor must be refreshed by electron before
the end of its decay time. Short persistence phosphor requires more frequent
refreshes. In case of use in radars, long persistence is needed. It is even
needed in storage types oscilloscopes. Electron beam on striking phosphor gives
off light and heat.
The luminance of phosphor is a measure of its brightness. It is determined by
luminance efficiency of phosphor and by the beam energy.
23. Discuss about Sutherland-Hodgeman polygon clipping in detail with example

Sutherland-Hodgeman Polygon Clipping Algorithm:-

A polygon can be clipped by processing its boundary as a whole against each window edge. This
is achieved by processing all polygon vertices against each clip rectangle boundary in turn.
beginning with the original set of polygon vertices, we could first clip the polygon against the left
rectangle boundary to produce a new sequence of vertices. The new set of vertices could then be
successively passed to a right boundary clipper, a top boundary clipper and a bottom boundary
clipper, as shown in figure (l). At each step a new set of polygon vertices is generated and passed
to the next window boundary clipper. This is the fundamental idea used in the Sutherland -
Hodgeman algorithm.

The output of the algorithm is a list of polygon vertices all of which are on the visible side of a
clipping plane. Such each edge of the polygon is individually compared with the clipping plane.
This is achieved by processing two vertices of each edge of the polygon around the clipping
boundary or plane. This results in four possible relationships between the edge and the clipping
boundary or Plane. (See Fig. m).

1. If the first vertex of the edge is outside the window boundary and the second vertex of the
edge is inside then the intersection point of the polygon edge with the window boundary
and the second vertex are added to the output vertex list (See Fig. m (a)).
2. If both vertices of the edge are inside the window boundary, only the second vertex is
added to the output vertex list. (See Fig. m (b)).
3. If the first vertex of the edge is inside the window boundary and the second vertex of the
edge is outside, only the edge intersection with the window boundary is added to the
output vertex list. (See Fig. m (c)).
4. If both vertices of the edge are outside the window boundary, nothing is added to the
output list. (See Fig. m (d)).

Once all vertices are processed for one clip window boundary, the output list of vertices is clipped
against the next window boundary. Going through above four cases we can realize that there are
two key processes in this algorithm.

1. Determining the visibility of a point or vertex (lnside - Outside test) and


2. Determining the intersection of the polygon edge and the clipping plane.

One way of determining the visibility of a point or vertex is described here. Consider that two
points A and B define the window boundary and point under consideration is V, then these three
points define a plane. Two vectors which lie in that plane are AB and AV. If this plane is considered
in the xy plane, then the vector cross product AV x AB has only a component given by

The sign of the z component decides the position of Point V with respect to window boundary.

If z is:

Positive - Point is on the right side of the window boundary.

Zero - Point is on the window boundary.

Negative - Point is on the left side of the window boundary.

Sutherland-Hodgeman Polygon Clipping Algorithm:-

8. Read coordinates of all vertices of the Polygon.


9. Read coordinates of the dipping window
10. Consider the left edge of the window
11. Compare the vertices of each edge of the polygon, individually with the clipping plane.
12. Save the resulting intersections and vertices in the new list of vertices according to four
possible relationships between the edge and the clipping boundary.
13. Repeat the steps 4 and 5 for remaining edges or the clipping window. Each time the
resultant list of vertices is successively passed to process the next edge of the clipping
window.
14. Stop.

Example :- For a polygon and clipping window shown in figure below give the list of vertices after
each boundary clipping.

Solution:- Original polygon vertices are V1, V2, V3, V4, and V5. After clipping each boundary the
new vertices are as shown in figure above.

24. Describe Constructive Solid Geometry Methods and Sweep Representation in detail.

Constructive Solid-Geometry Methods


Constructive models represent a solid as a combination of primitive solids. (CSG)
Sweep Representation
Specifying a 2D shape and a sweep that moves the shape through a region of space.
We perform a sweep by moving the shape along a path. At intervals along this path,
we replicate the shape and draw a set of connectiong line in the direction of the sweep
to obtain the wireframe reprensentation.

Example of torus designed using a rotational sweep. The periodic spline cross
section is rotated about an axis of rotation specified in the plane of the cross
section.
Implicit/mathematical definition. Difficult to implement.

Constructive Solid Geometry (CSG)


1. Definition
 Combine volume occupied by overlapping 3D objects using set boolean
operations
 Each primitive is defined as a combination of half-spaces.
 Typical standard primitives are:
cone, cylinder, sphere, torus, block, closed spline surface, right angular wedge.
swept solids (a revolution or linear sweep of a planar face which may contain
holes.
 Operations are union, intersection and difference.

2. Implementation with ray casting


Ray Casting is often used to implement CSG operation when objects are described
with boundary representation. We fire a ray from the plane xy (which represent the
screen). The surface limits for the composite object are determnined bu the specified
set operation (see Table).

Operation Surface Limit


Union A, D
Intersection C, B
Difference (Obj2 - Obj1) B, D
This method can also be used for physical simulation.
Visualization
The use of graphical methods to aid in analysis, often of datasets so large or complex
they can not be conseptualized otherwise. The analysed data can be scalars, vectors,
tensors, or a combination of these types.
An example of visualization. Proteins are too complex to describe verbally
Scalar Fields
 Graphs/charts
 Pseudo-color
 Countour plots, isolines

A topographic map of Marfa, Texas. Topographical maps are the most common
utilization of isolinear plots.
Volume Rendering
Project the data into 2D using ray casting, but the 2D value can be some function of
the values along that ray.
Examples:
 Max/min values
 Accumulate the opacity of points until it reaches 1 or the ray passes through (X-
rays).
25. Explain the importance of key frame in Animation

keyframing:
In the early days of animation, each frame of a production had to be drawn by hand.
Now animators can save hours or even weeks or months of work by using digital
keyframe animation to identify different elements of a graphic and choose how those
elements will move or change over time. To create an action in a digital animation
sequence, you first need to define the start and end points for that action. These
markers are called keyframes, and they’re used as anchor points for actions in all
different types of animation programs, including Adobe After Effects, Animate, and
Character Animator.
Keyframe animation basics.
Imagine you want a circle to bounce like a ball across your screen or frame of video.
To animate the ball moving from one position to another, set the first keyframe on
your animation timeline where you want the ball to start and a new keyframe further
along the timeline where you’d like it to land.
Changes you can make with keyframes.
You can trigger more than just position changes with keyframes. Each quality of an
animated object that you can adjust with keyframes is called a parameter. These
include things like Anchor Point, Position, Scale, Rotation, and Opacity. For
movement-based changes like Position or Rotation, you can adjust the parameter
values before placing your keyframes by simply clicking and dragging the object.
Types of keyframe interpolations.
The interpolation method is the manner in which you would like the action or
movement to be performed. A Bezier or “easing” movement is often a good option
because it mimics natural movement well. The object will ease out of the original
position and ease into the final position by varying degrees depending on the look
you’re going for.
 Linear interpolation: This default creates an even, almost robotic change.
 Hold interpolation: This change occurs suddenly at the next keyframe.
 Bezier or Ease interpolation: This change is based on a movement curve that
you can manually adjust.
CINEMATIC VISUAL EFFECTS AND MOTION GRAPHICS.

Adobe Affer Effects


Keyframes in Adobe After Effects
Keyframes are essential to creating animated effects and motion graphics in After
Effects. With programs like Animate or Character Animator, you deal with only the
animation portion of your production. But with After Effects, you can composite

animated elements onto real-world video clips.


How to add keyframes in After Effects.
Follow the steps below to add keyframes to a graphic in After Effects:
1. Select the layer you want to animate and click to reveal the Transform parameters
for that layer.
2. Choose your parameter or how you want to transform the layer.
3. Move the playhead (the blue marker that indicates where you’re at on your
timeline) to where you want to place a keyframe, and place your graphic at the
desired starting position or parameter setting.
4. Click the stopwatch next to the chosen parameter to add the first keyframe.
5. Scroll ahead in the timeline and place the playhead where you’d like the action to
end. Then place your graphic at the desired end position or end parameter setting to
set the second keyframe.
6. So change the interpolation method, right-click on a keyframe, click Keyframe
Assistant, and then choose your desired method.
7. To copy a keyframe — for example, if you’d like to add intermediate frames that
mimic the action of a previous one — use the Lasso tool to select it and copy and
paste it where you would like to duplicate it on the timeline.

Keyframes in Adobe Animate.


If you’re looking to create an animated 2D clip for a game, TV show, or the web,
Animate is the program for you. And just like in After Effects, keyframes are a
fundamental piece of animating in Animate. Animation in Animate uses tweened
frame spans, which means the frames that span the duration between two
keyframes contain an animated element. Keyframes in this app show up as
rectangles, not diamonds, as they appear in After Effects or Character Animator.
Get to know keyframes and tweening in Animate.
Before you start your first animation or game design, discover the basics of how
keyframes function on the Animate timeline. Then dive into tweening with keyframes
in Animate with this tutorial.

Keyframes in Adobe Character Animator.


Character Animator uses motion tracking technology to follow your facial movements
and expressions through your computer camera and transpose them onto a 2D
character or puppet. You can choose to add keyframes to your animation if you wish
in order to create more precise movements or movements that would be difficult to
achieve with motion tracking. Keyframes in Character Animator appear and behave
similarly to those in After Effects.

Combine keyframing with motion tracking.


Get quickly acquainted with how to use keyframes in Character Animator or check
out this longer step-by-step video that goes into greater detail about the keyframe
process.
Frequently asked questions.
Can you use keyframes in other Adobe programs?
Yes. Keyframes can also come into play when editing video footage in Adobe
Premiere Pro, when creating timeline animations in Photoshop, and even when
editing audio files.
Keyframes and Creative Cloud.
Keyframed sequences are necessary in many different applications, but there are
benefits to working in Adobe Creative Cloud. One advantage is the ability to pull in
designs from other apps, like Adobe Illustrator and Photoshop, when compositing
together different types of media into one video project. Plus, your knowledge of
keyframes in one app can carry over into the other apps in Creative Cloud. Adobe
makes it easy to apply many different keyframe types and adjust every movement
and change to your liking.

MARCH 2021- Third Semester - COMPUTER GRAPHICS


Part A
1. List any five application area of computer graphics.
Some of the applications of computer graphics are:

 Computer Art: Using computer graphics we can create fine and commercial art which
include animation packages, paint packages. ...
 Computer Aided Drawing: ...
 Presentation Graphics: ...
 Entertainment: ...
 Education: ...
 Training: ...
 Visualisation: ...
 Image Processing:
2. What is pixel?

Pixels are the smallest unit in a digital display. Up to millions of pixels make up an image
or video on a device's screen. Each pixel comprises a subpixel that emits a red, green and
blue (RGB) color, which displays at different intensities.
3. Write notes on various software standards.
Standard software is the term used to describe all software products that cover a clearly
defined area of application and can be used in their entirety without any further
adjustments when purchased.
4. What is the equation for calculating the first decesion parameter in Bresenham's Line Drawing
Algorithm?

2.1 slope(m) > 1. 2.2 slope(m) = 1. According to slope Decision Parameter is calculated,
which is used to make decision for selection of next pixel point in both the phases.
5. Define Serif Type font?
A typeface or "font family" making use of serifs is called a serif typeface (or serifed typeface), and a
typeface that does not include them is sans-serif.

6. What is concatenation?
It is often necessary to join text strings together in a program to make a new text
string. This is called concatenation.
7. Difference between window and viewport.
The window, in effect, defines the portion of the graph that is to be displayed in
world coordinates, and the viewport specifies the area on the device on which the
image is to appear.
8. What are the conditions for point clipping?
Point Clipping Algorithm:

 Get the minimum and maximum coordinates of both viewing pane.


 Get the coordinates for a point.
 Check whether given input lies between minimum and maximum coordinate of
viewing pane.
 If yes display the point which lies inside the region otherwise discard it.
9. Define Depth Cueing.
Depth cueing is implemented by having objects blend into the background color
(fade) with increasing distance from the viewer. The range of distance over which this
blending occurs is controlled by the sliders.
10. What are quadtrees?
A quadtree is a tree data structure in which each internal node has exactly four
children. Quadtrees are the two-dimensional analog of octrees and are most often used to
partition a two-dimensional space by recursively subdividing it into four quadrants or
regions.
11. What is animation?
Generally, Computer animation is a visual digital display technology that processes the
moving images on screen. In simple words, it can be put or defined as the art or power of
giving life, energy and emotions etc. to any non-living or inanimate object via computers. It
can be presented in form of any video or movie.
12. What is raster animation?
A raster animation is a sequence of frames that are each composed of pixels. Each
frame's pixels have colour data associated with them. Since each frame has the same width
and height, they each have the same number of pixels.
Part B
13. What is the concept behind DVST Display?
Working principle of DVST:
The flood gun produce large number of electrons, this negatively charged grid
reduces speed of these electrons. Then electrons pass through collector at low velocity
and attracted by positive charged portions of storage mesh and strike at portions of
phosphor coated screen to display picture.
14. Briefly explain Bresenham's Line Drawing Algorithm with example.

Bresenham's Line Algorithm


This algorithm is used for scan converting a line. It was developed by Bresenham. It is an efficient
method because it involves only integer addition, subtractions, and multiplication operations. These
operations can be performed very rapidly so lines can be generated quickly.
In this method, next pixel selected is that one who has the least distance from true line.
The method works as follows:
Assume a pixel P1'(x1',y1'),then select subsequent pixels as we work our may to the night, one pixel
position at a time in the horizontal direction toward P2'(x2',y2').
Once a pixel in choose at any step
The next pixel is

1. Either the one to its right (lower-bound for the line)


2. One top its right and up (upper-bound for the line)
The line is best approximated by those pixels that fall the least distance from the path between
P1',P2'.

To chooses the next one between the bottom pixel S and top pixel T.
If S is chosen
We have xi+1=xi+1 and yi+1=yi
If T is chosen

We have xi+1=xi+1 and yi+1=yi+1


The actual y coordinates of the line at x = xi+1is
y=mxi+1+b
The distance from S to the actual line in y direction
s = y-yi
The distance from T to the actual line in y direction
t = (yi+1)-y
Now consider the difference between these 2 distance values
s-t
When (s-t) <0 ⟹ s < t
The closest pixel is S
When (s-t) ≥0 ⟹ s < t
The closest pixel is T
This difference is
s-t = (y-yi)-[(yi+1)-y]
= 2y - 2yi -1

Substituting m by and introducing decision variable


d i=△x (s-t)

d i=△x (2 (xi+1)+2b-2yi-1)
=2 △xy i-2△y-1△x.2b-2yi△x-△x
di=2△y.xi-2△x.yi+c
Where c= 2△y+△x (2b-1)
We can write the decision variable d i+1 for the next slip on
d i+1=2△y.xi+1-2△x.yi+1+c
di+1-di=2△y.(xi+1-xi)- 2△x(yi+1-yi)
Since x_(i+1)=xi+1,we have
d i+1+di=2△y.(xi+1-xi)- 2△x(yi+1-yi)

Special Cases
If chosen pixel is at the top pixel T (i.e., d i≥0)⟹ yi+1=yi+1
di+1=di+2△y-2△x
If chosen pixel is at the bottom pixel T (i.e., d i<0)⟹ yi+1=yi
di+1=di+2△y

Finally, we calculate d1
d1 =△x[2m(x1+1)+2b-2y1-1]

d1=△x[2(mx1+b-y1)+2m-1]

Since mx1+b-yi=0 and m = , we have


d1=2△y-△x
15. Explain Midpoint Circle Algorithm, with appropriate figures.

Midpoint Circle Drawing Algorithm in Computer Graphics


The midpoint circle drawing algorithm helps us to calculate the complete perimeter points of a
circle for the first octant. We can quickly find and calculate the points of other octants with the
help of the first octant points. The remaining points are the mirror reflection of the first octant
points.

This algorithm is used in computer graphics to define the coordinates needed for rasterizing
the circle. The midpoint circle drawing algorithm helps us to perform the generalization of conic
sections. Bresenham’s circle drawing algorithm is also extracted from the midpoint circle
drawing algorithm. In the algorithm, we will use the 8-way symmetry property.
In this algorithm, we define the unit interval and consider the nearest point of the circle
boundary in each step.
Let us assume we have a point a (p, q) on the boundary of the circle and with r radius satisfying
the equation fc (p, q) = 0

As we know the equation of the circle is –


fc (p, q) = p2 + q2 = r2 …………………………… (1)
If
fc (p, q) < 0
then
The point is inside the circle boundary.
If
fc (p, q) = 0
then
The point is on the circle boundary.
If
fc (p, q) > 0
then
The point is outside the circle boundary.

In the figure, we calculate the mid-point (m). The midpoint appears between qk and qk -1.
The currentposition of the pixel = pk +1
The next position of the pixel = (pk +1, qk) and (pk +1, qk - 1)
Now, we will calculate the decision parameter (dk)
dk = (pk +1, qk – 1/2)
Now, we replace all the values with equation (1)
dk = (pk +1)2 + (qk – 1/2)2 – r2 ……………………………………
(2)
Now, there should be two conditions.
Condition 1: If
dk is negative
then
The midpoint (m) is inside the circle boundary
Condition 2: If
dk is positive
then
The midpoint (m) is outside the circle boundary
Now, we find the next point of x coordinates. Then,
Pk+1 +1 = Pk+2
Now, we replace all the value of equation (2) with (k+1). We get-
dk+1 = (pk+1 +1)2 + (qk+1 – 1/2)2 – r2 ……………………………. (3)
Now, we will find the difference between
dk+1 – dk = {(pk+1 +1)2 + (qk+1 – 1/2)2 – r2} – {(pk +1)2 + (qk – 1/2)2 – r2}
= dk +(2pk +1) + (qk+12 – qk2) – (qk+1 – qk) +1 …………………… (4)
Here, If
dk isnegativethen dk+1
then
2pk+1 +1
Otherwise
2pk+1 +1 – 2qk+1
Now, the next coordinate for x and y points
2pk+1 = 2pk +2
2qk+1 = 2qk –2
Now, the initial decision parameter (d0) at the position (p, q) = (0, r)
We put (0, r) in circle equation and we get-
d0 = (1, r – 1/2)
= (1 + (r –1/2)2 –r2)
= 5/4 –r
We only take integer value = 1 – r
16. Explain any two basic transformations.
Types of Transformations
There are various types of transformations in computer graphics through which an image can be
processed, edited ad altered. Some basic and most commonly used types of these transformations
are:
1. Translation
2. Rotation
3. Scaling
4. Reflection
5. Shearing

Translation
Translation refers to a technique in which a point is shift from one place to another, whose distance
is known.
Consider a point A(x1, y1) be shifted to another point B (x2, y2). Now we only know the shifting
distance tx along x-axis and ty along y-axis.
Now, the new coordinates (x2, y2) can be calculated as:
x2 = x 1 + tx
y2 = y1 + ty
For example:
Suppose we want to shift a point with coordinates at A(30,100) and distance along x-axis is 10 units
and 20 units along y-axis.
Using translation:
Here tx = 10 ;
and ty = 20
New coordinates A’ (x2, y2):
x2 = 30 + 10 = 130
y2 = 100 + 20 = 120
The point will be shifted to A’ (130, 120 ).

Rotation
Rotation refers to mathematical operation in which the graphical object is rotated about an angle
(θ) to the axis.
Rotation is of two types: anti-clockwise and clockwise rotation.
Suppose we want to rotate a point with coordinates A (x1, y1) clockwise through an angle θ about
the origin
Then the new coordinates A’ (x2, y2):
x2 = x1 cosθ + y1 sinθ
y2 = x1 sinθ - y1 cosθ

Scaling
Scaling refers to a mathematical rule applied to change the size of the image.
If the value of scaling factors is negative, the size is decreased and when the value is positive, the
size of the image is increased.
Suppose the point with coordinates A (x1, y1) is to be scaled by a factor sx along the x-axis and sy along
the y-axis.
Hence the new coordinates after scaling will be:
x2 = x 1 x s x
y 2 = y 1 x sy
Translation, rotation and scaling are termed as basic translations.

Other Transformations
The other two transformation techniques are as follows,

Reflection
Reflection refers to the mirror image of the original graphical object. It is an 180 o rotation
operation.
Reflection can be done about following ways:

 x-axis
 y-axis
 the origin and
 A plane perpendicular to the origin

Shearing
Shearing is a transformation in which the shape of the object is slanted about the axis.
In y-shearing:
The new-coordinates will be:
x' = x
y' = y + sy x
In x-shearing:
The new-coordinates will be:
x' = x + s x y
y' = y
17. Discuss the various text clipping methods.
18. Explain Polygon Surfaces in detail.
19. Briefly explain CSG with the help of figures.
20. Explain various computer animation languages.
21. What is morphing?
Part C
22. Discuss about various flat panel displays.
23. Discuss the various interactive picture construction techniques.
24. Explain Sweep representation and CSG in Detail with proper figures.
25. List and explain various motions specification in computer animation.

APRIL 2022- Third Semester - COMPUTER GRAPHICS


Part A
1. List the merits and demerits of DVST.
2. Compare Raster scan and Random scan displays.
3. Differentiate between passive matrix and active matrix LCD displays.
4. What is the disadvantage of DDA Algorithm?
5. Compare Bitmap and Outline font.
6. Interpret the need of composite transformation.
7. Differentiate window and viewport.
8. What is point clipping, what is the condition for clipping?
9. Discuss about stereoscopic views.
10. Define space-partitioning representations.
11. Write a note on raster animation.
12. How does scripting system works?
Part B
13. Briefly describe about various hard copy devices.
14. What is Bresenham's Line Drawing Algorithm? Illustrate with appropriate figure.
15. Construct a circle with radius 10, using Midpoint Circle Algorithm.
16. Compare rotation and scaling.
17. Distinguish grid and gravity field.
18. Explain CSG with the help of figures.
19. Explain Octrees in detail.
20. What is the difference of keyframe systems from paramererized systems?
21. Explain about different motion specifications.
Part C
22. Summarize various applications of Computer Graphics in detail.
23. Describe Cohen Sutherland line clipping algorithm with examples.
24. Explain Sweep representation and CSG in detail with proper figures.
25. List and explain various steps involved in the design of animation sequence.

Nov 2018- Third Semester - COMPUTER GRAPHICS


1.What is the role of computer graphics in entertainment?
2. Define refresh buffer/Frame buffer?
3. What is the difference between emissive and non emissive displays?
4. What is the importance of decesion parameter in Bresenham’s Line Drawing Algorithm?
5. What are the two categories of Typefaces?
6. Explain translation?
7. What is grid?
8. What is clipping? What are its different types?
9. Why Perspective projection appear more realistic?
10. What is Boundary Representations?
11. Write notes on Parameterised systems?
12. Write notes on Parameteried systems?
Part – B
13. Explain the working of the following a) Data Glove b) Digitizer c) Touch Panel f) Light Pen
14. Briefly explain DDA Algorithm, what is the disadvantage of this algorithm.
15. Use Midpoint Circle Algorithm and generate the circle, whose radius is given as r=10
16. Give the matrix representation for the basic transformations
17. Explain window to view port transformation?
18. Explain Sweep representation with the help of figures.
19. Compare CSG and Ray-casting Methods.
20. Explain morphing.
21. Explain about different motion specifications
Part – C
22. Explain the working of Cathode Ray Tube with suitable diagram.
23. Explain Sutherland-Hodgeman polygon clipping with example.
24. Explain Octress in detail.
25. Explain various steps involved in the design of animation sequence.

You might also like