computer-nec-license
  • NEC-Computer
  • 1. Concept of Basic Electrical and Electronics Engineering
    • 1.1 Basic Concepts
    • 1.2 Network Theorems
    • 1.3 Alternating Current Fundamentals
    • 1.4 Semiconductor Device
    • 1.5 Signal Generator
    • 1.6 Amplifiers
    • MCQs
      • MCQs On Basic Electrical
        • set-1
        • set-2
      • MCQs On Basic Electronics
        • set-1
        • set-2
  • 2. Digital Logic and Microprocessor
    • 2.1 Digital Logic
    • 2.2 Combinational & Arithmetic Circuit
    • 2.3 Sequential Logic Circuits
    • 2.4 Microprocessor
    • 2.5 Microprocessor System
    • 2.6 Interrupt Operations
    • MCQs
      • MCQs On Digital Logic
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
      • MCQs On Microprocessor
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
  • 3. Programming Language and Its Applications
    • 3.1 Introduction to C Programming
    • 3.2 Pointers, Structures, and Data Files
    • 3.3 C++ Language Constructs with Objects and Classes
    • 3.4 Features of Object-Oriented Programming
    • 3.5 Pure Virtual Functions and File Handling
    • 3.6 Generic Programming and Exception Handling
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
  • 4. Computer Organization and Embedded System
    • 4.1 Control and CPU
    • 4.2 Computer Arithmetic and Memory System
    • 4.3 I/O Organization and Multiprocessor
    • 4.4 Embedded System Design
    • 4.5 Real-Time Operating and Control Systems
    • 4.6 Hardware Description Language (VHDL) and IC Technology
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
      • set-10
      • set-11
  • 5. Concept of Computer Network and Network Security System
    • 5.1 Introduction to Computer Networks
    • 5.2 Data Link Layer
    • 5.3 Network Layer
    • 5.4 Transport Layer
    • 5.5 Application Layer
    • 5.6 Network Security
    • MCQs
      • Basic Networking
        • set-1
        • set-2
      • Advanced Networking
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 6. Theory of Computation and Computer Graphics
    • 6.1 Introduction to Finite Automata
    • 6.2 Introduction to Context-Free Languages (CFL)
    • 6.3 Turing Machines (TM)
    • 6.4 Introduction to Computer Graphics
    • 6.5 Two-Dimensional Transformation
    • 6.6 Three-Dimensional Transformation
    • MCQs
      • MCQs on Theory of Computation
        • set-1
        • set-2
        • set-3
      • MCQs On Computer Graphics
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 7. Data Structures and Algorithm, Database System and Operating System
    • 7.1 Introduction to Data Structures, Lists, Linked Lists, and Trees
    • 7.2 Sorting, Searching, Hashing and Graphs
    • 7.3 Introduction to Data Models, Normalization, and SQL
    • 7.4 Transaction Processing, Concurrency Control, and Crash Recovery
    • 7.5 Introduction to Operating System and Process Management
    • 7.6 Memory Management, File Systems, and System Administration
    • MCQs
      • MCQs ON DSA
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
      • MCQs On DBMS
        • set-1
        • set-2
      • MCQs On Operating System
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
  • 8. Software Engineering and Object-Oriented Analysis & Design
    • 8.1 Software Process and Requirements
    • 8.2 Software Design
    • 8.3 Software Testing, Cost Estimation, Quality Management, and Configuration Management
    • 8.4 Object-Oriented Fundamentals and Analysis
    • 8.5 Object-Oriented Design
    • 8.6 Object-Oriented Design Implementation
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 9. Artificial Intelligence and Neural Networks
    • 9.1 Introduction to AI and Intelligent Agents
    • 9.2 Problem Solving and Searching Techniques
    • 9.3 Knowledge Representation
    • 9.4 Expert System and Natural Language Processing
    • 9.5 Machine Learning
    • 9.6 Neural Networks
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 10. Project Planning, Design and Implementation
    • 10.1 Engineering Drawings and Its Concepts
    • 10.2 Engineering Economics
    • 10.3 Project Planning and Scheduling
    • 10.4 Project Management
    • 10.5 Engineering Professional Practice
    • 10.6 Engineering Regulatory Body
    • MCQs
      • MCQs On Engineering Drawing
        • set-1
        • set-2
      • MCQs On Engineering Economics
      • MCQs On Project Planning & Scheduling
      • MCQs On Project Mangement
      • MCQs On Engineering Professional Practice
      • MCQs On Engineering Regulatory Body
  • Questions Sets
    • Set 1 (Chaitra, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 2 (Aasadh, 2081)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 3 (Asojh, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Computer Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Software Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
  • Tips & Tricks
Powered by GitBook
On this page
  • 1. Three-Dimensional Translation
  • 2. Three-Dimensional Rotation
  • 3. Three-Dimensional Scaling
  • 4. Three-Dimensional Reflection
  • 5. Three-Dimensional Shear Transformation
  • 6. Three-Dimensional Composite Transformation
  • 7. 3D Viewing Pipeline
  • 8. Projection Concepts
  • Conclusion
  1. 6. Theory of Computation and Computer Graphics

6.6 Three-Dimensional Transformation

Three-dimensional (3D) transformations are used to manipulate 3D objects in a 3D coordinate system. These transformations can change the position, orientation, size, or shape of objects in 3D space. Like 2D transformations, 3D transformations are critical in computer graphics for applications like 3D modeling, animation, and gaming.


1. Three-Dimensional Translation

Translation in 3D is the process of moving an object from one location to another along the X, Y, and Z axes. The object is shifted by a specified distance in each direction without altering its shape or orientation.

  • Mathematical Representation: If (x,y,z)(x, y, z)(x,y,z) is the original point, and (tx,ty,tz)(tx, ty, tz)(tx,ty,tz) is the translation vector, the new point (x′,y′,z′)(x', y', z')(x′,y′,z′) after translation is:

    • x′=x+txx' = x + txx′=x+tx

    • y′=y+tyy' = y + tyy′=y+ty

    • z′=z+tzz' = z + tzz′=z+tz

  • Transformation Matrix:

    T=[100tx010ty001tz0001]T = \begin{bmatrix} 1 & 0 & 0 & tx \\ 0 & 1 & 0 & ty \\ 0 & 0 & 1 & tz \\ 0 & 0 & 0 & 1 \end{bmatrix}T=​1000​0100​0010​txtytz1​​


2. Three-Dimensional Rotation

Rotation in 3D involves rotating an object around one of the three axes (X, Y, or Z). A point in 3D space is rotated by a specified angle around the axis of rotation.

  • Rotation about the X-axis:

    • x′=xx' = xx′=x

    • y′=y⋅cos⁡θ−z⋅sin⁡θy' = y \cdot \cos \theta - z \cdot \sin \thetay′=y⋅cosθ−z⋅sinθ

    • z′=y⋅sin⁡θ+z⋅cos⁡θz' = y \cdot \sin \theta + z \cdot \cos \thetaz′=y⋅sinθ+z⋅cosθ

  • Rotation about the Y-axis:

    • x′=x⋅cos⁡θ+z⋅sin⁡θx' = x \cdot \cos \theta + z \cdot \sin \thetax′=x⋅cosθ+z⋅sinθ

    • y′=yy' = yy′=y

    • z′=−x⋅sin⁡θ+z⋅cos⁡θz' = -x \cdot \sin \theta + z \cdot \cos \thetaz′=−x⋅sinθ+z⋅cosθ

  • Rotation about the Z-axis:

    • x′=x⋅cos⁡θ−y⋅sin⁡θx' = x \cdot \cos \theta - y \cdot \sin \thetax′=x⋅cosθ−y⋅sinθ

    • y′=x⋅sin⁡θ+y⋅cos⁡θy' = x \cdot \sin \theta + y \cdot \cos \thetay′=x⋅sinθ+y⋅cosθ

    • z′=zz' = zz′=z

  • Rotation Matrices:

    • Rotation about the X-axis:

      Rx(θ)=[10000cos⁡θ−sin⁡θ00sin⁡θcos⁡θ00001]R_x(\theta) = \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​(θ)=​1000​0cosθsinθ0​0−sinθcosθ0​0001​​

    • Rotation about the Y-axis:

      Ry(θ)=[cos⁡θ0sin⁡θ00100−sin⁡θ0cos⁡θ00001]R_y(\theta) = \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​0100​sinθ0cosθ0​0001​​

    • Rotation about the Z-axis:

      Rz(θ)=[cos⁡θ−sin⁡θ00sin⁡θcos⁡θ0000100001]R_z(\theta) = \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θ00​−sinθcosθ00​0010​0001​​


3. Three-Dimensional Scaling

Scaling in 3D modifies the size of an object along the X, Y, and Z axes. It can be uniform (the same factor for all axes) or non-uniform (different scaling factors for each axis).

  • Mathematical Representation: If (x,y,z)(x, y, z)(x,y,z) is the original point and (sx,sy,sz)(sx, sy, sz)(sx,sy,sz) are the scaling factors along the X, Y, and Z axes, then the new point (x′,y′,z′)(x', y', z')(x′,y′,z′) is:

    • x′=x⋅sxx' = x \cdot sxx′=x⋅sx

    • y′=y⋅syy' = y \cdot syy′=y⋅sy

    • z′=z⋅szz' = z \cdot szz′=z⋅sz

  • Transformation Matrix:

    S=[sx0000sy0000sz00001]S = \begin{bmatrix} sx & 0 & 0 & 0 \\ 0 & sy & 0 & 0 \\ 0 & 0 & sz & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}S=​sx000​0sy00​00sz0​0001​​


4. Three-Dimensional Reflection

Reflection in 3D mirrors an object across a plane. The reflection can be done across the XY, YZ, or XZ plane, or across an arbitrary plane.

  • Reflection across the XY plane:

    • Mathematical Expression:

      • x′=xx' = xx′=x

      • y′=yy' = yy′=y

      • z′=−zz' = -zz′=−z

    • Transformation matrix:

      Rxy=[1000010000−100001]R_{xy} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}Rxy​=​1000​0100​00−10​0001​​

  • Reflection across the YZ plane:

    • Mathematical Expression:

      • x′=−xx' = -xx′=−x

      • y′=yy' = yy′=y

      • z′=zz' = zz′=z

    • Transformation matrix:

      Ryz=[−1000010000100001]R_{yz} = \begin{bmatrix} -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}Ryz​=​−1000​0100​0010​0001​​


5. Three-Dimensional Shear Transformation

Shear transformation in 3D distorts an object by shifting points in one direction based on their position in another direction. This transformation can be applied to all three axes.

  • Mathematical Representation:

    • Shear along the X-axis:

      • x′=x+shx⋅y+shxz⋅zx' = x + sh_x \cdot y + sh_xz \cdot zx′=x+shx​⋅y+shx​z⋅z

      • y′=yy' = yy′=y

      • z′=zz' = zz′=z

    • Shear along the Y-axis:

      • x′=xx' = xx′=x

      • y′=y+shy⋅x+shyz⋅zy' = y + sh_y \cdot x + sh_yz \cdot zy′=y+shy​⋅x+shy​z⋅z

      • z′=zz' = zz′=z

    • Shear along the Z-axis:

      • x′=xx' = xx′=x

      • y′=yy' = yy′=y

      • z′=z+shz⋅x+shzy⋅yz' = z + sh_z \cdot x + sh_zy \cdot yz′=z+shz​⋅x+shz​y⋅y

  • Transformation Matrix:

    • Shear along the X-axis:

      Hshx=[1shxshxz0010000100001]H_{sh_x} = \begin{bmatrix} 1 & sh_x & sh_xz & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}Hshx​​=​1000​shx​100​shx​z010​0001​​

    • Shear along the Y-axis:

      Hshy=[1000shy1shyz000100001]H_{sh_y} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ sh_y & 1 & sh_yz & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}Hshy​​=​1shy​00​0100​0shy​z10​0001​​

    • Shear along the Z-axis:

      Hshz=[10000100shzshzy100001]H_{sh_z} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ sh_z & sh_zy & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}Hshz​​=​10shz​0​01shz​y0​0010​0001​​


