0% found this document useful (0 votes)
8 views37 pages

ME3261-IV Surface Models & Fitting (1-On-1)

Uploaded by

Ang Xi Cong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views37 pages

ME3261-IV Surface Models & Fitting (1-On-1)

Uploaded by

Ang Xi Cong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Part IV

Surface Construction from 3D Data Points


 Problem Definition
Constructing a parametric surface interpolating over an array of 3D data
points {Pij: i = 0, 1, 2, …, m; j = 0, 1, 2, …, n},
These 3D data points are topologically connected by rows and columns to
form a rectangular 惯性导航mesh.
请支持独立网站,转发请注明本文链接:
http://www.guancha.cn/military-
affairs/2016_08_31_372992.shtml
Surface Patch (rectangular) Models
For constructing a surface patch (rectangular) from a
set of 3D data points, surface patch models to be
introduced:
 Standard polynomial surface patch

 Ferguson surface patch

 Bezier surface patch P 01

u=0 n(u i , v j ) r v(u i , v j )


 B‐spline surface patch v v=1

u = ui
r(u i , v j)

r u (u i , v j )
P 00 P 11
v = vj

u
v= 0
u=1

P 10
Properties of A Surface Patch
P 01

u=0 n(u i , v j ) r v(u i , v j )


v v=1

u = ui
r(u i , v j )

r u (u i , v j )
P 00 P 11
v = vj

u
v=0
u=1

P 10
Properties of A Surface Patch
(1) 4 corner points: r(0, 0), r(1, 0), r(0, 1), r(1, 1).
(2) 4 boundary curve segments: r(0, v), r(u, 0), r(1, v), r(u, 1).
(3) 2 partial derivatives at any point (tangent vectors):
ru = r (u, v) / u; rv = r (u, v) / v
ru and rv define the tangent plane.
(4) 1 twist vector: ruv = r (u, v) / u v
(5) Surface normal vector (normal in short): N(u, v) = ru  rv
unit normal vector n
n(u, v) = (rurv) / | ru rv |
Application example: an offset surface (with a distance d) is given by
ro(u, v) = r(u,v) + d n(u,v)

For an implicit surface f(x, y, z) = 0: N = (f/x, f/y, f/z)


The unit normal vector: n = N / | N |
Properties of A Surface Patch
Example O (0,0,0)
Given a plane defined by ax + by + cz = d,
find its unit normal vector and the distance of
the plane from the origin.

Solution P (x, y, z)
The normal vector of the plane is
N = (a, b, c).

The unit normal vector is


n = (a/e, b/e, c/e) with e = | N | = (a2 + b2 +c2)1/2

Given any point, P = (x, y, z), on the plane, the vector from
the origin O (0, 0, 0) to this point is given as OP = (x, y, z)

Therefore, the distance from the origin (0, 0, 0) to the plane is

n  OP = (ax + by +cz) / e = d/e = d / (a2 + b2 +c2)1/2


Standard Polynomial Patch Model
Consider a vector‐valued polynomial function:
r (u, v) whose degrees are cubic in both u and v with coefficients dij for
(ui, vj). That is a bi‐cubic (standard) polynomial patch defined as

r (u, v) = with 0  u, v  1

which can be expressed in a matrix form as


r (u, v) = U D VT
where, U = [1 u u2 u3], V = [1 v v2 v3], and D the coefficients matrix

D=
Standard Polynomial Patch Model
The bi‐cubic polynomial surface patch may be used in constructing a
smooth surface interpolating to a 4  4 array of 3D data points {Pij}.
See the example below:

{Pij: i = 0, 1, 2, 3; j = 0, 1, 2, 3}
The parameter values at the corners may be assigned as follows:
u = v = 0 at P00;
u = 0, v = 1 at P03;
u = 1, v = 0 at P30;
u = v = 1 at P33
Standard Polynomial Patch Model
Parameter values at the remaining data points (?) may be determined
based on chord‐lengths.
E.g., the value of u at P11 can be determined as
u = |P11–P01| / (|P11 – P01|+|P21–P11|+|P31–P21|)
The 16 data points can then produce 16 linear equations containing dij,
which can be obtained by solving the 16 linear equation system.

