Está en la página 1de 8

Synthetic surfaces

Copyright@2010, YZU Optimal Design Laboratory. All rights reserved.

Last updated: Yeh-Liang Hsu (2010-11-18).


Note: This is the course material for ME550 Geometric modeling and computer
graphics, Yuan Ze University. Part of this material is adapted from CAD/CAM Theory and
Practice, by Ibrahim Zeid, McGraw-Hill, 1991. This material is be used strictly for
teaching and learning of this course.

Synthetic surfaces
1. Bezier surface
Two sets of orthogonal Bezier curves can be used to design an object surface
by specifying by an input mesh of control points, as shown in Figure 1. Bezier surfaces
have the same properties as Bezier curves, and they provide a convenient method for
interactive design applications. For each surface patch, we can select a mesh of control
points in the xy ground plane, then we choose elevations above the ground plane for the
z-coordinate values of the control points. Patches can then be pieced together using the
boundary constraints.

1
3

1
3

Figure 1. A cubic Bezier patch.

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Assignment 1
Generate the surface of an object, e.g., a car, the mouse of your computer, etc.,
using your CAD software. Use 44 control points as your input. Define an xy ground
plane first, then use the procedure described above to adjust the z-coordinates of your
control points, until you get the surface you want. Can you render this surface in your
CAD software?
A tensor product Bezier surface is an extension for the Bezier curve in two
parametric directions u and v.
n

Pu, v Pij Bi ,n u B j ,m v , 0 u 1, 0 u 1

(1)

i 0 j 0

where P(u, v) is any point on the surface and Pij are the control points. These points form
the vertices of the control or characteristic polyhedron.
Figure 1 shows a cubic Bezier patch. Substituting n=3 and m=3 into Equation (1), the
patch equation is
3

Pu, v Pij Bi ,3 u B j ,3 v , 0 u 1, 0 v 1

(2)

i 0 j 0

This equation can be expanded to give


Pu, v Bi ,3 u Pi 0 B0,3 v Pi1 B1,3 v Pi 2 B2,3 v Pi 3 B3,3 v
3

i 0

B0,3 u P00 B0,3 v P01B1,3 v P02 B2,3 v P03 B3,3 v


B1,3 u P10 B0,3 v P11B1,3 v P12 B2,3 v P13B3,3 v
B2,3 u P20 B0,3 v P21B1,3 v P22 B2,3 v P23B3,3 v
B3,3 u P30 B0,3 v P31B1,3 v P32 B2,3 v P33 B3,3 v

This equation can be written in a matrix form as

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Pu, v B0,3 u B1,3 u B2,3 u

P00
P
B3,3 u 10
P20

P30

P01

P02

P11

P12

P21 P22
P31

P32

P03 B0,3 v

P13 B1,3 v
P23 B2,3 v

P33 B3,3 v

(3)

or

Pu, v 1 u

3u 1 u

3u 2 1 u

1 v 3

2
3v1 v
3

u P 2
3v 1 v

3
v

Pu, v UT MB PMB V
T

(4)

Assignment 2
Use the same 44 control points generated in assignment 1, write a Matlab
program to draw the Bezier surface using Equation (4). Use proper mesh and views to
display the surface. Compare the surface you draw with the surface generated in
assignment 1. Show the Matlab program too.

2. B-Spline surface
A tensor product B-spline surface is an extension for the B-spline curve in two
parametric directions u and v.
n

Pu, v Pij N i ,k u N j ,l v , 0 u u max ,0 v vmax

(5)

i 0 j 0

For n=m=3, the equivalent bicubic formulation of an open and closed cubic B-spline
surface can be derived as below. First, let us find the matrix form of Equation (5). This
equation is identical in form to the Bezier surface equation (1). Thus, by replacing the
Bernstein polynomials in Equation (4) by the B-spline functions yields the matrix form of
Equation (5) as

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Pu, v N 0,k u N1,k u

P00
P
N n,k u 10

Pn 0

P01 P0 m N 0,l v

P11 P1m N1,l v

Pn1 Pnm N m,l v

(6)

or

Pu, v N 0,k u N1,k u

N 0,l v
N v
1,l

N n,k u P

N m,l v

(7)

where P is an n 1 m 1 matrix of the vertices of the characteristic polyhedron of


the B-spline surface patch. For a 44 cubic B-spline patch, Equation (6) becomes

Pu, v N 0, 4 u N1, 4 u N 2, 4 u

P00
P
N 3, 4 u 10
P20

P30

P01

P02

P11

P12

P21 P22
P31

P32

P03
N 0, 4 v
P13 N1, 4 v
P23 N 2, 4 v
N v
P33 3, 4

Assignment 3
Redo assignment 1. This time use as many control points as necessary to
generate a better-looking surface.

