HOME

TheInfoList



OR:

In
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
, the Cyrus–Beck algorithm is a generalized
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
for line clipping. It was designed to be more efficient than the
Cohen–Sutherland algorithm In computer graphics, the Cohen–Sutherland algorithm is an algorithm used for line clipping. The algorithm divides a two-dimensional space into 9 regions and then efficiently determines the lines and portions of lines that are visible in the cen ...
, which uses repetitive clipping."Clipping" (presentation)
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 In mathematics, a parametric equation defines a group of quantities as functions of one or more independent variables called parameters. Parametric equations are commonly used to express the coordinates of the points that make up a geometric obj ...
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 In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an algebra ...
. Let be a point on the clipping plane . Calculate \mathbf n \cdot (\mathbf p(t) - \mathbf p_E): * if < 0, vector pointed towards interior; * if = 0, vector pointed parallel to plane containing ; * 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 In computer graphics, the Cohen–Sutherland algorithm is an algorithm used for line clipping. The algorithm divides a two-dimensional space into 9 regions and then efficiently determines the lines and portions of lines that are visible in the cen ...
* Liang–Barsky algorithm * Nicholl–Lee–Nicholl algorithm *
Fast clipping In computer graphics, line clipping is the process of removing ( clipping) lines or portions of lines outside an area of interest (a viewport or view volume). Typically, any part of a line which is outside of the viewing area is removed. There ...
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 Line clipping algorithms {{compu-graphics-stub