Archive | Geometric RSS feed for this section

Cohen-Sutherland Line Clipping Algorithm

15. March 2009

0 Comments

Line Clipping It is desirable to restrict the effect of graphics primitives to a subregion of the canvas, to protect other portions of the canvas. All primitives are clipped to the boundaries of this clipping rectangle; that is, primitives lying outside the clip rectangle are not drawn. The default clipping rectangle is the full canvas (the Window), and [...]

Continue reading...

Distance Between Point and Line

11. March 2009

0 Comments

This note describes the technique and gives the solution to finding the shortest distance from a point to a line or line segment. The equation of a line defined through two points P1 (x1,y1) and P2 (x2,y2) is P = P1 + u (P2 - P1) The point P3 (x3,y3) is closest to the line at the [...]

Continue reading...