U.S. patent application number 09/057787 was filed with the patent office on 2002-01-03 for method for progressively constructing morphs.
Invention is credited to TRIKA, SANJEEV N..
Application Number | 20020000996 09/057787 |
Document ID | / |
Family ID | 22012767 |
Filed Date | 2002-01-03 |
United States Patent
Application |
20020000996 |
Kind Code |
A1 |
TRIKA, SANJEEV N. |
January 3, 2002 |
METHOD FOR PROGRESSIVELY CONSTRUCTING MORPHS
Abstract
Morphing between two-dimensional or three-dimensional computer
graphic models is accomplished by reducing given models from full
resolution to low resolution ones between which the morph can be
constructed either trivially or with simple user interaction, and
then refining the morph using local searches as the two models are
progressively refined back to full resolution.
Inventors: |
TRIKA, SANJEEV N.;
(HILLSBORO, OR) |
Correspondence
Address: |
STEVEN P SKABRAT
INTEL CORPORATION
BLAKELY SOKOLOFF TAYLOR & ZAFMAN
12400 WILSHIRE BOULEVARD 7TH FLOOR
LOS ANGELES
CA
90025
|
Family ID: |
22012767 |
Appl. No.: |
09/057787 |
Filed: |
April 8, 1998 |
Current U.S.
Class: |
345/629 |
Current CPC
Class: |
G06T 13/00 20130101;
G06T 2210/44 20130101 |
Class at
Publication: |
345/629 |
International
Class: |
G06T 011/60 |
Claims
What is claimed is:
1. A method of constructing morphs between a first model having a
first resolution and a second model having a second resolution
comprising: (a) determining a first morph between the first model
and the second model; (b) increasing resolution of at least one of
the models; and (c) determining a subsequent morph between the
first model and the second model.
2. The method of claim 1, further comprising reducing resolution of
at least one of the first model and the second model before
(a).
3. The method of claim 2, wherein a reduced resolution of the first
model is a lowest resolution for the first model.
4. The method of claim 2, wherein a reduced resolution of the
second model is a lowest resolution for the second model.
5. The method of claim 2, further comprising repeating (b) and (c)
until the first model is at the first resolution.
6. The method of claim 2, further comprising repeating (b) and (c)
until the second model is at the second resolution.
7. The method of claim 1, further comprising converting the first
and second models to progressive models before (a).
8. The method of claim 1, wherein each of the first and second
models comprise a two dimensional progressive polygon model.
9. The method of claim 1, wherein each of the first and second
models comprise a three dimensional progressive mesh model.
10. The method of claim 1, wherein (b) comprises increasing
resolution by at least one vertex.
11. The method of claim 1 0, wherein increasing by at least one
vertex comprises increasing resolution by more than one vertex.
12. An apparatus for constructing morphs between a first model
having a first resolution and a second model having a second
resolution comprising: a processing unit for executing programming
instructions; and a storage medium having stored therein a
plurality of programming instructions to be executed by the
processing unit, wherein when executed, the plurality of
programming instructions determine a first morph between the first
model and the second model; increase resolution of at least one of
the models; and determine a subsequent morph between the first
model and the second model.
13. The apparatus of claim 12, wherein the programming instructions
further comprise instructions to reduce resolution of at least one
of the first model and the second model before determining a first
morph.
14. The apparatus of claim 13, wherein a reduced resolution of the
first model is a lowest resolution for the first model.
15. The apparatus of claim 13, wherein a reduced resolution of the
second model is a lowest resolution for the second model.
16. The apparatus of claim 13, wherein the programming instructions
further comprise instructions to repeat increasing resolution and
determining a subsequent morph until the first model is at the
first resolution and the second model is at the second
resolution.
17. The apparatus of claim 13, wherein the programming instructions
further comprise instructions to convert the first and second
models to progressive models before determining a first morph.
18. The apparatus of claim 12, wherein each of the first and second
models are two dimensional progressive polygon models.
19. The apparatus of claim 12, wherein each of the first and second
models are three dimensional progressive mesh models.
20. The apparatus of claim 12, wherein the programming instructions
to increase resolution comprise programming instructions to
increase resolution by at least one vertex.
21. The apparatus of claim 20, wherein the programming instructions
to increase resolution comprise programming instructions to
increase resolution by more than one vertex.
22. A machine readable medium having stored therein a plurality of
machine readable instructions executable by a processor, the
machine readable instructions comprising instructions to construct
morphs between a first model having a first number of vertices and
a second model having a second number of vertices by reducing the
number of vertices of at least one of the first model and the
second model, determining a first morph operation between the first
model and the second model; increasing the number of vertices of at
least one of the models; and determining a subsequent morph
operation between the first model and the second model.
23. The machine readable medium of claim 22, wherein the machine
readable instructions further comprise instructions to repeat
increasing resolution and determining a subsequent morph until the
first model is at the first number of vertices and the second model
is at the second number of vertices.
24. The machine readable medium of claim 22, wherein the machine
readable instructions further comprise instructions to convert the
first and second models to progressive models before determining
the first morph.
25. The machine readable medium of claim 22, wherein the first
model is a two dimensional progressive polygon model and the number
of vertices of the first model after the reducing is three.
26. The machine readable medium of claim 22, wherein the second
model is a two dimensional progressive polygon model and the number
of vertices of the second model after the reducing is three.
27. The machine readable medium of claim 22, wherein the first
model is a three dimensional progressive mesh model and the number
of vertices of the first model after the reducing is four.
28. The machine readable medium of claim 22, wherein the second
model is a three dimensional progressive mesh model and the number
of vertices of the second model after the reducing is four.
29. The machine readable medium of claim 22, wherein the
programming instructions to increase the number of vertices
comprise programming instructions to increase the number of
vertices by more than one vertex.
Description
BACKGROUND
[0001] 1. Field
[0002] The present invention relates generally to computer graphics
and, more specifically, to shape transformation of two-dimensional
and three-dimensional objects on a computer display.
[0003] 2. Description of Related Art
[0004] In recent years, image processing techniques, popularly
known as "morphing," have achieved widespread use in the
entertainment industry. Morphing involves the transformation of one
image into another image or from one model into another model.
Morphing operations can be performed to transform one
two-dimensional (2-D) image into another 2-D image, to transform
one 2-D model into another 2-D model, or to transform one
three-dimensional (3-D) model into another 3-D model. These
techniques specify some operation that maps points from one image
or model onto points of the other image or model, and then
simultaneously interpolate the color and position of corresponding
points to generate intermediate images or models. When viewed in
sequence, these intermediate images produce an animation of the
first image or model changing into the second image or model.
Variations of these techniques have been used to create special
effects for television commercials, music videos, movies, and web
pages on the World Wide Web.
[0005] Morphs are typically restricted to 2-D images, primarily
because a realistic transition between two-dimensional (2-D) and
three-dimensional (3-D) models is difficult to specify. However,
such specifications might be valuable because the resulting morph
can be viewed from arbitrary viewpoints in arbitrary settings, can
be arbitrarily scaled and placed, and provides greater compression
and realism.
[0006] There are at least two existing approaches for defining a
morph between two 3-D models, each of which may be adapted for 2-D
models. The first approach is described in "Shape Transformation
For Polyhedral Objects", by James R. Kent, et al., Computer
Graphics, Vol. 26, No. 2, July 1992. Kent, et al. describes a
process that, given two 3-D polyhedral models, generates two new
models that have the same or similar shape as the original ones,
but that allow transformations from one to another to be easily
computed. This process assumes the morphing of star-shaped objects
only. If the objects are not star-shaped, then externally supplied
information is employed to divide the non-star-shaped objects into
several star-shapes objects for morphing. Star-shaped refers to
models for which at least one interior point p exists such that any
semi-infinite ray originating at p intersects the surface of the
object at exactly one point. The second approach is discussed in
"Solid-Interpolating Deformations: Construction and Animation of
PIPs", by Anil Kaul and Jarek Rossignac, Eurographics '91,
Proceedings of the European Computer Graphics Conference, September
1991, pp. 493-505. Kaul and Rossignac describe an process using an
animation primitive called a Parameterized Interpolating Polyhedron
(PIP), which may be animated on widely used graphic hardware
because a PIP is a smoothly varying family of polyhedra
representations bounded by faces that evolve with time. The faces
have constant orientation and vertices that each move on a straight
line between the vertex of the initial shape and a vertex of the
final one. This process uses Minkowski sum operations for computing
the PIPs.
[0007] There are several drawbacks to the above approaches. Both
approaches exhibit a quadratic computational complexity, so they
are impractical for some models. Furthermore, if two models to be
morphed have N.sub.1 and N.sub.2 vertices, respectively, both
approaches use O(N.sub.1*N.sub.2) storage units for storing the
intermediate representations. Hence, as the models grow more
complex, the storage used becomes very large. With the existing
approaches, content developers cannot easily adjust or guide the
construction of the morph at low resolutions. Further, content
developers do not have control over the morphing process through
exposable parameters or alternative sub-algorithms.
[0008] Thus, an improved method of morphing 2-D and 3-D models is
desired that reduces the deficiencies and limitations of the prior
art.
SUMMARY
[0009] An embodiment of the present invention is a method of
constructing morphs between a first model having a first resolution
and a second model having a second resolution. The method includes
determining a first morph between the first model and the second
model, increasing resolution of at least one of the first and
second models, and determining a subsequent morph between the first
model and the second model.
BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The features and advantages of the present invention will
become apparent from the following detailed description of the
present invention in which:
[0011] FIGS. 1a and 1b are example illustrations of low-resolution
two-dimensional 2-D models;
[0012] FIG. 2a is an example illustration of a 2-D model at a
higher resolution than that shown in FIG. 1a;
[0013] FIG. 2b is an example illustration showing the 2-D model of
FIG. 1b with a fake vertex added for morphing to the model of FIG.
2a;
[0014] FIG. 3 is a diagram of two example polygons reduced for
generation of progressively constructed morphs according to an
embodiment of the present invention;
[0015] FIG. 4 is a diagram of a process of progressively
constructing morphs according to an embodiment of the present
invention;
[0016] FIG. 5 is a flow diagram of a process for progressively
constructing morphs according to an embodiment of the present
invention; and
[0017] FIG. 6 is a diagram illustrating a sample computer system
suitable to be programmed a method for progressively constructing
morphs in accordance with embodiments of the present invention.
DETAILED DESCRIPTION
[0018] In the following description, various aspects of the present
invention will be described. However, it will be apparent to those
skilled in the art that the present invention may be practiced with
only some or all aspects of the present invention. For purposes of
explanation, specific numbers, examples and configurations are set
forth in order to provide a thorough understanding of the present
invention. However, it will also be apparent to one skilled in the
art that the present invention may be practiced without the
specific details. In other instances, well-known features are
omitted or simplified in order not to obscure the present
invention.
[0019] An embodiment of the present invention specifies a procedure
for defining and refining a morph between two three-dimensional
(3-D) models. The advantage of this embodiment is that it builds
the morph progressively, e. g., the morph is built at a low model
resolution and refined iteratively as the resolution of the models
is increased. Resolution in this regard is measured in terms of
numbers of vertices of the models, with models having more vertices
being of a higher resolution and models having less vertices being
of a lower resolution. This provides several advantages over the
existing approaches. Embodiments of the present invention employ
less computation than existing morph generating methods. Given two
models as progressive meshes, the computation used is linear in the
number of vertices, as opposed to quadratic for existing
approaches. The morphs constructed by embodiments of the present
invention are more compact to represent than those constructed by
existing approaches. If the two models have N.sub.1 and N.sub.2
vertices, respectively, the morph constructed by the present
invention uses O(N.sub.1+N.sub.2) storage space, as opposed to
O(N.sub.1*N.sub.2) storage space for other approaches. Content
developers using embodiments of the present invention may fine-tune
and guide construction of the morph at desired resolutions
(typically low). This is not possible with existing approaches. The
morph may also be generated while the input models are being loaded
from a storage or communications medium (such as a disk, the
Internet, an intranet, and the like). Content developers may obtain
even more control over the morphing process with embodiments of the
present invention by choosing several exposable parameters and
processes. For example, a choice of different progressive mesh
generators can result in different morphs between the same two high
resolution models. Finally, the present invention can handle
non-star-shaped model geometries.
[0020] Embodiments of the present invention are premised on two
observations. First, whereas it is difficult to determine a morph
between two models represented at a high resolution, the morph is
relatively easy to construct at a lower resolution of the two
models. Second, if either of the two models is refined by adding
more detail, the morph may be refined at the same time by a local
search for the correct mapping of vertices between the models.
[0021] These concepts may be illustrated with a 2-D example,
although the concepts are also valid for 3-D models. Consider a
morph between the simplified human image shown in FIG. 1a and the
simplified dragon image in FIG. 1b. The models shown in FIGS. 1a
and 1b have a low resolution and may be represented in a small
amount of storage. Assume that the vertices 1 and 2 of FIG. 1a
match vertices 3 and 4 of FIG. 1b, respectively, in a predetermined
morph. Now, assume that the human model of FIG. 1a is refined by
adding a new vertex 5, deleting the edge between vertices 1 and 2,
and connecting the new vertex as shown in FIG. 2a by adding edges
between vertices 1 and 5 and between 5 and 2. The morphing system
now determines a mapping for the added vertex 5 between the two
models. This is done in embodiments of the present invention by
examining the neighboring vertices and edges of the new vertex.
Since the morph preserves the overall topology between the two
objects (e.g., the human object and the dragon object), a new fake
vertex 6 is inserted in the dragon model of FIG. 2b, between the
dragon's vertices 3 and 4, and the connectivity of the vertices is
updated as shown in FIG. 2b by adding edges between vertices 3 and
6 and between 6 and 4 and deleting the edge between vertices 3 and
4. Note that these operations include computation in the
neighborhood of vertex 6 and the mapping between other parts of the
models (such as the legs, hands, etc.) is not re-evaluated.
[0022] Embodiments of the present invention reduce given models
from high resolution to low resolution ones between which the morph
may be constructed either without user control or with simple user
interaction, and then refine the morph using local searches as the
two models are progressively refined back to full resolution.
[0023] FIG. 3 is a diagram of two example polygons reduced for
generation of progressively constructed morphs according to an
embodiment of the present invention. This example shows progressive
polygons in 2-D for simplicity, although the example could be
expanded to progressive meshes in 3-D. Initially, polygon A(m) 10
has m vertices and polygon B(n) 12 has n vertices. Hence, polygon
A(m) may be represented as a set of vertices
V.sub.m={X.sub.m1,Y.sub.m1,X.sub.m2,Y.sub.m2, . . .
X.sub.mm,Y.sub.mm}, and polygon B(n) can be represented as a set of
vertices V.sub.n={X.sub.n1,Y.sub.n1,X.sub.n2Y.sub.n2 . . .
X.sub.nn,Y.sub.nn}. To construct morphs between A(m) and B(n), an
embodiment of the present invention reduces A(m) and B(n) to a low
resolution. The reduction for 2-D models is done by repeatedly
finding the smallest edge in a polygon and removing it. For
example, in FIG. 3, a vertex is removed from A(m) 10 to form A(m-1)
14, and a vertex is removed from B(n) 12 to form B(n-1) 16. In two
dimensions, the lowest resolution model of a polygon is a triangle
(having only three vertices). In three dimensions, the lowest
resolution model is a tetrahedron (having four vertices). In the
example of FIG. 3, A(3) 18 and B(3) 20 are the lowest resolution
polygons. In an embodiment of the present invention, the reduction
is performed for 3-D models according to the progressive mesh
representation and associated algorithms described in "Progressive
Meshes", by Hughes Hoppe, Computer Graphics SIGGRAPH'96
Proceedings, pp. 99-108, 1996, and "View-Dependent Refinement of
Progressive Meshes", by Hughes Hoppe, 1997, although, of course,
the invention is not limited in scope in this respect.
[0024] When both polygons are represented at the lowest resolution
(e. g., A(3) and B(3)), a morph (morph1 22) is determined between
the reduced polygons. FIG. 4 is a diagram of a process of
progressively constructing morphs according to an embodiment of the
present invention. The resolution of one of the polygons (either A
or B) is increased by one vertex to form A(4) or B(4). In the
example of FIG. 4, a vertex is first added to the A polygon to form
A(4) 24. A new morph (morph2 26) is then computed for the
transformation A(4).fwdarw.B(3) or A(3).fwdarw.B(4). In the example
of FIG. 4, the morph is for A(4).fwdarw.B(3). The resolution of the
polygon not increased in the preceding step is then incremented. In
the example of FIG. 4, a vertex is added to the B polygon to form
B(4)28. A new morph (morph3 30) is then computed for the
transformation A(4).fwdarw.B(4). This process is repeated until
both polygons are back to their original, highest resolutions of
A(m) 10 and B(n) 12 and a final morph is computed (morph17 32). All
computed intermediate morphs may be saved, although the invention
is not limited in this respect.
[0025] FIG. 5 is a flow diagram of a process for progressively
constructing morphs according to an embodiment of the present
invention. At block 100, if the two models are not in a progressive
format, then the models may be converted to a progressive format.
Given two progressive models A and B, at block 101, the resolution
of each model may be reduced. In one embodiment, for 2-D models,
the models are reduced as described above, and for 3-D models, the
models are reduced as taught by Hoppe, although the invention is
not limited in scope in this respect. For example, other reduction
algorithms may be employed. The level of reduction may be to three
vertices (for 2-D models) or four vertices (for 3-D models), or to
any intermediate number of vertices between three and the original
number of vertices (for 2-D models) or four and the original number
of vertices (for 3-D models). Next, at block 102, a morph is
computed between low resolution versions of A and B. In one
embodiment, the morph is computed according to the teachings
disclosed in "Shape Transformation For Polyhedral Objects", by
James R. Kent, et al., Computer Graphics, Vol. 26, No. 2, July
1992. In other embodiments, alternate morph computation processes
may be used. At block 104, the resolution of A or B or both A and B
is increased. The resolution may be increased by only one vertex,
or any number of vertices, such as selected by a user, for example.
Next, at block 106 the morph between A and B is re-computed. If the
models are at their highest resolutions at decision block 108, then
path 110 is taken and processing is complete at block 112.
Otherwise, further processing may be employed, and path 114 is
taken back to block 104, where the resolution of the model A or B
is increased.
[0026] In an embodiment of the present invention, generating a
morph between two objects at the lowest resolution generally
follows the process outlined by Kent, et. al for star-shaped
objects. The process disclosed below is used for explanatory
purposes. Other alternative processes and other variations of the
Kent, et. al process may also be employed by those skilled in the
art to generate a morph with an embodiment of a method in
accordance with the present invention, although the invention is
not limited in scope in this respect. The process disclosed by
Kent, et. al, is applicable to 2-D models, because triangles are
star-shaped. The Kent, et. al process is also applicable to 3-D
models because tetrahedrons are star shaped. This particular
embodiment of the present invention refines the Kent, et. al
process for progressive morphing.
[0027] In the case of 2-D models, in one embodiment, a data
structure representation of a morph between two polygons A and B
consists of five elements. The first element comprises an array of
real vertices of polygon A, denoted MORPH.realA. The second element
comprises an array of real vertices of polygon B, denoted
MORPH.realB. The third element comprises an array of fake vertices
of polygon A, corresponding to real vertices of B, denoted
MORPH.fakeA. The fourth element comprises an array of fake vertices
of polygon B, corresponding to real vertices of A, denoted
MORPH.fakeB. The fifth element comprises an array of tuples, the
first element of which specifies which array to index into (realA
or fakeA), and the second element of which comprises an index into
the specified array. This element is denoted MORPH.vert_arr. The
i'th element of the realA array corresponds to i'th element of the
fakeB array. The i'th element of the fakeA array corresponds to the
i'th element of the realB array. It will, of course, be appreciated
that the invention is not limited in scope to employing this
particular data structure.
[0028] These five elements may be used in the pseudo-code as shown
below in Table I to morph between two triangles, although the
invention is not limited in scope in this respect. The process is
based on the technique presented by Kent et al.
1 TABLE I .COPYRGT. 1998 Intel Corporation Process InitMorph2D
(Triangle A, Triangle B) Let cA = center of A Let cB = center of B
Let MORPH = empty morph /* Initialize MORPH.realA and MORPH.fakeB
*/ For I = 1 to 3 do Let MORPH.realA [I] = A.v[I] Let r = ray from
cA towards A.v[I] and beyond Translate r to start at cB, instead of
cA Let MORPH.fakeB [I] = Intersection of r and B End for /*
Initialize MORPH.realB and MORPH.fakeA */ For I = 1 to 3 do Let
MORPH.realB [I] = B.v[I] Let r = ray from cB towards B.v[I] and
beyond Translate r to start at cA, instead of cB Let MORPH.fakeA
[I] = Intersection of r and A End for /* Initialize MORPH.vert_arr
and MORPH.connectivity */ For I = 1 to 3 do Store (real, I) in
MORPH.vert_arr Store (fake, I) in MORPH.vert_arr End for Reorder
elements in MORPH.vert_arr so that they are in order (i.e.,
MORPH.vert_arr[i] and MORPH.vert_arr[i + 1] are directly connected)
Return (MORPH)
[0029] In the case of 3-D models, a representation of a morph
between two meshes A and B consists of six elements. The first
element comprises an array of real vertices of mesh A, denoted
MORPH.realA. The second element comprises an array of real vertices
of mesh B, denoted MORPH.realB. The third element comprises an
array of fake vertices of mesh A, denoted MORPH.fakeA. The fourth
element comprises an array of fake vertices of mesh B, denoted
MORPH.fakeB. The fourth element comprises an array of tuples, the
first element of which specifies which array to index into (realA
or fakeA), and the second element of which comprises an index into
the specified array. This element is denoted MORPH.vert_arr. The
i'th element of the realA array corresponds to i'th element of the
fakeB array. The i'th element of the fakeA array corresponds to the
i'th element of the realB array. The sixth element is an array of
indexed triangles. An indexed triangle comprises a list of three
integers that are indices into the MORPH.vert_arr array. This
element is denoted MORPH.connectivity.
[0030] Instead of using Kent, et. al's scheme for morphing between
tetrahedrons, one embodiment of the present invention may be the
following scheme. However, the process disclosed by Kent, et. al,
could also be used, with modifications to the MORPH data structure
described above, for example. One skilled in the art will recognize
that other processes may also be used to generate a morph for a 3-D
models consistent with other aspects of the present invention. The
scheme disclosed below (corresponding to block 106) uses a
straightforward mechanism to morph between the given tetrahedrons A
and B. It tries all combinations of associating vertices of A with
vertices of B, and picks the "best" combination, as measured by a
Quality() function of the morph.
2 TABLE II .COPYRGT. 1998 Intel Corporation Process InitMorph3D
(Tetrahedron A, Tetrahedron B) Let BestMorph = empty morph Let
CurMorph = empty morph Let BestMorphQuality = -Infinity For I = 1
to 4 do Let CurMorph.realA [I] = A.v[I] Let CurMorph.realB [I] =
B.v[I] Let CurMorph.vert_arr [I] = (real, I) Let CurMorph.vert_arr
[I + 4] = (fake, I) Let CurMorph.connectivity [I] = A.triangle [I]
End for For I = 1 to 4 do Let (a, b, c) = B.triangle [I] Let ia =
index of (fake, a) in MORPH.vert_arr Let ib = index of (fake, b) in
MORPH.vert_arr Let ic = index of (fake, c) in MORPH.vert_arr Add
(ia, ib, ic) to CurMorph.connectivity End for For b1 = 1 to 4 do
For b2 = 1 to 4 do For b3 = 1 to 4 do For b4 = 1 to 4 do If (b1,
b2, b3, b4) are distinct Let CurMorph.fakeB [1] = B.v[b1] Let
CurMorph.fakeB [2] = B.v[b2] Let CurMorph.fakeB [3] = B.v[b3] Let
CurMorph.fakeB [4] = B.v[b4] Let CurMorph.fakeA [b1] = A.v[1] Let
CurMorph.fakeA [b2] = A.v[2] Let CurMorph.fakeA [b3] = A.v[3] Let
CurMorph.fakeA [b4] = A.v[4] If (CurMorph.Quality() >
BestMorphQuality) BestMorph = CurMorph BestMorphQuality =
CurMorph.Quality () End if End if End for End for End for End for
Return (BestMorph)
[0031] Table III illustrates an example morph quality function,
such as is used in CurMorph above. However, other quality functions
may also be used to better fit a given user's application.
3TABLE III .COPYRGT. 1998 Intel Corporation Process
Morph3d.Quality() For I = 1 to 4 do Let d[I] = Distance squared
from Morph3d.realA (I) to Morph3d.fakeB (I) End for Let TB =
{B.triangle (1), B.triangle (2), B.Triangle (3), B.triangle (4) }
Let T_MappedA = {} For I = 1 to 4 do Let tA = Morph3d.connectivity
(I) Let tA_map1 = Morph3d.fakeB [tA [1]] Let tA_map2 =
Morph3d.fakeB [tA [2]] Let tA_map3 = Morph3d.fakeB [tA [3]] Let
tA_map = indexed triangle (tB1, tB2, tB3) Add tA_map to T_MappedA
End for If (TB != T_MappedA) Return (-Infinity) End if Return (d[1]
+ d[2] + d[3] + d[4]) * -1
[0032] Table IV illustrates an embodiment of a process for the 2-D
case for modifying the previously described MORPH data structure
embodiment to match the topology changes.
4TABLE IV .COPYRGT. 1998 Intel Corporation Process Modify 2-D Morph
(ProgPgon A, ProgPgon B, MORPH2D CurMorph) /* Initialize parameters
specifying how to increase resolution of A */ Let v = new vertex to
add to A, in order to increase A's resolution Let pos = index in
A.vertices (and CurMorph.realA) where to insert nv /* Changes
required to CurMorph.realA: */ CurMorph.realA.insert_at (pos, v) /*
Changes required to CurMorph.realB: none */ /* Changes required to
CurMorph.fakeA: */ Let nvr = CurMorph.realA.size () Let old_nvr =
nvr - 1 Let posM1 = 1 + ((pos - 2 + nvr) MOD nvr) /* position
before pos */ Let posP1 = (pos MOD nvr) + 1 /* position after pos
*/ Let vrp1 = CurMorph.realA [posP1] Let vrm1 = CurMorph.realA
[posM1] Let Ipos = index of (real, pos) in CurMorph.vert_arr /*
position of vr in vert_arr */ Let IposM1 = index of (real, posM1)
in CurMorph.vert_arr Let nf = (Ipos - IposM1 - I + nvr) MOD nvr /*
# fake verts on removed edge */ Let NT_before = 0 /* #fake verts
mapped to new edge between vrm and v */ Let d_orig = distance
(vrp1, vrm1) Let dv_vrm1 = distance (v, vrm1) Let dv_vrp1 = dist
(v, vrp1) Let d_new = dv_vrm1 + dv_vrp1 Let r = dv_vrm1/d_new For i
= 1 to nf do Let idx_fake = 1 + ((Ipos - 1 + i) MOD nvr) /* Usually
(Ipos + i) */ Let (which_A, which_fake) = CurMorph.vert_arr
[idx_fake] Let vf = CurMorph.fakeA [which_fake] Let d1 = distance
(vf, vrm1) Let ratio = d1/d_orig Let new_fake.sub.`3d = d_new *
ratio if (new_fake_d < dv_vrm1) Let new_vf = point at distance
new_fake_d from vrm1,towards v NT_before = NT_before + 1 else
new_fake_d = new_fake_d - dv_vrm1 Let new_vf = point at distance
new_fake_d from v, towards vrp1 end if CurMorph.fakeA [which_fake]
= new_vf End for /* Changes required to CurMorph.fakeB: */ Let
old_posM1 = 1 + ((pos - 2 + old_nvr) MOD old_nvr) /* position
before pos */ Let fvr = CurMorph.fakeB [pos] Let fvrm1 =
CurMorph.fakeB [oldposM1] Let dtot = distance from fvrm1 to fvr on
B Let d = r * dtot Let new_fake_vertex = traverse B from fvrm1
towards fvr, stopping at distance d CurMorph.fakeB.insert_at (pos,
new_fake_vertex) /* Changes required to CurMorph.vert_arr: */ For i
= 1 to CurMorph.vert_arr.size () do Let (whicharr, j) =
CurMorph.vert_arr [i] if (j >= pos) and (whicharr == real)
CurMorph.vert_arr [j] = (real, j+1) End if End loop
CurMorph.vert_arr.insert_at (IposM1 + NT_before, (real, pos))
[0033] Table V illustrates an embodiment of a process for the 3-D
case for modifying the previously described MORPH data structure
embodiment to match the topology changes.
5 TABLE V .COPYRGT. 1998 Intel Corporation Process Modify 3-D Morph
(ProgMesh A, ProgMesh B, MORPH3D CurMorph) /* Initialize parameters
specifying how to increase resolution of mesh A */ Let vts = index
of the vertex to split in mesh A, to increase A's resolution Let nv
= new vertex to add to mesh A, in order to increase A's resolution
Let add_list = {triangles to add to mesh A, in order to increase
A's resolution} Let del_list = {triangles to remove from mesh A,
when increasing A's resolution} /* Changes required to
CurMorph.realA: */ CurMorph.realA.addlast (nv) /* Changes required
to CurMorph.realB: none */ /* Changes required to CurMorph.fakeA:
none */ /* Changes required to CurMorph.fakeB: */ Let v =
CurMorph.fakeB [vts] CurMorph.fakeB.addlast (v) /* Changes required
to CurMorph.vert_arr: */ CurMorph. vert_arr. addlast ((real,
size(CurMorph.realA))) /* Changes required to
CurMorph.connectivity: */ Let n = del_list.size() For i = 1 to n do
Let (a, b, c) = del_list [i] Let (d, e, f) = add_list [i] Let ia =
index of (real, a) in CurMorph.vert_arr Let ib = index of (real, b)
in CurMorph.vert_arr Let ic = index of (real, c) in
CurMorph.vert_arr Let id = index of (real, d) in CurMorph.vert_arr
Let ie = index of (real, e) in CurMorph.vert_arr Let if = index of
(real, f) in CurMorph.vert_arr Let it = index of (ia, ib, ic) in
CurMorph.connectivity CurMorph.connectivity [it] = (id, ie, if) End
for For i = n+1 to add_list.size() do Let (d, e, f) = add list [i]
Let id = index of (real, d) in CurMorph.vert_arr Let ie = index of
(real, e) in CurMorph.vert_arr Let if = index of (real, f) in
CurMorph.vert_arr Add (id, ie, if) to CurMorph.connectivity End
for
[0034] Both of the modify processes shown may be used for the case
of increasing model A's resolution. Similar processes may be used
for the case of increasing model B's resolution.
[0035] FIG. 6 illustrates a sample computer system suitable to be
programmed with an embodiment of a method for the progressively
constructing a morph in accordance with the present invention.
Sample computer system 500 may be used to execute, for example, the
processing described above for the embodiments described in
connection with FIG. 5, for example. Sample computer system 500 is
representative of computer systems based on the PENTIUM.RTM.,
PENTIUM.RTM. Pro, and PENTIUM.RTM. II microprocessors available
from Intel Corporation, although other computer systems (including
personal computers (PCs) having other microprocessors) may also be
used. Sample computer system 500 includes microprocessor 502 and
cache memory 504 coupled to each other through processor bus 505.
Sample computer system 500 also includes high performance I/O bus
508 and standard I/O bus 518. Processor bus 505 and high
performance I/O bus 508 are bridged by host bridge 506, whereas
high performance I/O bus 508 and standard I/O bus 518 are bridged
by I/O bus bridge 510. Coupled to high performance I/O bus 508 are
main memory 512 and video memory 514. Coupled to video memory 514
is video display 516. Coupled to standard I/O bus 518 are mass
storage 520, and keyboard and pointing devices 522.
[0036] These elements perform their conventional functions well
known in the art. In particular, mass storage 520 may be used to
provide permanent storage for the executable instructions for an
embodiment of a method of progressively constructing a morph in
accordance with the invention, whereas main memory 512 may be used
to temporarily store the executable instructions of an embodiment
of a method of progressively constructing a morph in accordance
with the during execution by CPU 502.
[0037] While this invention has been described with reference to
illustrative embodiments, this description is not intended to be
construed in a limiting sense. Various modifications of the
illustrative embodiments, as well as other embodiments of the
invention, which are apparent to persons skilled in the art to
which the inventions pertains are deemed to lie within the spirit
and scope of the invention.
* * * * *