Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit II: Overview - Clipping and Transformations

Lesson 9 of 32 in the free Computer Graphics notes on Siksha Sarovar, written by Rohit Jangra.

What This Unit Covers

Unit II is the algebra of moving, sizing, and trimming geometry. We meet clipping (deciding what to keep when geometry leaves the visible window), 2D transformations (translation, rotation, scaling, reflection, shearing), the homogeneous coordinate trick that lets us multiply transformations together, and finally the window-to-viewport mapping plus the matrix forms of 3D transformations.

Why Transformations Are Always Matrices

Every modern graphics API (OpenGL, DirectX, Vulkan, WebGPU) drives the GPU with 4x4 matrices. The reason is that translation is not a linear map in 2D/3D - but lifting points into homogeneous coordinates makes it linear, so we can chain any sequence of operations into a single matrix multiplied per vertex.

Why Clipping Comes First

Before transformation makes geometry visible, you must decide which parts of geometry are inside the visible region. Skipping invisible work saves enormous time, especially in 3D where most of the world is off-screen.

Learning Outcomes

  • Apply Cohen-Sutherland region codes to accept/reject lines fast.
  • Use the parametric Cyrus-Beck approach for arbitrary convex clip windows.
  • Trace Sutherland-Hodgman polygon clipping conceptually.
  • Build matrices for translation, rotation about origin/arbitrary point, scaling, reflection, and shear.
  • Compose transformations via matrix multiplication and explain why order matters.
  • Implement window-to-viewport mapping for any aspect ratio.
  • State 3D transformation matrices in the column-vector convention.