Cyrus–Beck algorithm

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

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 \mathbf p(t) = t \mathbf p_1 + (1 - t) \mathbf p_0 where 0 \leq t \leq 1 . Now to find the intersection point with the clipping window, we calculate the value of the dot product. Let be a point on the clipping plane . Calculate \mathbf n \cdot (\mathbf p(t) - \mathbf p_E) : * if 0, vector pointed away from interior. Here 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.

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 \mathbf p(t) = t \mathbf p_1 + (1 - t) \mathbf p_0 where 0 \leq t \leq 1 . Now to find the intersection point with the clipping window, we calculate the value of the dot product. Let be a point on the clipping plane . Calculate \mathbf n \cdot (\mathbf p(t) - \mathbf p_E) : if 0, vector pointed away from interior. Here 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.

Notes

See also

Algorithms used for the same purpose: Cohen–Sutherland algorithm Liang–Barsky algorithm Nicholl–Lee–Nicholl algorithm Fast clipping References in other media: Tron: Uprising

References

Mike Cyrus, Jay Beck. "Generalized two- and three-dimensional clipping". Computers & Graphics, 1978: 23–28. James D. Foley. Computer graphics: principles and practice. Addison-Wesley Professional, 1996. p. 117.

External links

https://web.archive.org/web/20101203041134/http://cs1.bradley.edu/public/jcm/cs535CyrusBeck.html https://web.archive.org/web/20110725233122/http://softsurfer.com/Archive/algorithm_0111/algorithm_0111.htm

Text derived from https://en.wikipedia.org/w/index.php?oldid=1321323733 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

Extracted from the cited revision's reference blocks; absent citations are not invented.