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 PortalCOMP3145Transformation Matrix …
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3145

    HCI & Computer Graphics

    Progress0 / 73 done
    Topics73
    1Input-output channels2Human memory3Thinking, Reasoning, Problem solving4Emotions and Individual differences5Psychology and design of interacting systems
    6Text entry devices7Positioning, Pointing, and drawing devices8Display devices9Devices for virtual reality and 3D interaction10Physical controls, Sensors and special devices11Paper printing and scanning12Memory, Processing and networks
    13Models of interaction14Frameworks and HCI15Ergonomics16Interaction styles17Elements of the WIMP interfaces18Interactivity and Context of interaction
    19Introduction20Paradigms for interaction
    21What is design22Process of design and User focus23Navigation design24Screen design and layout25Iteration and prototyping
    26Software life cycle27Usability engineering28Iterative design and prototyping29Design rationale30Design rules and Guidelines31Golden rules and heuristics32HCI patterns33Evaluation techniques and methods34Task analysis35Universal design36User support systems37Computer Supported Cooperative Work38Groupware systems39Implementation of synchronous groupware40Ubiquitous computing41History of Computer Graphics42Graphics architectures and software
    43Pinhole camera, Human vision, Synthetic camera44Modeling vs. rendering45OpenGL Architecture46Displaying simple two-dimensional geometric objects47Positioning systems and windowed environment48Color perception and models49RGB, CMY, HLS color models50Color transformations
    51RGB and indexed color
    52Network environment and client-server computing
    53event, sample and request input54Using callbacks and picking
    55translation, rotation, scaling, shear56Homogeneous coordinates and concatenation57Current transformation and matrix stacks
    58Classical viewing59Specifying views in 3D60Affine transformation in 3D61Projective transformations62Ray tracing
    63Illumination and surface modeling64Phong shading model65Polygon shading
    66Line drawing via Bresenham's algorithm67Clipping and polygonal fill68BitBlt operations69Hidden surface removal (z buffer)
    70Buffers71Reading and writing bitmaps and pixel maps72Texture mapping73Compositing
    2 min read
    Topic 57 of 73
    Topic Study Note Illustration
    57

    Current transformation and matrix stacks

    Definition: The current transformation (often called CTM ) is the matrix that represents all the transformations currently applied to objects in a graphics scene.

    1. Current Transformation

    Definition: The current transformation (often called CTM) is the matrix that represents all the transformations currently applied to objects in a graphics scene.

    • It is used to transform object coordinates into world or screen coordinates.
    • Every vertex of an object is multiplied by the CTM before rendering.

    Key Points:

    • The CTM can represent translation, rotation, scaling, shear, or any combination.
    • When you apply a transformation (e.g., rotate, translate), it modifies the CTM, not the object coordinates directly.

    Example:

    • Suppose the CTM is initially the identity matrix.
    • Applying glTranslatef(2, 0, 0) updates the CTM.
    • All subsequent drawing commands will have their vertices translated by (2, 0, 0) automatically.

    2. Matrix Stack

    Stack (abstract data type)
    Visual ReferenceStack (Abstract Data Type)
    Wikipedia

    Definition: A matrix stack is a stack data structure used to save and restore transformation matrices.

    • Common in OpenGL to manage hierarchical transformations.

    • Two main operations:

      1. Push – Save the current CTM onto the stack.
      2. Pop – Restore the last saved CTM from the stack.

    Purpose:

    • Allows local transformations for individual objects without affecting others.
    • Essential for hierarchical modeling (e.g., a robot arm: shoulder → elbow → hand).

    3. How Matrix Stack Works

    Workflow Example:

    1. Start with identity CTM.
    2. Draw a robot body: apply translation and scaling.
    3. Push CTM before transforming the arm.
    4. Apply rotation for the arm and draw it.
    5. Pop CTM to revert to the body’s transformation.
    6. Draw another object using the original body transformation.

    Diagram Conceptually:

    CTM (identity)
       |
       |-- translate body
       |-- scale body
       |-- push CTM
            |-- rotate arm
            |-- draw arm
       |-- pop CTM
       |-- draw other body parts
    

    4. OpenGL Functions for Matrix Stack

    Function Description
    glPushMatrix() Saves the current CTM on the stack
    glPopMatrix() Restores the last saved CTM from the stack
    glLoadIdentity() Resets CTM to identity matrix
    glMultMatrixf() Multiplies CTM by a given matrix

    5. Benefits of Using Matrix Stack

    • Simplifies complex hierarchical transformations.
    • Avoids manual calculation of inverse transformations.
    • Provides modularity: local transformations don’t interfere with global ones.

    6. Summary Table

    Concept Definition Use
    Current Transformation Matrix (CTM) Matrix representing all active transformations Applied to all vertices for rendering
    Matrix Stack Stack storing CTMs for save/restore Supports hierarchical and modular transformations
    ← Previous topic 56
    Homogeneous coordinates and concatenation
    Next topic 58 →
    Three Dimensional Graphics: Classical viewing

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    2mremaining
    373words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    HCI & Computer Graphics