1.4 LINE Function - Output Primitive
1.4 LINE Function - Output Primitive
1.4 LINE Function - Output Primitive
Output Primitives
Unit 1: Line function
Dr.M.Manimaran,
Associate Professor,
Department Computer Science,
SKACAS
oefqdki- Graphics & Multimedia Unit I Output Primitives 1
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020
Lecture Agenda
• Line function
• Poly line
• PHIGS, GKS
• wcpoints
EXPECTED OUTCOME
After studying this class, you should be able to:
LINE FUNCTION
LINE FUNCTION
LINE FUNCTION
LINE FUNCTION
wcPoints[ll .x = SO;
wcPoints[ll .y = 100;
wcPoints[21 .x = 150;
wc~oints[2l.y = 250;
wc~oints[3l.x = 250;
wcPoints[31 .y = 100;
polyline ( 3 , wcpoints);
LINE FUNCTION
• Coordinate references in the polyline function are stated as
absolute coordinate values
• For example, if location (3,2) is the last position that has been
referenced in an application program,
• a relative coordinate specification of (2, -1) corresponds to an
absolute position of (5,1).
LINE FUNCTION
• Implementation of the polyline procedure is accomplished by
first performing a series of coordinate transformations, then
malung a sequence of calls to a device-level line-drawing
routine.
• In PHIGS, the input line endpoints are actually specified in
modeling coordinates, which are then converted to world
coordinates.
Key Points
• frame buffer addresses
• relative or absolute coordinates
• frame buffer array
MCQ
1) We set the line-color value in PHIGS with the
function
a) setPolylineColorIndex (lc)
b) setline Color()
c) SETPOLYLINECOLORINDEX (lc)
d) Only b
MCQ
2) _______ is the array of input world coordinate values
for line segment endpoints.
a) Wc points
b) setline Color()
c) Both
MCQ ANSWERS
1) Answer: a
Explanation: The setPolylineColorIndex (lc)
function is used to set the line color.
2) wcpoints
VIDEO URL
https://www.youtube.com/watch?v=2JIh04rHIEA
Next Lecture
Circle Generating Algorithms
DISCUSSIONS