Education: Barycentric coordinates computation in homogeneous coordinates

  • Authors:
  • Vaclav Skala

  • Affiliations:
  • Department of Computer Science and Engineering, Faculty of Applied Sciences, University of West Bohemia, Plzen, Czech Republic

  • Venue:
  • Computers and Graphics
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Homogeneous coordinates are often used in computer graphics and computer vision applications especially for the representation of geometric transformations. The homogeneous coordinates enable us to represent translation, rotation, scaling and projection operations in a unique way and handle them properly. Today's graphics hardware based on GPU offers a very high computational power using pixel and fragment shaders not only for the processing of graphical elements, but also for the general computation using GPU as well. It is well known that points, triangles and strips of triangles are mostly used in computer graphics processing. Generally, triangles and tetrahedra are mostly represented by vertices. Several tests like ''point inside...'' or ''intersection of...'' are very often used in applications. On the other hand, barycentric coordinates in E^2 or E^3 can be used to implement such tests, too. Nevertheless, in both cases division operations are used that potentially lead to the instability of algorithms. The main objective of this paper is to show that if the vertices of the given polygon and/or a point itself are given in homogeneous coordinates the barycentric coordinates can be computed directly without transferring them from the homogeneous [w1] to the Euclidean coordinates. Instead of solving a linear system of equations, the cross-product can be used and the division operation is not needed. This is quite convenient approach for GPU computation.