Tensor Product Volumes and Multivariate Methods

advertisement
TENSOR
PRODUCT
VOLUMES
AND MULTIVARIATE
METHODS
CAGD Presentation by Eric Yudin
June 27, 2012
MULTIVARIATE METHODS: OUTLINE
Introduction and Motivation
 Theory
 Practical Aspects
 Application: Free-form Deformation (FFD)

INTRODUCTION AND MOTIVATION
2
Until now we have discussed curves ( ) and
3
surfaces ( ) in space.
 Now we consider higher dimensional – so-called
“multivariate” objects in n , n  3

INTRODUCTION AND MOTIVATION
Examples
 Scalar or vector-valued physical fields
(temperature, pressure, etc. on a volume or
some other higher-dimensional object)
INTRODUCTION AND MOTIVATION
Examples
 Spatial or temporal variation of a surface (or
higher dimensions)
INTRODUCTION AND MOTIVATION
Examples
 Freeform Deformation
MULTIVARIATE METHODS: OUTLINE
Introduction and Motivation
 Theory
 Practical Aspects
 Application: Free-form Deformation (FFD)

THEORY – GENERAL FORM
Definition (21.1): The tensor product B-spline
function in three variables is called a trivariate Bspline function and has the form
T (u1 , u2 , u3 )   Pi1 ,i2 ,i3 Bi ,k ,t 1 (u1 ) Bi ,k
i1
i2
i3
1
1
2
2 ,t
2
(u2 ) Bi ,k ,t 3 (u3 )
3
3
It has variable ui, degree ki, and knot vector ti in
the ith dimension
THEORY – GENERAL FORM
Definition (21.1) (cont.): Generalization to
arbitrary dimension q:
 Determining the vector of polynomial degree in
each of the q dimensions, n, (?), forming q knot
vectors ti, i=1, …, q
q
 Let m=(u1, u2, …, uq) 
 Let i = (i1, i2, …, iq), where each ij, j=1, …, q 
 q-variate tensor product function:
T ( m )   ... PB
i i , k ,t 1 (u1 ) Bi , k ,t 2 (u2 ) Bi , k ,t 3 (u3 )...Bi , k ,t q (u q )
i1
i2
i3
iq
1 1
2
2
3 3
Of degrees k1, k2, …, kq in each variable
q
q
THEORY – GENERAL FORM
function from
T ( m ) is a multivariate
d

q
to
given that Pi 
 If d > 1, then T is a vector (parametric function)
d
THEORY – GENERAL FORM
Definition for Bézier trivariates : A Tensor-Product
Bézier volume of degree (l,m,n) is defined to be
l
m
n
X (u)   Pijki ,l (u ) j ,m (v) k ,m ( w)
where
i 0 j 0 k 0
u  (u, v, w), u, v, w  [0,1]
and 𝜃𝑖,𝑛 (𝑡) are the Bernstein polynomials of degree
𝑛, index 𝑖.
Bézier trivariates can similarly be generalized to
an arbitrary-dimensional multivariate.
THEORY
From here on, unless otherwise specified, we will
concern ourselves only with Bézier trivariates and
multivariates.
THEORY – OPERATIONS & PROPERTIES



Convex Hull Property: All points defined by
the Tensor Product Volume lie inside the convex
hull of the set of points 𝑷.
Parametric Surfaces: Holding one dimension of
a Tensor Product Bézier Volume constant creates
a Bézier surface patch – specifically, an
isoparametric surface patch.
Parametric Lines: Holding two dimensions of a
Tensor Product Bézier Volume constant creates a
Bézier curve – again, an isoparametric curve.
THEORY – OPERATIONS AND PROPERTIES



