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 PortalCOMP3145Affine Transformation …
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
    7 min read
    Topic 60 of 73
    Topic Study Note Illustration
    60

    Affine transformation in 3D

    An affine transformation in 3D is a linear mapping that preserves points, straight lines, and planes , and allows translation, scaling, rotation, reflection, and shear of 3D...

    1. Definition

    An affine transformation in 3D is a linear mapping that preserves points, straight lines, and planes, and allows translation, scaling, rotation, reflection, and shear of 3D objects.

    • Affine transformations maintain parallelism of lines but not necessarily distances or angles.
    • Represented conveniently using 4×4 matrices with homogeneous coordinates.

    2. Homogeneous Coordinates in 3D

    A 3D point (x,y,z)(x, y, z)(x,y,z) is represented in homogeneous coordinates as:

    P=[x y z 1]P = \begin{bmatrix} x \ y \ z \ 1 \end{bmatrix}P=[x y z 1​]
    • Using 4×4 matrices allows translation to be expressed as matrix multiplication, along with rotation, scaling, and shear.

    3. Types of 3D Affine Transformations

    A. Translation

    Moves a point by a vector (tx,ty,tz)(tx, ty, tz)(tx,ty,tz):

    T=[100tx 010ty 001tz 0001],P′=T⋅PT = \begin{bmatrix} 1 & 0 & 0 & tx \ 0 & 1 & 0 & ty \ 0 & 0 & 1 & tz \ 0 & 0 & 0 & 1 \end{bmatrix}, \quad P' = T \cdot PT=[1​0​0​tx 0​1​0​ty 0​0​1​tz 0​0​0​1​],P′=T⋅P

    B. Scaling

    Scales coordinates along x, y, z axes:

    S=[Sx000 0Sy00 00Sz0 0001],P′=S⋅PS = \begin{bmatrix} Sx & 0 & 0 & 0 \ 0 & Sy & 0 & 0 \ 0 & 0 & Sz & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}, \quad P' = S \cdot PS=[Sx​0​0​0 0​Sy​0​0 0​0​Sz​0 0​0​0​1​],P′=S⋅P
    • Sx,Sy,Sz>1Sx, Sy, Sz > 1Sx,Sy,Sz>1 enlarges, 0<S<10 < S < 10<S<1 shrinks.

    C. Rotation

    Rotation about x, y, or z axes:

    About X-axis (angle θ\thetaθ):

    Rx=[1000 0cos⁡θ−sin⁡θ0 0sin⁡θcos⁡θ0 0001]R_x = \begin{bmatrix} 1 & 0 & 0 & 0 \ 0 & \cos\theta & -\sin\theta & 0 \ 0 & \sin\theta & \cos\theta & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}Rx​=[1​0​0​0 0​cosθ​−sinθ​0 0​sinθ​cosθ​0 0​0​0​1​]

    About Y-axis (angle θ\thetaθ):

    Ry=[cos⁡θ0sin⁡θ0 0100 −sin⁡θ0cos⁡θ0 0001]R_y = \begin{bmatrix} \cos\theta & 0 & \sin\theta & 0 \ 0 & 1 & 0 & 0 \ -\sin\theta & 0 & \cos\theta & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}Ry​=[cosθ​0​sinθ​0 0​1​0​0 −sinθ​0​cosθ​0 0​0​0​1​]

    About Z-axis (angle θ\thetaθ):

    Rz=[cos⁡θ−sin⁡θ00 sin⁡θcos⁡θ00 0010 0001]R_z = \begin{bmatrix} \cos\theta & -\sin\theta & 0 & 0 \ \sin\theta & \cos\theta & 0 & 0 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}Rz​=[cosθ​−sinθ​0​0 sinθ​cosθ​0​0 0​0​1​0 0​0​0​1​]

    D. Shear

    Shifts one coordinate proportionally to another:

    Sh=[1ShxyShxz0 Shyx1Shyz0 ShzxShzy10 0001]Sh = \begin{bmatrix} 1 & Sh_{xy} & Sh_{xz} & 0 \ Sh_{yx} & 1 & Sh_{yz} & 0 \ Sh_{zx} & Sh_{zy} & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}Sh=[1​Shxy​​Shxz​​0 Shyx​​1​Shyz​​0 Shzx​​Shzy​​1​0 0​0​0​1​]

    4. Concatenation of 3D Affine Transformations

    • Multiple transformations can be combined into a single matrix:
    Mfinal=T⋅R⋅S⋅ShM_{final} = T \cdot R \cdot S \cdot ShMfinal​=T⋅R⋅S⋅Sh
    • Apply once to a point/vector:
    P′=Mfinal⋅PP' = M_{final} \cdot PP′=Mfinal​⋅P
    • Order matters (matrix multiplication is not commutative).

    5. Summary Table

    Transformation Matrix Form Effect
    Translation 4×4 matrix with last column (tx,ty,tz,1)(tx, ty, tz, 1)(tx,ty,tz,1) Move object in space
    Scaling Diagonal 4×4 matrix Resize object along axes
    Rotation 4×4 matrix (Rx,Ry,Rz)(R_x, R_y, R_z)(Rx​,Ry​,Rz​) Rotate object about axes
    Shear Off-diagonal elements Skew object along axes

    Key Points:

    • Affine transformations in 3D preserve straight lines and parallelism.
    • Using homogeneous coordinates, translation, rotation, scaling, and shear can all be represented as matrix multiplication.
    • Essential for 3D modeling, animation, and graphics pipelines.
    ← Previous topic 59
    Specifying views in 3D
    Next topic 61 →
    Projective transformations

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    7mremaining
    1.2kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    HCI & Computer Graphics