Generalization of this 16‐point patch construction method: The degrees of


u, v may be increased to m, n so that the surface patch interpolates over
an (m + 1)  (n + 1) array of data points.

Problems:
If the degrees of the surface patch are raised, the resulting surface tends
to show unwanted oscillations.
Ferguson Surface Patch Model
A surface patch interpolating over 4 corner points {Pij: i, j = 0, 1}.

Totally 16 unknown coefficients dij


t0 t1

o The first 4 constraints: r(u)


P0 P1
r (i, j) = Pij for i, j = 0, 1

o 12 corner conditions
sij: u ‐ tangent vector at Pij
tij: v ‐ tangent vector at Pij
r(u, v)
xij: twist vector at Pij
Ferguson Surface Patch Model
Assuming the above 16 vectors are given, we have the
following relations at the 4 corners of the surface patch:
r(i, j) = Pij
ru(i, j) = sij
rv(i, j) = tij i, j = 0, 1
ruv(i, j) = xij
where,
r (u, v) = U D VT
ru (u,v) =  r(u, v) / u
rv (u,v) =  r(u, v) / v
ruv(u,v) = 2r(u, v) / uv
Ferguson Surface Patch Model
Solving the 16 linear equations for the unknown coefficients dij
gives us a bi‐cubic Ferguson patch equation:
r (u, v) = U D VT = U C Q CT VT for 0  u, v  1

C=

Q=

Itcan be shown that the boundary curves of a Ferguson surface


are Ferguson curves (???).
Bézier Curve Model

Cubic (n = 3) Bézier curve model


r(u) = (1 – u)3 V0 + 3u(1 – u)2 V1 + 3u2(1 – u) V2 + u3 V3

r(u) = =U MR

r(0) = V0 r’(0) = 3 (V1 – V0)


r(1) = V3 r’(1) = 3 (V3 – V2)

V1
V2 V2
V1
V3 V3 V0
V1 V3 V2
V0 V0

The shape of the curve resembles that of the control polygon.


Bezier Surface Patch Model
 Consider a 4  4 array of control vertices {Vij}.
 By blending the control vertices with Bernstein polynomials, a
bi‐cubic Bezier patch is defined as follows:
Bezier Surface Patch Model
r (u, v) = = U M B MTVT 0  u, v  1
Where

M=

B=

The matrix M is called a (cubic) Bezier coefficient matrix,


and B is called a Bezier control point net which forms a
characteristic polyhedron.
Bezier Surface Patch Model
 Bezier patch vs. Ferguson Patch
By evaluating the corner
conditions of the Bezier patch,
we have the following
relationships:

Evaluation: At u = 0, v = 0:
r(0,0) = V00
s00 = 3(V10 – V00)
t00 = 3(V01 – V00)

x00 = 9(V00 – V01 – V10 + V11)


Bezier Surface Patch Model
Properties:
 Interpolates four corner points
 Convex hull
 Local control
B‐spline Surface Patch Model
Consider a 4  4 array of control vertices {Vij}.

r (u, v) = =U N B NTVT for 0  u, v  1

N=
Surface Construction (Surface Fitting)
Input Summary
 {Pij} i = 0, 1, 2, …, m; j = 0, 1, 2, …, n: Data points
 {s0j, smj} j = 0, 1, 2, …, n: u‐direction tangents at boundary points
 {ti0, tin} i = 0, 1, 2, …, m: v‐direction tangents at boundary points
 x00, xm0, x0n, xmn: twist vectors at the 4 corner points
Surface Construction Methods

 It is desired to use low degree (usually cubic) polynomial