Boundary surfaces: The boundary surfaces of a
TPB volume are TPB surfaces. Their Bézier nets
are the boundary nets of the Bézier grid.
Boundary curves: The boundary curves of a
TPB volume are Bézier curve segments. Their
Bézier polygons are given by the edge polygons of
the Bézier grid.
Vertices: The vertices of a TPB volume coincide
with the vertices of its Bézier grid.
THEORY – OPERATIONS AND PROPERTIES
Derivatives: The partial derivatives of order
(𝑝, 𝑞, 𝑟) of a Tensor Product Bézier volume of degree
(𝑙, 𝑚, 𝑛) at the point u = (𝑢, 𝑣, 𝑤) is given by
l!
m!
n ! l  p m  q n  r pqr
 pqr
 Pijki ,l  p (u ) j ,m  q (v) k ,n r ( w)
X (u) 



p
q
r
u v w
(l  p )! (m  q )! (n  r )! i 0 j 0 k 0
Where the forward difference operator ∆ is:
 000 Pijk  Pijk
and
 pqr Pijk   p 00 [ 0 q 0 ( 0,0,r 1Pi , j ,k 1   0,0, r 1Pijk )]
Pi : Pi 1  Pi
 Pi : Pi  k
k
k
k 
k 
k 
   Pi  k 1    Pi  k  2  ...  Pi   (1)l   Pi  k l
l 0
1
 2
l
THEORY – OPERATIONS AND PROPERTIES
Degree Raising: To raise a Tensor Product Bezier
volume of degree (𝑙, 𝑚, 𝑛) to degree (𝑙, 𝑚 + 𝜇, 𝑛),
then the new points
P
m
iJk
 J  m  m  J 
 
 J  (0,1,...m)  m
J m
j
m

j
,
  Pijk  
all i, k
m m 
jJ


m


