On-Line Computer Graphics Notes
If we are given a frame in three-dimensional space we know how to define a local coordinate system with respect to the frame. However, given a set of points in three-dimensional space, we can also define a local coordinate system with respect to the these points. These coordinate systems are called barycentric coordinates and are discussed in these notes.
For a postscript version of these notes look here.
What are Barycentric Coordinates?
Consider a set of points ,
, ...,
and consider
the set of all affine combinations
taken from these points. That is
all points
that can be written as
for some
This set of points forms an affine space, and the coordinates
are called the barycentric coordinates of the points of the space.
These coordinates system are frequently quite useful, and the interested student will notice that they are used extensively in working with triangles. In many cases (e.g. on a line, as shown below), this barycentric parameterization is exactly the parameterization that we usually use.
Example -- Point on a Line Segment
To give a simple example of barycentric coordinates, consider two
points and
in the plane. If
and
are scalars such that
, then the point
defined by
is a point on the line that passes through and
. If
then the point
is on the line
segment joining
and
. The following figure shows an
example of a line and three points
,
and
. These
points were generated using the following
s:
Example -- Point in a Triangle
To give a slightly more complex
example of barycentric coordinates, consider three points
,
,
in the plane. If
,
,
are scalars such that
, then
the point
defined by
is a point on the plane of the triangle formed by ,
,
. The point is within the triangle
if
. If any of the
's
is less than zero or greater than one, the point
is outside the
triangle. If any of the
's is zero, we reduce to the example
above and note that
is on one of the lines joining the vertices of
the triangle. The following figure shows an example of such a triangle and
three points
,
and
, these points were calculated
using the following
's:
Frames and Barycentric Coordinates
There is a natural way to convert the local coordinates of a frame to
barycentric coordinates for a certain set of points. Suppose we are
given a frame
for an affine space
. Then we can write any point
in the space uniquely as
where are the local coordinates of the point
with respect to the frame
.
If we define the points
by
(i.e., the origin
of the frame and the points obtained by adding the coordinate vectors
to the origin)
and define to be
then we can see that can be written as
or equivalently, in an affine way as,
where
In this form, the values are
barycentric coordinates of
relative to the points
How can Vectors be Represented?
Following the above methods, we can also express the vectors of an
affine space in terms of the points.
In this case, if we are given the frame
then for any vector
, we
can write
as
for some constants
(since the vectors of the frame are assumed to be
linear independent). Now, if we define
If we define the points by
then
or equivalently, in an affine way as,
where now we have that
.
Summary
Barycentric coordinates are another important method of introducing coordinates into an affine space. If the coordinates sum to one, they represent a point ; if the coordinates sum to zero, they represent a vector.
This document maintained by
Ken Joy
All contents copyright (c) 1996, 1997 |
![]() |