Points and Lines in Computer Graphics MCQ Questions and Answers
1. In computer graphics, a point is represented by
A) A single bit
B) A pair of coordinate values (x, y)
C) A pixel matrix
D) A color code
Answer: B
2. A line in 2D space is defined by the equation
A) x² + y² = r²
B) y = mx + c
C) x = y²
D) y = k
Answer: B
3. The slope ‘m’ of a line joining points (x₁, y₁) and (x₂, y₂) is given by
A) (x₂ − x₁) / (y₂ − y₁)
B) (y₂ − y₁) / (x₂ − x₁)
C) (x₁ + y₁) / (x₂ + y₂)
D) (x₁ − x₂) / (y₁ − y₂)
Answer: B
4. The general equation of a line in 2D is
A) x² + y² + c = 0
B) y = mx² + c
C) Ax + By + C = 0
D) xy + C = 0
Answer: C
5. A vertical line has
A) Zero slope
B) Infinite or undefined slope
C) Negative slope
D) Constant intercept
Answer: B
6. A horizontal line has
A) Infinite slope
B) Undefined slope
C) Zero slope
D) Negative slope
Answer: C
7. In homogeneous coordinates, a 2D point (x, y) is represented as
A) (x, y, z)
B) (x, y, 1)
C) (x, y, 0)
D) (x, y, w)
Answer: B
8. In 3D graphics, a point is represented as
A) (x, y)
B) (x, y, 1)
C) (x, y, z)
D) (x, y, z, 0)
Answer: C
9. The slope of a line at 45° to the x-axis is
A) 0
B) 1
C) -1
D) ∞
Answer: B
10. The slope of a line perpendicular to y = 2x + 3 is
A) 2
B) -½
C) 1/2
D) -2
Answer: B
11. A line that passes through the origin has intercept
A) 0 on x-axis only
B) 0 on y-axis only
C) Zero intercepts on both axes
D) Infinite slope
Answer: C
12. The pixel that best represents a continuous line is called
A) Center pixel
B) Nearest pixel
C) Edge pixel
D) Average pixel
Answer: B
13. Line drawing in raster graphics is essentially a process of
A) Color mixing
B) Pixel approximation of continuous geometry
C) Clipping
D) Lighting
Answer: B
14. The algorithm that uses floating-point arithmetic for line generation is
A) Digital Differential Analyzer (DDA)
B) Bresenham’s algorithm
C) Midpoint circle algorithm
D) Liang-Barsky algorithm
Answer: A
15. The main disadvantage of the DDA algorithm is
A) High speed
B) Use of floating-point arithmetic (slow and less efficient)
C) Integer rounding
D) Poor accuracy
Answer: B
16. Bresenham’s line algorithm is preferred because
A) It uses only integer arithmetic
B) It uses floating points
C) It’s slower
D) It’s inaccurate
Answer: A
17. Bresenham’s algorithm calculates pixel positions using
A) Incremental error terms
B) Floating-point slopes
C) Cosine functions
D) Random access memory
Answer: A
18. For a line with slope m < 1, Bresenham’s algorithm increments
A) y by 1 each step
B) x by 1 each step
C) x by m each step
D) Both x and y equally
Answer: B
19. For lines with slope > 1, the Bresenham algorithm
A) Increments x
B) Increments y and interchanges roles of x and y
C) Keeps y constant
D) Increments x by 2
Answer: B
20. In DDA algorithm, each step calculates
A) xₖ₊₁ = xₖ + 1, yₖ₊₁ = yₖ + m
B) xₖ₊₁ = xₖ + m, yₖ₊₁ = yₖ + 1
C) xₖ₊₁ = xₖ − 1, yₖ₊₁ = yₖ − m
D) None
Answer: A
21. The input to a line drawing algorithm is
A) Slope and intercept
B) Two endpoints (x₁, y₁) and (x₂, y₂)
C) Length and angle
D) Circle radius
Answer: B
22. Aliasing in computer graphics refers to
A) Data compression
B) Staircase effect on lines and edges
C) Color blending
D) Shading
Answer: B
23. The process used to reduce aliasing is called
A) Shading
B) Anti-aliasing
C) Rasterization
D) Quantization
Answer: B
24. The method of anti-aliasing that blends edge pixels’ intensity is
A) Supersampling or area sampling
B) Subdivision
C) Line clipping
D) Diffusion
Answer: A
25. The term “scan conversion” in line drawing means
A) Converting geometric primitives into raster (pixel) form
B) Clipping
C) Scaling
D) Projection
Answer: A
26. The incremental variable in DDA for slope < 1 is
A) y
B) x
C) c
D) z
Answer: A
27. The decision parameter in Bresenham’s algorithm decides
A) Which pixel is closer to the line path
B) Color of pixel
C) Clipping point
D) Line thickness
Answer: A
28. The first pixel in Bresenham’s algorithm is
A) Starting point (x₁, y₁)
B) Center of screen
C) End point (x₂, y₂)
D) Average of endpoints
Answer: A
29. In DDA, if slope m > 1, then
A) Increment y by 1 and x by 1/m
B) Increment x by 1
C) Increment both x and y equally
D) Keep y constant
Answer: A
30. The error term in Bresenham’s line algorithm is updated by
A) Adding slope
B) Adding or subtracting 2Δy or 2Δy−2Δx based on pixel selection
C) Averaging coordinates
D) Scaling the intercept
Answer: B
31. The efficiency of Bresenham’s algorithm comes from
A) Avoiding floating-point calculations
B) Using color interpolation
C) Storing all pixels
D) Ignoring slopes
Answer: A
32. The integer line algorithm was invented by
A) Cohen and Sutherland
B) Jack Bresenham
C) D. E. Knuth
D) D. F. Rogers
Answer: B
33. The line equation in parametric form is
A) P(t) = P₀ + t(P₁ − P₀)
B) y = mx + c
C) x + y + c = 0
D) x² + y² = r²
Answer: A
34. The value of t in the parametric line equation varies between
A) −∞ to ∞
B) 0 to 1
C) −1 to 1
D) 1 to 10
Answer: B
35. In vector form, a line is defined by
A) A point and a direction vector
B) Two planes
C) A slope only
D) A normal vector
Answer: A
36. The line midpoint between (x₁, y₁) and (x₂, y₂) is
A) ((x₁ + x₂)/2, (y₁ + y₂)/2)
B) (x₁ − x₂, y₁ − y₂)
C) (x₁ + x₂, y₁ + y₂)
D) (x₁x₂, y₁y₂)
Answer: A
37. The slope of a line joining (2,3) and (4,7) is
A) 3
B) 2
C) 1
D) 4
Answer: B
38. Two lines are parallel if their slopes are
A) Equal in magnitude but opposite in sign
B) Equal
C) Perpendicular
D) Infinite
Answer: B
39. Two lines are perpendicular if
A) Their slopes are equal
B) Product of their slopes = −1
C) Product of slopes = 1
D) Difference = 1
Answer: B
40. The line passing through (1,2) and slope 3 is
A) y = 2x + 3
B) y = 3x − 1
C) y = 3x + 2
D) y = −3x + 1
Answer: B
41. The slope-intercept form y = mx + c can also be written as
A) y − y₁ = m(x − x₁)
B) x + y = c
C) Ax + By + C = 0
D) x/y = m
Answer: A
42. If the slope of one line is 2, then the perpendicular line’s slope is
A) ½
B) −½
C) −2
D) 1
Answer: B
43. The smallest unit of display on a raster device is called
A) Pixel (picture element)
B) Voxel
C) Dot matrix
D) Frame
Answer: A
44. The primary difference between a point and a pixel is that
A) A point is a mathematical entity; a pixel is a discrete display unit
B) Both are identical
C) A pixel has no coordinates
D) A point is physical
Answer: A
45. A vector line representation differs from raster in that
A) It stores endpoints and direction, not pixels
B) It stores all pixels
C) It uses Z-buffer
D) It needs no coordinates
Answer: A
46. Line intensity control refers to
A) Refresh rate
B) Brightness variation along a line
C) Rasterization
D) Aliasing
Answer: B
47. A thick line can be drawn by
A) Drawing multiple parallel lines or using a brush radius
B) Increasing pixel brightness only
C) Scaling slope
D) Rotating coordinates
Answer: A
48. The attribute that defines line pattern (dashed, dotted, etc.) is called
A) Line style
B) Line color
C) Line intensity
D) Line width
Answer: A
49. A dashed line can be generated by
A) Scaling slope
B) Using random gaps
C) Drawing alternate segments and gaps
D) Changing brightness
Answer: C
50. Line clipping is performed to
A) Determine visible portions of lines within a display window
B) Change resolution
C) Scale lines
D) Detect colors
Answer: A
51. The main objective of line clipping algorithms is
A) Rasterization
B) Displaying only the visible segment of a line
C) Transformation
D) Hidden surface removal
Answer: B
52. The most commonly used line clipping algorithm is
A) Liang–Barsky
B) Cohen–Sutherland
C) Cyrus–Beck
D) Bresenham
Answer: B
53. The Cohen–Sutherland algorithm divides the window region into
A) 4 parts
B) 8 equal squares
C) 9 regions using 4-bit codes
D) 2 halves
Answer: C
54. The region code in Cohen–Sutherland is represented by
A) Four bits (Top, Bottom, Left, Right)
B) Two bits
C) Eight bits
D) Hexadecimal pair
Answer: A
55. If both endpoints of a line have region code 0000, the line is
A) Partially visible
B) Completely visible
C) Completely invisible
D) Outside window
Answer: B
56. If the logical AND of both region codes ≠ 0000, the line is
A) Completely invisible
B) Partially visible
C) Completely visible
D) Clipped horizontally
Answer: A
57. The Liang–Barsky algorithm is based on
A) Parametric line equation and inequalities
B) Slope–intercept form
C) Midpoint test
D) Floating slopes
Answer: A
58. The Liang–Barsky method is more efficient than Cohen–Sutherland because
A) It avoids repeated intersection calculations
B) It uses bitwise AND
C) It ignores endpoints
D) It always accepts lines
Answer: A
59. The Cyrus–Beck clipping algorithm is used for
A) 2D rectangular clipping
B) Clipping lines against convex polygons
C) Circle clipping
D) Parallel projection
Answer: B
60. The parametric line representation used in clipping is
A) P(t) = P₁ + t(P₂ − P₁), 0 ≤ t ≤ 1
B) y = mx + c
C) x = ky + c
D) Ax + By + C = 0
Answer: A
61. The midpoint of a line helps in
A) Bresenham’s circle drawing
B) Midpoint line decision-making in line generation
C) Clipping only
D) Projection
Answer: B
62. The midpoint line algorithm avoids
A) Interpolation
B) Floating-point arithmetic
C) Integer increments
D) Boundary checks
Answer: B
63. The decision parameter in midpoint line drawing algorithm is based on
A) Line equation value at the midpoint between two pixels
B) Difference of slopes
C) Circle formula
D) Dot product
Answer: A
64. If the decision parameter in Bresenham’s algorithm is negative,
A) Choose the lower pixel (E)
B) Choose upper pixel (NE)
C) Skip a pixel
D) Restart
Answer: A
65. If the decision parameter is positive,
A) Choose upper pixel (NE)
B) Skip pixel
C) Decrease y by 2
D) Terminate
Answer: A
66. The line drawing speed is determined mainly by
A) Monitor refresh
B) Number of arithmetic operations per step
C) Color depth
D) Anti-aliasing filter
Answer: B
67. The line joining (0,0) and (8,4) has slope
A) 1
B) ½
C) 2
D) −½
Answer: B
68. Using DDA for (0,0) to (4,2), the increment of y in each step is
A) 2
B) 0.5
C) 1
D) 0.25
Answer: B
69. Using DDA for (2,3) to (10,7), the step count =
A) 5
B) 8
C) 4
D) 10
Answer: B
70. In line rasterization, each pixel is approximated by
A) The nearest integer coordinate to the true line position
B) Center of screen
C) Starting point only
D) Random color
Answer: A
71. To handle negative slopes in Bresenham’s algorithm,
A) Adjust sign of y increment accordingly
B) Invert coordinates
C) Shift origin
D) Use floating points
Answer: A
72. Bresenham’s algorithm can draw
A) Only horizontal lines
B) All types of lines with various slopes
C) Only vertical lines
D) Only 45° lines
Answer: B
73. The line y = x represents a
A) 45° line through the origin
B) Horizontal line
C) Vertical line
D) Undefined line
Answer: A
74. The line y = −x passes through
A) (0,1)
B) Origin (0,0)
C) (1,1)
D) (1,−1)
Answer: B
75. The perpendicular distance from a point (x₀, y₀) to the line Ax + By + C = 0 is
A) |Ax₀ + By₀ + C| / √(A² + B²)
B) A + B + C
C) (Ax₀ − By₀) / (A² + B²)
D) |Ax₀ + By₀ + C|
Answer: A
76. The line joining points (2,2) and (8,5) has length
A) √((8−2)² + (5−2)²) = √45 ≈ 6.7 units
B) 6
C) 5
D) 7
Answer: A
77. In homogeneous coordinates, a line is represented as
A) [a b c] where ax + by + cw = 0
B) (x, y, z)
C) (x, y, w)
D) [m c 1]
Answer: A
78. A line at infinity in homogeneous form satisfies
A) w = 0
B) x = 0
C) y = 0
D) c = 0
Answer: A
79. The dot product of two perpendicular lines’ direction vectors equals
A) 1
B) 0
C) −1
D) 2
Answer: B
80. In 3D, the line through points P₁ and P₂ can be written as
A) P = P₁ + t(P₂ − P₁)
B) y = mx + c
C) Ax + By + Cz + D = 0
D) P = P₁ − t(P₂ + P₁)
Answer: A
81. Two lines are skew if
A) They are parallel
B) They intersect
C) They are non-parallel and non-intersecting in 3D
D) They lie in the same plane
Answer: C
82. In rasterization, the “line density” depends on
A) Display resolution
B) Color depth
C) Monitor refresh
D) Frame buffer size
Answer: A
83. The total number of pixels required to represent a diagonal line across an N×N display is approximately
A) N
B) 2N
C) N/2
D) √N
Answer: A
84. The time complexity of Bresenham’s line algorithm is
A) O(n)
B) O(log n)
C) O(n²)
D) Constant
Answer: A
85. If the slope of a line is zero, the DDA algorithm will
A) Increment only x each step
B) Increment y
C) Increment both
D) Stop
Answer: A
86. When slope is undefined, DDA increments
A) X
B) Y only
C) Both
D) None
Answer: B
87. In clipping, the portion of a line outside the window is
A) Rejected or truncated
B) Highlighted
C) Shifted
D) Stored separately
Answer: A
88. When both line endpoints lie outside but in different regions,
A) The line is partially visible
B) Fully visible
C) Invisible
D) Ignored
Answer: A
89. To avoid round-off errors in DDA, one should
A) Use integer arithmetic if possible
B) Increase slope
C) Decrease slope
D) Use random numbers
Answer: A
90. In OpenGL, glVertex2i(x, y) represents
A) A 2D point vertex with integer coordinates
B) A 3D vertex
C) A pixel
D) A color value
Answer: A
91. In OpenGL, a line is drawn between vertices using
A) GL_LINES primitive
B) GL_POINTS
C) GL_POLYGON
D) GL_QUADS
Answer: A
92. The rasterization of lines occurs in
A) Clipping stage
B) Modeling stage
C) Scan conversion stage
D) Transformation stage
Answer: C
93. The anti-aliasing method “Wu’s line algorithm” uses
A) Intensity interpolation between adjacent pixels
B) Integer arithmetic
C) Bit masking
D) XOR clipping
Answer: A
94. A “line segment” is defined as
A) Portion of a line between two defined endpoints
B) Infinite in both directions
C) One direction only
D) Undefined slope
Answer: A
95. A ray is defined as
A) A line that starts at one point and extends infinitely in one direction
B) Finite segment
C) Infinite both sides
D) Closed loop
Answer: A
96. The vector equation of a ray is
A) R(t) = P₀ + tD, t ≥ 0
B) P = P₀ + t(P₁ − P₀)
C) R = P₀ − tD
D) R = D + P
Answer: A
97. A point lies on a line if it satisfies
A) The line’s equation
B) The circle equation
C) Both
D) None
Answer: A
98. The function of the “decision variable” in line algorithms is to
A) Select which pixel is closer to the ideal line
B) Control color intensity
C) Set frame rate
D) Change slope
Answer: A
99. The slope of the line y = −2x + 1 is
A) −2
B) 1
C) 0.5
D) 2
Answer: A
100. The intersection of two non-parallel lines gives
A) A unique point
B) A plane
C) Infinite points
D) No solution
Answer: A