This works similarly for the other dimensions as
well.
THEORY – OPERATIONS AND PROPERTIES
Degree Reduction: To lower a Tensor Product Bezier
volume of degree (𝑙, 𝑚, 𝑛) to one of degree (𝑙, 𝑚 − 𝜇, 𝑛),
we need:
q  (m  m  1,..., m
 0 q 0 Pijk  0,
j  0,1,..., m  q
all i, k
Then the new points are given recursively by:
P ijk 
all i, k
1
(mPijk  j P i , j 1,k ),
j  0,1,..., m  1
m j
Each iteration reduces the degree of the dimension of
interest by 1. This works similarly for the other
dimensions as well.
THEORY – TERMINOLOGY
Isosurfaces: In constrast to isoparametric
surfaces, an isosurface, or constant set is generated
when the Tensor Product Bezier Volume function
𝑋(𝑢, 𝑣, 𝑤) is set to a constant:
𝑋 𝑢, 𝑣, 𝑤 = 𝑋0
Data-wise, this might represent all of the locations
in space having equal temperature, pressure, etc.
An isosurface is an implicit surface.
THEORY – CONSTRUCTORS
Extruded Volume & Ruled Volume
THEORY – CONSTRUCTORS
Extruded Volume: A surface crossed with a line.
Let 𝜎 𝑢, 𝑣 and 𝑉 be a parametric spline surface
and a unit vector, respectively. Then
𝑇 𝑢, 𝑣, 𝑤 = 𝜎 𝑢, 𝑣 + 𝑤𝑉
represents the volume extruded by the surface
𝜎 𝑢, 𝑣 as it is moved in direction 𝑉. It is linear in
𝑤.
THEORY – CONSTRUCTORS
Ruled Volume: A linear interpolation between
two surfaces.
Let 𝜎1 𝑢, 𝑣 and 𝜎2 𝑢, 𝑣 be two parametric spline
surfaces in the same space (i.e., with the same
order and knot sequence). Then the trivariate
𝑇 𝑢, 𝑣, 𝑤 = 1 − 𝑤 𝜎1 𝑢, 𝑣 + 𝑤𝜎2 𝑢, 𝑣
constructs a ruled volume between 𝜎1 and 𝜎2 .
MULTIVARIATE METHODS: OUTLINE
Introduction and Motivation
 Theory
 Practical Considerations
 Application: Free-form Deformation (FFD)

APPLICATION: FREE-FORM DEFORMATION
Introduction & Motivation:
 Embed curves, surfaces and volumes in the
parameter domain of a free-form volume
 Then modify that volume to warp the inner
objects on a ‘global’ scale
 [DEMO]
APPLICATION: FREE-FORM DEFORMATION
APPLICATION: FREE-FORM DEFORMATION
Process (Bézier construction):
1. Obtain/construct control point structure (the
FFD)
2. Transform coordinates to FFD domain
3. Embed object into the FFD equation
From the paper:
Sederberg, Parry: “Free-form Deormation of Solid Geometric
Models.” ACM 20 (1986) 151-160.
APPLICATION: FREE-FORM DEFORMATION
Obtain/construct control point structure (the FFD):
A common example is a lattice of points P such
that:
i
j
k
Pijk  X 0  S  T  U
l
m
n
Where
 X 0 is the origin of the FFD space
 S, T, U are the axes of the FFD space
 l, m, n are the degrees of each Bézier dimension
 i, j, k are the indices of points in each dimension
 Edges mapped into Bézier curves
APPLICATION: FREE-FORM DEFORMATION
Transform coordinates to FFD domain:
Any world point 𝑋 has (𝑠, 𝑡, 𝑢) coordinates in this
system such that:
𝑋 = 𝑋0 + 𝑠𝑆 + 𝑡𝑇 + 𝑢𝑈
So X in FFD space is given by the coordinates:
T U ( X  X 0 )
S U ( X  X 0 )
S T ( X  X 0 )
s
,t 
,u 
T U  S
S U  T
S  T U
APPLICATION: FREE-FORM DEFORMATION
Embed object into the FFD equation:
The deformed position of the (𝑠, 𝑡, 𝑢) coordinates are
given by:
m
n
m
l 


n
t i t
m j j
    (1  s ) s [   (1  t ) t [  (1  u ) n  k u k Pijk ]]
i 0  i 
j 0  j 
k 0  k 
l
X ffd
APPLICATION: FREE-FORM DEFORMATION
Embed object into the FFD equation:
If the (𝑠, 𝑡, 𝑢) coordinates of our object are given by:
s  f (    t  g (    u  h(   
and
X ffd  X ( s, t , u )
then we simply embed via:
X ffd  X ( f (   , g (   , h(   )
APPLICATION: FREE-FORM DEFORMATION
Volume Change: If the FFD is given by
F( x, y, z )  ( F ( x, y, z ), G ( x, y, z ), H ( x, y, z ))
and the volume of any differential element is 𝑑𝑥 ∙
𝑑𝑦 ∙ 𝑑𝑧, then its volume after the deformation is
J (F( x, y, z ))  dx  dy  dz
where J is the Jacobian, defined by:
F
x
G
J (F ) 
x
H
x
F
y
G
y
H
y
F
z
G
z
H
z
APPLICATION: FREE-FORM DEFORMATION
Volume Change Results:


If we can obtain a bound on 𝐽(𝐹) over the
deformation region, then we have a bound on the
volume change.
There exists a family of FFDs for which 𝐽 𝐹 = 1,
i.e., the FFD preserves volume.
APPLICATION: FREE-FORM DEFORMATION
Examples
 Surfaces (solid modeling)
 Text (one dimension lower): Text Sculpt [DEMO]
MULTIVARIATE METHODS: OUTLINE
Introduction and Motivation
 Theory
 Practical Considerations
 Application: Free-form Deformation (FFD)

PRACTICAL ASPECTS – EVALUATION
Tensor Product Volumes are composed of Tensor
Product Surfaces, which in turn are composed of
Bezier curves.
 Everything is separable, so each component can
be handled independently

PRACTICAL ASPECTS – VISUALIZATION
Marching Cubes Algorithm
 Split space up into cubes
 For each cube, figure out which points are inside
the iso-surface
 28=256 combinations, which map to 16 unique
cases via rotations and symmetries
 Each case has a configuration of triangles (for the
linear case) to draw within the current cube
PRACTICAL ASPECTS – VISUALIZATION
Marching Cubes Algorithm: 2D case
With ambiguity in cases 5 and 10
PRACTICAL ASPECTS – VISUALIZATION
Marching Cubes Algorithm: 3D case. Generalizable
by 15 families via rotations and symmetries.
Download