patch model to form a composite surface.

 Three methods to be introduced:

 The FMILL method


 Ferguson fitting method
 B‐spline fitting method
FMILL Surface Fitting
Employing the Ferguson patch model for every patch (4 data points):
 A patch defined by {Pi, j, Pi+1, j, Pi,j+1, Pi+1, j+1}
 The twist vectors at the 4 data points are set to 0.
 The u‐direction tangents sij are estimated from
sij= ci (Pi+1,j - Pi-1,j)/| Pi+1,j - Pi-1,j| where, ci = min {| Pi+1, j - Pi, j|, | Pi, j - Pi-1, j|}
 The v‐direction tangents are similarly determined

 Pi, j Pi, j1 ti, j ti, j1 


P P t t 
Qij = 
i 1, j i 1, j 1 i 1, j i 1, j 1 

 si, j si, j 1 0 0 
 
si1, j si1, j 1 0 0 
FMILL Surface Fitting
Summary
 A composite surface composed of mn Ferguson patches

 FMILL method is very easy to implement.

 The resulting surface is generally visually smooth.

 Also aesthetically smooth as long as the data points are


evenly spaced.

It may produce undesirable surface quality


 Local flatness or unusual surface normal at mesh points
due to the assumption of zero twist vectors
Continuity between Surface Patches
Ferguson Surface Fitting

r1(u, v), r2(u, v), and r3(u, v)  Pi 1, j 1 Pi 1, j t i 1, j 1 t i 1, j 
sharing the mesh point Pij  P Pi , j t i , j 1 t i , j 
Q1 =  i , j 1
 s i 1, j 1 s i 1, j x i 1, j 1 x i 1, j 
r1(u, v) = U C Q1 CT VT  
for 0  u, v  1  s i , j 1 si,j x i , j 1 x i , j 
Ferguson Surface Fitting
 Applying the C2‐condition to the common boundary of r1(u, v)
and r2(u, v), and to that of r1(u, v) and r3(u, v), we have

ruu1 (1, v) = ruu2 (0, v) (along u-direction)

rvv1 (u, 1) = rvv3 (u, 0) (along v-direction)

Since ruu (u, v) = [0 0 2 6u] C Q CT VT (general expression)

We have
ruu1 (1, v) = [6 -6 2 4] Q1 CT VT

ruu2 (0, v) = [-6 6 -4 -2] Q2 CT VT

Therefore, the u‐direction C2‐condition is re‐written as:

[6 -6 2 4] Q1 = [-6 6 -4 -2] Q2
Ferguson Surface Fitting
• Totally 4 linear equations. The 2nd equation is (for i = 1, 2, …, m – 1)

s i 1, j  4s i,j  s i+1,j  3 ( Pi+1,j  Pi-1,j ) (a)


 The 4th equation is (for i = 1, 2, …, m – 1)
x i-1 ,j  4 x i,j  x i+1 ,j  3 ( t i+1 ,j  t i-1 ,j ) (b)
 In the same way, the v-direction C2-condition produces (for j = 1, 2, …, n – 1)

t i,j-1  4 t i,j  t i,j+1  3 ( Pi,j+1  Pi,j-1 ) (c)

x i,j -1  4 x i,j  x i,j+1  3 (s i,j+1  s i,j-1 ) (d)

(1) Solving (a) to obtain all the {sij} at j = 0, 1, 2, …, n - ({s0j, smj} are known)
(2) Solving (c) to obtain all the {tij} at i = 0, 1, 2, …, m - ({ti0, tin} are known)
(3) Solving (b) at j = 0 and j = n to obtain {xi0} and {xin} for i = 1, 2, …, m – 1
(4) Solving (d) to obtain {xij} at i = 0, 1, 2, …, m.
Surface Construction (Fitting)
 Input Summary
 Pij: i = 0, 1, 2, …, m; j = 0, 1, 2, …, n
 {s0j, smj}: u‐direction tangents at boundary points
 {ti0, tin}: v‐direction tangents at boundary points
 {x00, xm0, x0n, xmn}: twist vectors at corner points