6. Three-Dimensional Composite Transformation

Composite transformation in 3D is the combination of multiple transformations (translation, rotation, scaling, reflection, shear) applied sequentially to an object. The resulting transformation matrix is obtained by multiplying the individual transformation matrices together.

For example, applying scaling, then rotation, then translation:

Tcomposite=T⋅R⋅ST_{composite} = T \cdot R \cdot STcomposite​=T⋅R⋅S


7. 3D Viewing Pipeline

The 3D viewing pipeline transforms a 3D world into a 2D screen space, similar to the 2D pipeline, but with additional steps to account for the third dimension.

  1. Modeling Transformation: Transforms the object from model coordinates to world coordinates.

  2. View Transformation: Converts the world coordinates to camera (view) coordinates.

  3. Projection Transformation: Projects the 3D world onto a 2D plane (screen space).

  4. Clipping: Removes objects outside the view frustum.

  5. Viewport Transformation: Converts the 2D coordinates to screen coordinates.


8. Projection Concepts

  • Orthographic Projection:

    • Objects are projected onto a 2D plane along parallel lines. There is no perspective distortion; objects remain the same size regardless of distance from the camera.

    • Used for architectural drawings, engineering, etc.

  • Parallel Projection:

    • Similar to orthographic but can also involve objects being projected along non-orthogonal directions.

  • Perspective Projection:

    • Mimics the human eye's perception, where objects appear smaller as they move farther from the camera, creating a sense of depth.

    • Defined by a vanishing point and viewing distance.


Conclusion

Three-dimensional transformations are the cornerstone of 3D graphics, enabling the manipulation of objects in a 3D coordinate system for applications such as modeling, animation, and visualization.

  • Translation, Rotation, Scaling, Reflection, and Shear allow for fundamental changes in an object's position, orientation, size, and shape.

  • Composite transformations efficiently combine multiple operations into a single matrix, streamlining complex workflows.

  • The 3D Viewing Pipeline ensures that the transformation from 3D space to a 2D screen accurately represents the intended scene.

  • Projection concepts like orthographic and perspective projection play a vital role in rendering realistic or technical views.

Mastering these transformations is essential for creating immersive and visually compelling 3D environments, driving innovation in fields like gaming, simulation, and virtual reality.

Previous6.5 Two-Dimensional TransformationNextMCQs

Last updated 3 months ago