Cyrus–Beck algorithm

Cyrus–Beck algorithm

The Cyrus–Beck algorithm is a line clipping algorithm. It was designed to be more efficient than the Sutherland–Cohen algorithm which uses repetitive clipping [1]. Cyrus–Beck is a general algorithm and can be used with a convex polygon clipping window unlike Sutherland-Cohen that can be used only on a rectangular clipping area.

Here the parametric equation of a line in the view plane is:


\begin{align}
p(t) &=& tp_1 + (1-t)p_0\\
     &=& p_0 + t(p_1-p_0) 
\end{align}

where 0 \leq t \leq 1 .

Now to find intersection point with the clipping window we calculate value of dot product. Let pE be a point on the clipping plane E.

Calculate n\cdot (p(t)-p_E).

if > 0 vector pointed towards interior
if = 0 vector pointed parallel to plane containing p
if < 0 vector pointed away from interior

Here n stands for normal of the current clipping plane.

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

Contents

Notes

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

See also

Algorithms used for the same purpose:



Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Algoritmo de Cyrus-Beck — Ilustración del algoritmo de Cyrus Beck. El algoritmo de Cyrus Beck es un algoritmo de recorte de líneas y polígonos convexos. De forma similar al algoritmo de Cohen Sutherland también utiliza aristas extendidas. Se puede adaptar muy fácilmente… …   Wikipedia Español

  • Cohen–Sutherland algorithm — In computer graphics, the Cohen–Sutherland algorithm (named after Michael F. Cohen and Ivan Sutherland) is a line clipping algorithm. The algorithm divides a 2D space into 9 regions, of which only the middle part (viewport) is visible. In 1967,… …   Wikipedia

  • Line clipping — In computer graphics, line clipping is the process of removing lines or portions of lines outside of an area of interest. Typically, any line or part thereof which is outside of the viewing area is removed.There are two common algorithms for line …   Wikipedia

  • Список алгоритмов — Эта страница информационный список. Основная статья: Алгоритм Ниже приводится список алгоритмов, группированный по категориям. Более детальные сведения приводятся в списке структур данных и …   Википедия

  • Cohen-Sutherland — In computer graphics, the Cohen Sutherland algorithm is a line clipping algorithm. The algorithm divides a 2D space into 9 parts, of which only the middle part (viewport) is visible. The algorithmThe algorithm includes, excludes or partially… …   Wikipedia

  • Liang-Barsky — In computer graphics, the Liang Barsky algorithm is a line clipping algorithm. The Liang Barsky algorithm uses the parametric equation of a line and inequalities describing the range of the clipping box to determine the intersections between the… …   Wikipedia

  • Nicholl–Lee–Nicholl — The Nicholl Lee Nicholl algorithm is a fast line clipping algorithm that reduces the chances of clipping a single line segment multiple times, as may happen in the Cohen Sutherland algorithm. Description Using the Nicholl–Lee–Nicholl algorithm,… …   Wikipedia

  • Clipping (computer graphics) — Any procedure which identifies that portion of a picture which is either inside or outside a picture is referred to as a clipping algorithm or clipping. The region against which an object is to be clipped is called clipping window. Contents 1… …   Wikipedia

  • Algoritmo de Cohen-Sutherland — El algoritmo de Cohen Sutherland es un algoritmo de recorte de líneas usado en gráficos por computadora. Fue desarrollado por Danny Cohen e Ivan Sutherland en 1967. Contenido 1 Introducción 2 Funcionamiento 2.1 Códigos de frontera …   Wikipedia Español

  • Nicholl-Lee-Nicholl — is one of computer graphics line clipping algorithms. It uses symmetry to categorize endpoints into one of three regions (in the clip window, edge, and corner). Then according to endpoint category it checks several clip cases.For the point we… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”