Ferguson Surface Fitting

 Having determined all the tangent vectors


(along u and v) and twist vectors, the next
step is to form a corner condition matrix Qij
for each rectangular region.

 The resulting surface is a C2 surface composed


of m  n Ferguson patches which is called a
composite Ferguson surface.
B‐Spline Surface Fitting
16 (4×4) control points need to be determined for each patch
(can be obtained by using the Ferguson form of the same patch,
i.e., by evaluating the 16 corner conditions using the control
points).

 C2‐condition between two B‐spline patches


Two patches share 12 (4×3 or 3×4) control points …….

 For surface fitting of (m+1)×(n+1) data points with C2‐


condition maintained across neighbouring patches:
o Total m×n patches

o (m+3)×(n+3) control points to be obtained (why?)


B‐Spline Surface Fitting (C2‐condition)
B‐spline Surface Patch Model
Consider a 4  4 array of control vertices {Vij}.

r (u, v) = =U N B NTVT for 0  u, v  1

N=
B‐Spline Surface Fitting (The Final Control Points)

V00 V01 V02 V03 V04 • • V0,n+1 V0,n+2


V10 V11 V12 V13 V14 • • V1,n+1 V1,n+2
V20 V21 V22 V23 V24 • • • •
V30 V31 V32 V33 V34 • • • •
V40 V41 V42 V43 V44 • • • •
• • • • • • •
• • • • • • • • •
Vm-1,0 Vm-1,1 • • • Vm-1,n-1 Vm-1,n Vm-1,n+1 Vm-1,n+2
Vm,0 Vm,1 • • • Vm,n-1 Vm,n Vm,n+1 Vm,n+2
Vm+1,0 Vm+1,1 • • • Vm+1,n-1 Vm+1,n Vm+1,n+1 Vm+1,n+2
Vm+2,0 Vm+2,1 • • • Vm+2,n-1 Vm+2,n Vm+2,n+1 Vm+2,n+2
B‐Spline Surface Fitting
Once the control vertices are determined, the control vertex matrix
Bij is constructed for the region {Pi,j, Pi+1,j, Pi+1,j+1, Pi,j+1}. Then the
bi-cubic B-spline patch rij (u, v) is expressed as

rij (u, v) = U N Bij NTVT 0  u, v  1


i = 0, 1, …, m – 1; j = 0, 1, …, n – 1
B‐Spline Surface Fitting

 Comparison between Ferguson fitting and B‐spline fitting


 Same composite surface resulted

 When making further changes, local change for B‐spline


surface, global change for Ferguson surface.

 Question:
 When one control point is changed, how many patches
are affected?
Input Data Preparation for Surface Fitting
 Assumption for the surface fitting methods
 The input data were given in the standard “matrix” form
 Implicitly assumed that the input data were “true” coordinate values on
the surface
 In reality
 The input data are usually given as a collection of data paths (possibly
obtained from a CMM or laser scanner).
 Individual data paths may consist of unequal number of data points that
are subject to errors
 Thus, in order to construct a smooth composite surface from a
collection of data paths, 3 phases of input data preparation:
 Curve fairing
 Re‐meshing
 Estimation of boundary tangents and corner twist vectors.
Curve Fairing
Fairing is a term used to mean the adjustment of the position of input data
points in order to improve the smoothness of interpolating curves.
 Interactive fairing

 Automatic fairing based on

 Surface continuity (C1 or C2)

 No unwanted inflections

 Gradual change of curvature


Re‐Meshing
Data points not evenly distributed
 Each data path is fitted as a composite curve, accompanied
by a subsequent curve fairing if necessary.
 Mesh intersection points are sampled by defining a series of
cross‐mesh curves.
 End tangents of each meshed curves are estimated (???).

 The corner twist vectors are usually set to zero.


Free‐form Surface Construction

You might also like