ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalITEC4128Point Line Drawing Tec…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    ITEC4128

    Computer Graphics

    Progress0 / 15 done
    Topics15
    1Introduction to Computer Graphics2Graphics Systems3Point and Line Drawing Techniques4Circle Drawing Techniques5Ellipse and Other Curves62D Transformations7Clipping83D Concepts93D Transformations10Perspective Projection11Triangles and Planes12Triangle Rasterization13Lighting14Introduction to OpenGL15Animations
    4 min read
    Topic 3 of 15
    Topic Study Note Illustration
    03

    Point and Line Drawing Techniques

    Point and Line Drawing Techniques are fundamental methods in computer graphics used to display basic geometric primitives like points and lines on a screen.

    📘 Point and Line Drawing Techniques — Exam Notes


    🔹 1. Introduction

    Point and Line Drawing Techniques are fundamental methods in computer graphics used to display basic geometric primitives like points and lines on a screen.

    👉 These are the building blocks for drawing complex shapes and images.


    🔹 2. Point Drawing (Pixel Plotting)

    ✔️ Definition

    A point is the smallest graphical element displayed on the screen, represented by a pixel at a specific coordinate (x, y).


    ✔️ How a Point is Drawn

    1. Specify coordinates (x, y)
    2. Assign a color value
    3. Store in frame buffer
    4. Display on screen

    ✔️ Example

    To draw a point at (5, 10):

    • Activate pixel at row = 10, column = 5

    ✔️ Diagram Description

    • Draw X-axis and Y-axis
    • Mark a point at (x, y)
    • Show it as a single filled dot

    🔹 3. Line Drawing

    ✔️ Definition

    A line is a continuous set of points between two endpoints:

    [ (x_1, y_1) \quad \text{and} \quad (x_2, y_2) ]


    ✔️ Challenges in Line Drawing

    • Pixels are discrete (not continuous)
    • Need to choose best pixels to approximate a straight line
    • Efficiency is important

    🔹 4. Line Drawing Algorithms


    🔸 4.1 DDA Algorithm (Digital Differential Analyzer)

    ✔️ Concept

    • Uses incremental calculation
    • Calculates intermediate points between endpoints

    ✔️ Steps

    1. Calculate: [ dx = x_2 - x_1,\quad dy = y_2 - y_1 ]

    2. Find number of steps: [ steps = \max(|dx|, |dy|) ]

    3. Calculate increments: [ x_{inc} = \frac{dx}{steps},\quad y_{inc} = \frac{dy}{steps} ]

    4. Start from (x₁, y₁)

    5. Repeat:

      • Plot (x, y)
      • Update: [ x = x + x_{inc},\quad y = y + y_{inc} ]

    ✔️ Example

    Draw line from (2, 2) to (6, 4):

    • dx = 4, dy = 2
    • steps = 4
    • x_inc = 1, y_inc = 0.5

    Points: (2,2), (3,2.5), (4,3), (5,3.5), (6,4)


    ✔️ Advantages

    • Simple to understand
    • Easy implementation

    ✔️ Disadvantages

    • Uses floating-point operations
    • Less efficient

    🔸 4.2 Bresenham’s Line Algorithm

    ✔️ Concept

    • Uses integer calculations only
    • More efficient than DDA

    ✔️ Idea

    • Decide which pixel is closer to the true line
    • Use a decision parameter

    ✔️ Steps (for slope < 1)

    1. Input endpoints (x₁, y₁), (x₂, y₂)

    2. Calculate: [ dx = x_2 - x_1,\quad dy = y_2 - y_1 ]

    3. Initialize decision parameter: [ p = 2dy - dx ]

    4. Start from (x₁, y₁)

    5. For each x:

      • If ( p < 0 ): → Next point = (x+1, y) → ( p = p + 2dy )

      • Else: → Next point = (x+1, y+1) → ( p = p + 2dy - 2dx )


    ✔️ Example (Simple)

    Line from (0,0) to (5,3)

    • dx = 5, dy = 3
    • p = 2(3) − 5 = 1

    Then calculate points step by step using decision parameter.


    ✔️ Advantages

    • Fast and efficient
    • Uses integer arithmetic
    • Widely used in graphics systems

    ✔️ Disadvantages

    • More complex than DDA

    🔹 5. Comparison: DDA vs Bresenham

    Feature DDA Algorithm Bresenham Algorithm
    Calculation Floating-point Integer-based
    Speed Slower Faster
    Accuracy Less accurate More accurate
    Complexity Simple Moderate

    🔹 6. Important Terms

    • Pixel: Smallest display unit
    • Resolution: Number of pixels
    • Slope (m): [ m = \frac{dy}{dx} ]
    • Decision Parameter: Helps choose next pixel

    🔹 7. Diagram Descriptions

    ✔️ Line Drawing

    • Draw a grid (pixels)
    • Mark start and end points
    • Show approximate line using filled pixels

    ✔️ DDA Representation

    • Show incremental steps along line

    ✔️ Bresenham Representation

    • Show two possible pixels at each step
    • Highlight chosen pixel

    📝 Likely Exam Questions

    1. Define point and line in computer graphics.
    2. Explain point plotting with example.
    3. Describe DDA line drawing algorithm with steps.
    4. Explain Bresenham’s line algorithm.
    5. Compare DDA and Bresenham algorithms.
    6. What are the challenges in line drawing?
    7. Define slope and decision parameter.
    8. Solve a numerical using DDA algorithm.

    ⚡ Quick Revision Summary

    • Point = Single pixel at (x, y)

    • Line = Set of connected pixels

    • DDA Algorithm = Uses floating-point increments

    • Bresenham Algorithm = Uses integer calculations

    • Bresenham is faster and more efficient

    • Key formulas:

      • ( dx = x_2 - x_1 ), ( dy = y_2 - y_1 )
      • ( m = dy/dx )

    ← Previous topic 2
    Graphics Systems
    Next topic 4 →
    Circle Drawing Techniques

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    4mremaining
    669words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Computer Graphics