Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Cyrus–Beck algorithm
Line-clipping algorithm in computer graphics

In computer graphics, the Cyrus–Beck algorithm is a generalized algorithm for line clipping. It was designed to be more efficient than the Cohen–Sutherland algorithm, which uses repetitive clipping. Cyrus–Beck is a general algorithm and can be used with a convex polygon clipping window, unlike Cohen-Sutherland, which can be used only on a rectangular clipping area.

Here the parametric equation of a line in the view plane is p ( t ) = t p 1 + ( 1 − t ) p 0 {\displaystyle \mathbf {p} (t)=t\mathbf {p} _{1}+(1-t)\mathbf {p} _{0}} where 0 ≤ t ≤ 1 {\displaystyle 0\leq t\leq 1} .

Now to find the intersection point with the clipping window, we calculate the value of the dot product. Let ⁠ p E {\displaystyle \mathbf {p} _{E}} ⁠ be a point on the clipping plane ⁠ E {\displaystyle E} ⁠.

Calculate n ⋅ ( p ( t ) − p E ) {\displaystyle \mathbf {n} \cdot (\mathbf {p} (t)-\mathbf {p} _{E})} :

  • if < 0, vector pointed towards interior;
  • if = 0, vector pointed parallel to plane containing ⁠ p {\displaystyle p} ⁠;
  • if > 0, vector pointed away from interior.

Here ⁠ n {\displaystyle {\mathbf {n}}} ⁠ stands for normal of the current clipping plane (pointed away from interior).

By this we select the point of intersection of line and clipping window where (dot product is 0) and hence clip the line.

Related Image Collections Add Image
We don't have any YouTube videos related to Cyrus–Beck algorithm yet.
We don't have any PDF documents related to Cyrus–Beck algorithm yet.
We don't have any Books related to Cyrus–Beck algorithm yet.
We don't have any archived web articles related to Cyrus–Beck algorithm yet.

Notes

See also

Algorithms used for the same purpose:

References in other media:

References

  1. "Clipping" (presentation). https://www.slideshare.net/johanna20/clipping-presentation