Graphics Reference
In-Depth Information
The resultant interpolant is a basis function that has a graph that looks tentlike,
with the peak of the tent sitting above the vertex where the value is one.
If we add up all these basis functions, the result is the function that interpolates
the values 1, 1,
2
1
, 1 at all the vertices; this turns out to be the constant function 1.
Why? Because the barycentric coordinates of every point in every triangle sum
to one.
One might look at these tent-shaped functions and complain that they're
not very continuous in the sense that they are continuous but not differentiable.
Wouldn't it be nicer to use basis functions that looked like the ones in Figure 9.5?
It would, but it turns out to be more difficult to have both the smoothness property
and the property that the interpolant for the “all ones” set of values is the constant
function 1. We'll discuss this further in Chapter 22.
...
0
2
1
2 2
0
2
(a)
1
0.5
0
9.2.1.1 Terminology for Meshes
This section introduces a few terms that are useful in discussing meshes. First,
the vertices, edges, and faces of a mesh are all called simplices . Simplices come
in categories: A vertex is a 0-simplex, an edge is a 1-simplex, and a face is a
2-simplex. Simplices contain their boundaries, so a 2-simplex in a mesh contains
its three edges and a 1-simplex contains its two endpoints.
The star of a vertex (see Figure 9.6) is the set of triangles that contain that ver-
tex. More generally, the star of a simplex is the set of all simplices that contain it.
The boundary of the star of a vertex is called the link of the vertex. This is
useful in describing functions like the tent functions above: We can say that the
tent has value 1 at the vertex v , has nonzero values only on the star of v , and is
zeroonthelinkof v .
There's a notion of “distance” in a mesh based on edge paths between vertices:
The distance from v to w is the smallest number of edges in any chain of edges
from v to w . Thus, all the vertices in the link of v have a mesh distance of one
from v .
The sets of vertices at various distances from v have names as well. The 1-ring
is the set of vertices whose distance from v is one or less; the 2-ring is the set of
vertices whose distance from v is two or less, etc.
2
0
0
2 2
2 2
(b)
Figure 9.5: Basis functions for
(a) 2D and (b) 3D interpolations
that are smoother than the bary-
centric-interpolation functions.
9.2.2 Scanline Interpolation
Frequently in graphics we need to compute some value at each point of a triangle;
for example, we often compute an RGB color triple at each vertex of a trian-
gle, and then interpolate the results over the interior (perhaps because doing the
(a)
(b)
(c)
Figure 9.6: The star of a simplex. (a) The star of a vertex is the set of triangles containing
it, (b) the star of an edge is the two triangles containing it, and (c) the star of a triangle is
the triangle itself.
 
 
 
Search WWH ::




Custom Search