3. Coons Surface
All the surface methods introduced thus far share one common philosophy; that is,
they all require a finite number of data points to generate the respective surfaces. In
contrast, a Coons surface patch is a form of transfinite interpolation, which

indicates that the Coons scheme interpolates to an infinite number of data points,
that is, to all points of a curve segment, to generate the surface. The Coons patch is
particularly useful in blending four prescribed intersecting curves, which form a closed
boundary.
Development of the Coons surface patch centers around answering the following
question: what is a suitable well-behaved function P(u, v) which blend the four given
boundary curves and which satisfies the boundary conditions, that is reduces to the correct
boundary curve when u=0, u=1, v=0, and v=1.
4

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Let us first consider the case of a bilinearly blended Coons patch

P1 u, v 1 u P0, v uP1, v

(8)

P2 u, v 1 v Pu,0 vPu,1

(9)

Pu, v P1 u, v P2 u, v

(10)

The resulting surface patch described by Equation (10) does not satisfy the boundary
conditions.

Pu,0 Pu,0 1 u P0,0 uP1,0

(11)

Pu,1 Pu,1 1 u P0,1 uP1,1

(12)

Let us define a correction surface below:


P3 u, v 1 v 1 u P0,0 uP1,0 v1 u P0,1 uP1,1

(13)

Subtracting P3 u, v from Equation (10) gives


Pu, v P1 u, v P2 u, v P3 u, v

(14)

Now P(u, v) in Equation (14) satisfies the boundary conditions,

Pu, v P1 u, v P2 u, v

Pu, v 1

1 u

(15)

Pu,0 Pu,1 1
0

u P0, v P0,0 P0,1 1 v


P1, v P1,0 P1,1 v

(16)

The left column and the upper row of the matrix represent P1 u, v and P2 u, v

respectively, while the lower right block represents the correction surface P3 u, v .
Assignment 4

Define 4 Bezier curves P(0, v), P(1, v), P(u, 0), P(u, 1). Write a Matlab program
to draw the corresponding bilinearly blended Coons patch using Equation (16). Use
proper mesh and views to display the surface. Show the Matlab program too.

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

The functions 1, 1-u, u, 1-v, and v are called blending functions because they blend
together four separate boundary curves to give one surface. For cubic blending function ,
we can define

(17)

(18)

P1 u, v 2u 3 3u 2 1 P0, v 2u 3 3u 2 P1, v
P2 u, v 2v 3 3v 2 1 Pu,0 2v 3 3v 2 Pu,1

Pu, v 1 F1 u

Pu,0 Pu,1 1
0

F2 u P0, v P0,0 P0,1 F1 v


P1, v P1,0 P1,1 F2 v

(19)

4. Triangular Patches
In triangulation techniques, three parameters u, v and w are used and the parametric
domain is defined by a symmetric unit triangle of 0 u 1 , 0 v 1 , and 0 w 1,
as shown in Figure 2. The coordinates u, v and w are called barycentric coordinates.
While the coordinate w is not independent of u and v (note that u+v+w=1 for any point in
the domain), it is introduced to emphasize the symmetry properties of the barycentric
coordinates.

Figure 2. Representation of a triangular patch.


A triangular Bezier patch is defined by
Pu, v, w Pijk Bi , j ,k ,n u, v, w 0 u 1, 0 v 1, 0 w 1

(20)

i , j ,k

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Bi , j ,k ,n

n! i j k
uv w
i! j!k!

(21)

For example, as shown in Figure 3, a cubic triangular patch is


P(u, v, w) P003 w 3 P012 3vw2 P021 3v 2 w P030 v 3
P102 3uw 2 P111 6uvw P120 3uv 2

(22)
P201 3u w P210 3u v
2

P300 u 3

Assignment 5
Define 10 control points in a similar pattern shown in Figure 2. You can also
define an xy ground plane first, then adjust the z-coordinates of your control points.
Write a Matlab program to draw the corresponding cubic triangular patch using
Equation (22). Use proper mesh and views to display the surface. Show the Matlab
program too.
For n=4, the triangular patch is defined as

P(u, v, w) P004 w 4 P013 4vw3 P022 6v 2 w 2 P031 4v 3 w P040 v 4


P103 4uw 3 P112 12uvw2 P121 12uv 2 w P130 4uv 3
P202 6u 2 w 2 P211 12u 2 vw P220 6u 2 v 2

(23)

P301 4u 3 w P310 4u 3 v
P400 u 4

http://designer.mech.yzu.edu.tw/

Synthetic surfaces

Figure 3. Triangular Bezier patches


Assignment 6
Derive Equation (23) using the definitions in Equation (20) and Equation (21).

http://designer.mech.yzu.edu.tw/

También podría gustarte