Académique Documents
Professionnel Documents
Culture Documents
COMPILED BY,
VERIFIED BY
1
CREDIT POINT
SEMESTER VI
COURSE CONTACT
SN COURSE TITLE CATEGORY L T P C
CODE PERIODS
THEORY
Computational
1 IT8601
Intelligence
PC 3 3 0 0 3
Computer Graphics
5 CS8092 PC 3 3 0 0 3
and Multimedia
6 Professional Elective I PE 3 3 0 0 3
PRACTICAL
Mobile Application
7 CS8662 PC 4 0 0 4 2
Development Laboratory
Object Oriented Analysis
8 CS8582 PC 4 0 0 4 2
and Design Laboratory
9 IT8611 Mini Project EEC 2 0 0 2 1
Professional
10 HS8581
Communication
EEC 2 0 0 2 1
TOTAL 30 18 0 12 24
2
CS8092 Computer Graphics and Multimedia
OBJECTIVES:
To develop an understanding and awareness how issues such as content, information
architecture, motion, sound, design, and technology merge to form effective and
compelling interactive experiences for a wide range of audiences and end users.
To become familiar with various software programs used in the creation and
implementation of multi- media
To appreciate the importance of technical ability and creativity within design practice.
To gain knowledge about graphics hardware devices and software used.
To understand the two-dimensional graphics and their transformations.
To understand the three-dimensional graphics and their transformations.
To appreciate illumination and color models
To become familiar with understand clipping techniques
To become familiar with Blender Graphics
Light sources - basic illumination models – halftone patterns and dithering techniques;
Properties of light - Standard primaries and chromaticity diagram; Intuitive
colour concepts - RGB colour model - YIQ colour model - CMY colour model -
HSV colour model - HLS colour model; Colour selection. Output primitives –
points and lines, line drawing algorithms, loading the frame buffer, line function;
circle and ellipse generating algorithms; Pixel addressing and object geometry,
filled area primitives.
3
UNIT IV MULTIMEDIA SYSTEM DESIGN & MULTIMEDIA FILE HANDLING
UNIT V HYPERMEDIA
TOTAL: 45 PERIODS
OUTCOMES:
At the end of the course, the students should be able to:
Design two dimensional graphics.
Apply two dimensional transformations.
Design three dimensional graphics.
Apply three dimensional transformations.
Apply Illumination and color models.
Apply clipping techniques to graphics.
Understood Different types of Multimedia File Format
Design Basic 3d Scenes using Blender
TEXT BOOKS:
1. Donald Hearn and M. Pauline Baker, “Computer Graphics C Version”, Pearson Education,
2003.
2. Andleigh, P. K and Kiran Thakrar, “Multimedia Systems and Design”, PHI, 2003.
REFERENCES:
1. Judith Jeffcoate, “Multimedia in practice: Technology and Applications”, PHI, 1998.
2. Foley, Vandam, Feiner and Huges, “Computer Graphics: Principles and Practice”, 2 nd Edition,
Pearson Education, 2003.
4
SENGUNTHAR COLLEGE OF ENGINEERING, TIRUCHENGODE- 637205
LECTURE PLAN
NO. OF
TOPIC REFERENCES TEACHING
HOURS
UNIT I ILLUMINATION AND COLOR MODELS
5
loading the frame buffer, line function; circle and ellipse
generating algorithms;
T1-CH1 Black Board 2
Pixel addressing and object geometry, filled area primitives T1-CH1 Black Board 1
6
Multimedia basics − Multimedia applications
T1-CH4 Black Board 2
Multimedia system architecture − Evolving technologies
for multimedia
T1-CH4 Black Board 2
Defining objects for multimedia systems − Multimedia data
interface standards −
T1-CH4 Black Board 1
UNIT V HYPERMEDIA
Total 45
Revision 10
Total Hours 55
UNIT I
7
UNIT I ILLUMINATION AND COLOR MODELS
Intuitive colour concepts - RGB colour model - YIQ colour model - CMY colour
model - HSV colour model - HLS colour model; Colour selection.
8
12. Applications of Computer Graphics.
13. What is pixel?
14. Define aspect ratio.
15.What is Graphics?
16. What is Bitmapped Display?
17. What is VGA (video graphics array)?
18. What is Refresh Rates .
19. What is chromaticity?
20. What do you mean by color model?
21. Write short notes on HLS color model.
22. What is Color gamut?
23. What for CMY color model used?
24. What is HSV model?
PART-B
1. Explain RGB,CMY,YIQ and YUV color models. (APR/MAY 18) (or) Write briefly on
YIQ Color Model.(NOV/DEC17)
2. Draw the CIE chromaticity diagram and explain. (6)
3. Digitize the line with end points (0,0) and (4,6) using DDA line drawing algorithm.
[APR/MAY 2018]
4. Explain the properties of a circle. [NOV/DEC2017]
5. Discuss briefly about curve attributes.[NOV/DEC2015] [APR/MAY 2017] [OR]
Attributes of Output Primitives.
6. Calculating the pixel location approximating the first octant of a circle having centre at (4,5)
and the radius 4 units using Bresenham's circle drawing algorithm.(8) [NOV/DEC2016]
7. Write down and explain the midpoint circle drawing algorithm. Assume 10 cm as
the radius and co-ordinate origin as the centre of the circle.(NOV/DEC
2009,2010,2011,2015)
8. Explain midpoint ellipse algorithm with an example?
UNIT I
OUTPUT PRIMITIVES
PART – A
9
1. Give the difference between Bresenham’s and DDA line drawing algorithm. [APR/MAY2018]
10
3. List out the basic geometric transformation.[NOV/DEC 2017]
5. Give the final coordinates of a unit quad ABCD with vertex A placed on the origin
after applying the uniform scaling of 2units with respect to the centre of the square.
[APR/MAY2017]
Uniform scaling means this scalar is the same for all components:
A scaling transformation alters the size of an object. This operation can be carried out
for polygons by multiplying the coordinate values (x, y) to each vertex by scaling factor Sx
11
& Sy to produce the transformed coordinates (x’, y’)
x’ = x.Sx y’ = y.Sy
scaling factor Sx scales object in x direction while Sy scales in y direction.
The transformation equation in matrix form
Vector graphics are stored in the computer as a set of mathematical formulas describing
the shapes that make up each image. When you display a vector graphic on the screen or
print it, these formulas are converted into the patterns of dots you can see. Because the dots
are not specified unit! you display or print the graphic, you can change the size of the image
without any loss of quality, and the image will always appear at the highest resolution of
whatever screen or printer you're using. The term vector graphics means exactly the same
thing as object-oriented (or just object) graphics.
10. Digitize a line from (10,12) to (15,15) on a raster screen using Bresenhams straight
line
12
algorithm.(nov/dec 2013)
The line has a slope of 0.6 with
Δx=5, Δy=3
The initial decision parameter has the value
P0=2Δy-Δx
=6-5=1
And the increments for calculating successive decision parameters are
2Δy-2Δx=6-10=-4
We plot the point (x0.y0) =(10,12), and determine successive pixel positions along the
line path from the decision parameter as
K pk (xk+1, yk+1)
0 1 (11, 13)
1 -3 (12, 13)
2 3 (13, 14)
3 -1 (14, 14)
4 5 (15, 15)
GUI
A graphic, mouse-oriented paradigm which allows the user to interact with a
computer.
Business presentation graphics - "A picture is worth a thousand words".
Cartography - drawing maps
Weather Maps - real time mapping, symbolic representations
Satellite Imaging - geodesic images
Photo Enhancement - sharpening blurred photos
Medical imaging - MRIs, CAT scans, etc. - non-invasive internal examination.
Engineering drawings - mechanical, electrical, civil, etc. - replacing the blueprints of
the past.
Typography - the use of character images in publishing - replacing the hard type of
the past.
Architecture - construction plans, exterior sketches - replacing the blueprints and
hand drawings of the past.
Art - computers provide a new medium for artists.
13. What is pixel?
The pixel (a word invented from "picture element") is the basic unit of programmable color
on a computer display or in a computer image. Think of it as a logical - rather than a physical -
unit. The physical size of a pixel depends on how you've set the resolution for the display
screen.
15.What is Graphics?
Pictures on a computer display or the process of creating pictures on a computer display.
The term came into use when there was still a distinction between computers that could
display only text and those that could also display pictures. This distinction is lost now that
almost all computers employ a GRAPHICAL USER INTERFACE.
VGA, which stands for video graphics array, is currently the most popular standard for PC
screen display equipment. Technically, a VGA is a type of video adapter (circuitry in the
computer that controls the screen). IBM developed the VGA for its PS/2 line of computers (the
name "Video Graphics Array" is an IBM trademark), but loads of other manufacturers make
VGA add-in boards (that plug into a slot in the pc) and VGA chips (in some pcs, these VGA
chips are built right into the main part of the computer, the motherboard). A VGA monitor is a
monitor that works with a VGA adapter.
15
HSV color wheel may be depicted as a cone or cylinder. Instead of Value, the color model
may use Brightness, making it HSB (Photoshop uses HSB).
16
PART – B
1. Explain RGB,CMY,YIQ and YUV color models. (APR/MAY 18) (or) Write briefly on YIQ Color
Model.(NOV/DEC17)
Colours used in graphics are based on a particular model. The model you pick depends on the
range of colours you need in a graphic and whether it is going to be output to print media or to
screen. There are various colour models available. Some of these are:
Black & white
Greyscale
RGB - Red, Green and Blue
CMYK - Cyan, Magenta, Yellow and Black
Lab - Luminance, 'a' & 'b' stand for chrominance
HSB - Hue, Saturation & Brightness. Other similar models are:
HSL, where L stands for Lightness,
HSV, where V stands for 'brightness Value' and
HCV, where C stands for Chroma and V for Value.
Indexed
Web safe
Print media such as magazines, leaflets and posters can use the CMYK, Greyscale and Lab
colour models. The Lab colour model isn't as commonly used.
Graphics that are going to be displayed on screen use the RGB or HSB/HSL/HSV colour models.
There is also the YUV and YCC models which are used for TVs.
RGB and CYMK are the most common colour models used for graphics. RGB is known as the
primary colour model. Any device that uses light to display graphics eg TVs, film projectors,
computer monitors, used the RGB colour model.
When combinations of pure red, green and blue are applied, they produce either Cyan, Magenta
or Yellow. CMYK is therefore known as the secondary colour model, as it is created from the
primary colour model.
17
The sign represents black, and the vertex with coordinates (1,1,1) in white Vertices of the cube
on the axes represent the primary colors, the remaining vertices represents the complementary
color for each of the primary colors.
The RGB color scheme is an additive model. (i.e.,) Intensities of the primary colors are added to
produce other colors.
Each color point within the bounds of the cube can be represented as the triple (R,G,B) where
values for R, G and B are assigned in the range from 0 to1. The colorCλ is expressed in RGB
component as
Cλ = RR + GG + BB
The magenta vertex is obtained by adding red and blue to produce the triple (1,0,1) and white at
(1,1,1) in the sum of the red, green and blue vertices.
Shades of gray are represented along the main diagonal of the cube from the origin (black) to the
white vertex.
CYMK
White is pure colour whereas black is the lack of colour. Black is not actually a colour at all. When
you combine pure cyan, magenta and yellow together you get black. That is what the 'K' stands
for - B is reserved for 'Blue'. It is for this reason that CMYK is known as the subtractive colour
model. As stated earlier, CMYK is used for print media. When you combine CMY ink together you
don't get a pure black, therefore black ink has to be added.
18
RGB is known as the additive colour model because when the pure colours are combined they create colour
(white).
19
uses similar signals as YIQ (with different weights, however, and using a coordinate system,
rotated 33
degrees) but with a higher bandwidth and correspondingly higher quality.
Y-chanel = Black and white signal Y-Bandwidth 5.5 MHz
U-chanel contains the difference of two weighted differences U-Bandwidth 1.3 MHz
V-chanel contains the sum of two weighted differences V-Bandwidth 1.3 MHz
HLS, HSV, HVC
These color models reflect the human color vision better than the RGB, CMY, YUV and YIQ
models, which are
targeted primarily for hardware applications. HLS, HSV, HVC are better suited for human than for
electronic
communication.
HLS is the abreviation for Hue-Lightness-Saturation.
The HLS-Model can be best understood by an analogy of a painter deciding for a color he or she
will apply:
(1) choose first a pure color (=Hue).
(2) add white pigment to it, so that it loses a little of its individuality (=Saturation).
(3) Now add the black pigment, so that the color is not too bright (=Lightness)
The three coordinates H, L and S of this system can be easily visualized as follows:
Pure colors are found at the outer border of a horizontal color circle. The hue can be interpreted
as the polar angle, going from red (0 degrees), green (120), blue (240) back to red.
The circle is closed to the outside, on the other side any point within the circle stands for some
color. The closer to the center of the circle the higher the proportion of the white color. The center
of the circle is colorless white.
Below this level other color circles are positioned in a cylindrical fashion. The lower they are, the
darker they get. Descending along the vertical axis of the system from its top down to the bottom,
one crosses from bright white color down to complete black. Off-axis, for instance for hue=red,
one descends from bright red down to dark red, with the degree of color saturation depending on
how far off-axis we are. Note that bright red is not as bright as bright white, which, additional to
bright red, also contains bright green and bright blue.
This is why the final form of an HLS system consists of two tops (rotational pyramids), with their
bottom sides glued together. The top point denotes absolute white, the bottom absolute black
and the middle circle a circular approximation of all available colors at an intermediate intensity.
The Hue coordinate is described by an angle between 0 and 360 degrees, the Lightness (vertical
axis) and Saturation (radial distance from the Lightness axis) with values between 0.0 and 1.0.
The maximal color saturation possible depends on Lightness. Halfway from the top (L=0.5) the
maximum saturation (in other words
the radius of the circle) is S=1.0. The red color for instance thus has coordinates like H = 0
Degrees, L = 0.5 and S = 1.0
20
HSV Color Model The HSV model uses color descriptions that have a more interactive appeal to
a user. Color parameters in this model are hue (H), saturation (S), and value (V). The 3D
representation of the HSV model is derived from the RGB cube. The outline of the cube has the
hexagon shape.
The boundary of the hexagon represents the various hues, and it is used as the top of the HSV
hexcone.
In the hexcone, saturation is measured along a horizontal axis, and value is along a vertical axis
through the center of the hexcone.
Hue is represented as an angle about the vertical axis, ranging from 00 at red through 3600.
Vertices of the hexagon are separated by 600 intervals.
Yellow is at 600, green at 1200 and cyan opposite red at H = 1800. Complementary colors are
1800 apart.
Saturation S varies from 0 to 1. the maximum purity at S = 1, at S = 0.25, the hue is said to be
one quarter pure, at S = 0, we have the gray scale.
Value V varies from 0 at the apex to 1 at the top.
- the apex representation black.
At the top of the hexcone, colors have their maximum intensity.
When V = 1 and S = 1 we have the “pure‟ hues.
White is the point at V = 1 and S = 0.
HVC
HVC is an abreviation of Hue-Value-Chroma.
This is a practical color coordinate system, designed about 1900 by a physicist A. Munsell. It is
based on a set of samples, whose production is carefully controlled to ensure repeatability. The
samples have been selected in such a fashion that from the point of view of human vision they
sample the seeable colors in equidistant fashion.
It is good in cases when subjective impression of the color is asked for but less useful in case of
technical systems.
21
2. Draw the CIE chromaticity diagram and explain. (6)
The Commission International de l' Eclairage(CIE) was founded in 1913
It succeeded the Commission International de Photometrie
The recognized international standards body for questions of human perception and
colour
The CIE colourimetric system is the standard from which all others are dervied
Published the Basic Colourimetric Terms (BCT)
CIE XYZ
To solve these problems, a tristimulus system derived from RGB and based on
imaginary primaries referred to as XYZ was defined in 1931
All three are outside the human visual gamut
Hence only positive XYZ values can occur!
CIE
22
CIE Chromaticity Diagram
comparing color gamuts
identifying complementary colors
determining dominant wavelength, purity spectral color positions are along the
boundary curve
color gamuts defined for a two color and a three color system of primaries
3. Digitize the line with end points (0,0) and (4,6) using DDA line drawing algorithm.
[APR/MAY 2018]
DDA Algorithm (Digital differential analyzer)
1. Get the two end points
2. Calculate the Horizontal and vertical difference between two end points (dx,dy)
3. The greatest difference value is taken as the length value.
4. Calculate the step value dx=dx/length, dy=dy / length
5. Start plotting the line from the first point.
6. Repeat through 9 step up to length value times
7. if dx>dy and xa<xb then increment x by 1 and increment y by m
8. if dx>dy and xa>xb then decrement x by 1 and decrement y by m
9. if dx<dy ya<yb then increment y by 1 and increment x by 1/m
23
1. Floating point arithmetic in DDA algorithm is still time-consuming.
2. The algorithm is orientation dependent. Hence end point accuracy is poor.
Consider the line from (0,0) to (4,6). Use the simple DDA algorithm to rasterize this
line.
Sol. Evaluating steps 1 to 5 in the DDA algorithm we have
Xl = 0 Y1 = 0
X2 = 4 Y2 = 6
Length = |Y2-Y1l = 6
∆X = |X2- Xl | / Length
= 4
6
∆Y = |Y2- Yl | / Length
= 6/6=1
Initial value for
X = 0 + 0.5 * Sign (4) = 0.5
6
Y = 0 + 0.5 * Sign (1) = 0.5
24
4. Explain the properties of a circle. [NOV/DEC2017]
In geometry, a large number of facts about circles and their relations to straight lines,
angles and polygons can be proved. These facts are called the properties of the circle.
Circles having equal radii are congruent.
Circles having different radii are similar.
The central angle which intercepts an arc is the double of any inscribed angle that
intercepts the same arc (proof).
The radius perpendicular to a chord bisects the chord.
The chords equidistant from the center are equal in length.
A tangent to a circle is at a right angle to the radius at the point of contact.
Two tangents drawn on a circle from a point outside are equal in length.
The angle subtended at the center of a circle by its circumference is equal to four
right angles.
The circumference of two different circles is proportional to their corresponding
radii.
Arcs of the same circle are proportional to their corresponding angles.
Radii of the same circle or equal circles are equal.
Equal chords have equal circumferences.
The diameter of a circle is the longest chord.
26
the thick line is displayed with square ends that are perpendicular to the line path.
Round cap obtained by adding a filled semicircle to each butt cap. The circular arcs are
centered on the line endpoints and have a diameter equal to the line thickness.
Projecting square cap extend the line and add butt caps that are positioned one-half of
the line width beyond the specified endpoints.
27
this category include shape, size, and pattern. Some possible pen or brush shapes are
given in Figure
Line color
A poly line routine displays a line in the current color by setting this color value in the
frame buffer at pixel locations along the line path using the set pixel procedure.
We set the line color value in PHlGS with the function
setPolylineColourIndex (lc)
Nonnegative integer values, corresponding to allowed color choices, are assigned to
the line color parameter lc
Example: Various line attribute commands in an applications program is given by the
following sequence of statements
setLinetype(2);
setLinewidthScaleFactor(2);
setPolylineColourIndex (5);
polyline(n1, wc points1);
setPolylineColorIindex(6);
poly line (n2, wc points2);
This program segment would display two figures, drawn with double-wide dashed lines.
The first is displayed in a color corresponding to code 5, and the second in color 6.
Curve attributes
Parameters for curve attribute are same as those for line segments. Curves displayed
with varying colors, widths, dot – dash patterns and available pen or brush options
28
6. Calculating the pixel location approximating the first octant of a circle having centre at (4,5) and
the radius 4 units using Bresenham's circle drawing algorithm.(8) [NOV/DEC2016]
Bresenham’s Algorithm :
We cannot display a continuous arc on the raster display. Instead, we have to choose the
nearest pixel position to complete the arc.
From the following illustration, you can see that we have put the pixel at (X, Y) location and now
need to decide where to put the next pixel − at N (X+1, Y) or at S (X+1, Y-1).
Algorithm
Step 1 − Get the coordinates of the center of the circle and radius, and store them in x, y, and R
respectively. Set P=0 and Q=R.
29
Step 4 − Call Draw Circle (X, Y, P, Q).
7. Write down and explain the midpoint circle drawing algorithm. Assume 10 cm as the
radius and co-ordinate origin as the centre of the circle.(NOV/DEC
2009,2010,2011,2015)
Answer: Midpoint circle Algorithm
1. Input radius r and circle center (xc,yc) and obtain the first point on the circumference of
the circle centered on the origin as (x0,y0) = (0,r)
2. Calculate the initial value of the decision parameter as P0=(5/4)-r
3. At each xk position, starting at k=0, perform the following test. If Pk <0 the next point
along the circle centered on (0,0) is (xk+1,yk) and Pk+1=Pk+2xk+1+1 Otherwise the next
point along the circle is (xk+1,yk-1) and Pk+1=Pk+2xk+1+1-2 yk+1 Where 2xk+1=2xk+2
and 2yk+1=2yk-2
4. Determine symmetry points in the other seven octants.
5. Move each calculated pixel position (x,y) onto the circular path centered at (xc,yc) and
plot the coordinate values. x=x+xc y=y+yc
30
6. Repeat step 3 through 5 until x>=y.
A line connects two points. It is a basic element in graphics. To draw a line, you need two points
between which you can draw a line. In the following three algorithms, we refer the one point of
line as X0,Y0X0,Y0 and the second point of line as X1,Y1X1,Y1.
DDA Algorithm
Digital Differential Analyzer (DDA) algorithm is the simple line generation algorithm which is
explained step by step here.
Step 1 − Get the input of two end points (X0,Y0)(X0,Y0) and (X1,Y1)(X1,Y1).
dx = X1 - X0
32
dy = Y1 - Y0
Step 3 − Based on the calculated difference in step-2, you need to identify the number of steps
to put pixel. If dx > dy, then you need more steps in x coordinate; otherwise in y coordinate.
Steps = absolute(dx);
else
Steps = absolute(dy);
Step 5 − Put the pixel by successfully incrementing x and y coordinates accordingly and
complete the drawing of the line.
x = x + Xincrement;
y = y + Yincrement;
putpixel(Round(x), Round(y));
For example, as shown in the following illustration, from position (2, 3) you need to choose
between (3, 3) and (3, 4). You would like the point that is closer to the original line.
33
At sample position Xk+1,Xk+1, the vertical separations from the mathematical line are labelled
as dupperdupper and dlowerdlower.
From the above illustration, the y coordinate on the mathematical line at xk+1xk+1is −
Y = m(XkXk+1) + b
So, dupperdupper and dlowerdlower are given as follows −
dlower=y−ykdlower=y−yk
=m(Xk+1)+b−Yk=m(Xk+1)+b−Yk
and
dupper=(yk+1)−ydupper=(yk+1)−y
34
=Yk+1−m(Xk+1)−b=Yk+1−m(Xk+1)−b
You can use these to make a simple decision about which pixel is closer to the mathematical
line. This simple decision is based on the difference between the two pixel positions.
dlower−dupper=2m(xk+1)−2yk+2b−1dlower−dupper=2m(xk+1)−2yk+2b−1
Let us substitute m with dy/dx where dx and dy are the differences between the end-points.
dx(dlower−dupper)=dx(2dydx(xk+1)−2yk+2b−1)dx(dlower−dupper)=dx(2dydx(xk+1)−2yk+2b−1)
=2dy.xk−2dx.yk+2dy+2dx(2b−1)=2dy.xk−2dx.yk+2dy+2dx(2b−1)
=2dy.xk−2dx.yk+C=2dy.xk−2dx.yk+C
So, a decision parameter PkPk for the kth step along a line is given by −
pk=dx(dlower−dupper)pk=dx(dlower−dupper)
=2dy.xk−2dx.yk+C=2dy.xk−2dx.yk+C
The sign of the decision parameter PkPk is the same as that of dlower−dupperdlower−dupper.
If pkpk is negative, then choose the lower pixel, otherwise choose the upper pixel.
Remember, the coordinate changes occur along the x axis in unit steps, so you can do
everything with integer calculations. At step k+1, the decision parameter is given as −
pk+1=2dy.xk+1−2dx.yk+1+Cpk+1=2dy.xk+1−2dx.yk+1+C
Now, keeping in mind all the above points and calculations, here is the Bresenham algorithm for
slope m < 1 −
Step 1 − Input the two end-points of line, storing the left end-point in (x0,y0)(x0,y0).
Step 2 − Plot the point (x0,y0)(x0,y0).
Step 3 − Calculate the constants dx, dy, 2dy, and (2dy – 2dx) and get the first value for the
decision parameter as −
p0=2dy−dxp0=2dy−dx
Step 4 − At each XkXk along the line, starting at k = 0, perform the following test −
If pkpk < 0, the next point to plot is (xk+1,yk)(xk+1,yk) and
pk+1=pk+2dypk+1=pk+2dy
Otherwise,
35
(xk,yk+1)(xk,yk+1)
pk+1=pk+2dy−2dxpk+1=pk+2dy−2dx
For m > 1, find out whether you need to increment x while incrementing y each time.
After solving, the equation for decision parameter PkPk will be very similar, just the x and y in
the equation gets interchanged.
36