✂️ Geometry Clipping

Cohen-Sutherland Clipping

Clip line segments to a rectangular window using 4-bit region outcodes (Top, Bottom, Right, Left) to determine intersection points.

📟
0000 / 0000
Outcodes P1 / P2
✂️
Accept
Clip Decision
🔲
Region-Based
Clipping Type
⏱️
60 FPS
Render Cycle
Cohen-Sutherland Viewport

Live C++ OpenGL Code

Parameters

2
3
22
15
Read Guide

Mathematical Trace

Adjust points to calculate Cohen-Sutherland outcode region checks.