CAD Lecture 5 (new) - none PDF

Title CAD Lecture 5 (new) - none
Author sam santos
Course Computer-Aided Mechanical Design
Institution Concordia University
Pages 59
File Size 3.7 MB
File Type PDF
Total Downloads 40
Total Views 147

Summary

none...


Description

Representation and Manipulation of Surfaces

Chevy Chen, Ph.D. Department of Mechanical and Industrial Engineering Concordia University

T Types off CAD Surfaces S f • Bilinear Surfaces • Coon’s Patches • Bi-cubic Patches

Types of CAD Surfaces • Bezier Surfaces • B-spline Surfaces • NURBS Surfaces

CAD Surfaces Applications

Parametric & Non Non--parametric Surfaces • Parametric Equations P(u,v) = R⋅cosu ⋅cosv ⋅i +R⋅sinu ⋅cosv ⋅ j +R⋅sinv ⋅k (0≤ u ≤ 2π ,−2π ≤ v ≤ π2 )

• Non-parametric Equations Implicit form

x2 + y2 + z2 − R2 = 0

Explicit form

z = ± R2 − x2 − y2

Bi--linear Surfaces Bi

BiBi-linear Surfaces A Bi-linear surface is derived by interpolating four data points, using linear equations in parameters u and v so that the resulting surface has the four points as its corners.

Creation of BiBi-linear Surfaces (I) Given four points:

P0,0 , P0,1 , P1,0 , P1,1 The lines between P0,0 and P0,1, P1,0 and P1,1:

P 0 ,v = (1 − v ) P 0 , 0 + v P 0 ,1 P1, v = (1 − v ) P1,0 + v P1,1

Creation of Bi Bi--linear Surfaces (II) For every v, two points can be calculated on point inside the surface

P0,v

and P1,v . Any

P(can u, v) be found by the linear

interpolation on the two points:

P ( u , v ) = (1 − u ) P0 , v + u P1, v

C ti off Bi Creation Bi--linear li Surfaces S f (III) Substituting the first two equations in the above equation gives the following equation of a bilinear surface:

P(u, v) = (1−u) ⋅[(1− v) ⋅ P0,0 + v ⋅ P0,1] + u ⋅[(1− v) ⋅ P1,0 + v ⋅ P1,1] or ⎡ P0,0 P0,1 ⎤ ⎡1 − v⎤ P(u, v) = [1 − u u ] ⋅ ⎢ ⎥ ⋅⎢ v ⎥ P P 1,1 ⎦ ⎣ ⎦ ⎣ 1,0 (0 ≤ u ≤ 1, 0 ≤ v ≤ 1)

Properties of Bi Bi--linear Surfaces • Four data points are at the corners of the bi bilinear surface. • Th The d degree iin u and v direction di ti off bili bilinear surface is 1. • Bi-linear surfaces tend to be flat.

Coon’s Coon s Patches

Features of Coon’s Patches Instead of blending four corner points with bilinear surfaces, Coon’s patches blend four boundary curves.

Creation of Coon’s Patches (I) Assume the equations of the four boundary curves are given:

P0 (v ), P1 (v ) ) Q1 (u ) Q0 (u ),

Creation of Coon’s Patches (II) Select two curves facing each other, P 0 ( v ), P1 ( v )

Interpolate the two curves in the u direction by a linear equation:

S1 (u , v ) = (1 − u ) ⋅ P0 (v) + u ⋅ P1 (v) surface is bounded by P0 (v) at u=0 and at u=1. 1. S1 (u , v)

P1 (v )

Creation of Coon’s Patches (III) Select the other two curves facing each other, Q 0 (u ), Q 1 (u )

Interpolate the two curves in the v direction by a linear equation:

S2 (u, v) = (1 − v) ⋅ Q0 (u) + v ⋅ Q1 (u) S2 (u , v) surface

att v=1. 1

is bounded by Q0 (u )at v=0 and

Q1 (u )

Creation of Coon’s Patches (IV) surface is bounded by P0 (v) at u=0 and P1 (v ) u=1. at u 1. S 2 (u , v ) surface is bounded by Q 0 (u ) at v=0 and Q1 (u ) at v=1.

S1 (u , v )

To find a surface bounded by four curves, add the above two surfaces:

S3 (u, v) = S1(u, v) + S2 (u, v)

Creation of Coon’s Patches (V) The above equation can be rewritten as

S3 (u, v ) = (1 − u ) ⋅ P0 (v) + u ⋅ P1 (v) + (1 − v) ⋅ Q 0 (u ) + v ⋅ Q1 (u ) S 3 (u , v) is bounded by the four given boundary curves?

Creation of Coon’s Patches (VI) By substituting the limits of the u and v (0 and 1),

⎧S 3 (0, v ) = P0 (v ) + [ (1 − v ) ⋅ Q0 (0) + v ⋅ Q1 (0)] ⎪ ⎪ S3 (1, v) = P1 (v) + [ (1 − v) ⋅ Q0 (1) + v ⋅ Q1 (1)] ⎨ ⎪S 3 (u , 0) = Q 0 (u ) + [(1 − u ) ⋅ P0 (0) + u ⋅ P1 (0) ] ⎪ S3 (u,1) = Q1 (u) + [(1 − u) ⋅ P0 (1) + u ⋅ P1 (1) ] ⎩

Creation of Coon’s Patches (VII) By subtracting the bilinear surface equation the equation of a Coon’s patch is obtained :

S (u, v) = (1 − u) ⋅ P0 (v) + u ⋅ P1 ( v) + (1 − v) ⋅ Q0 (u ) + v ⋅ Q1 (u ) − ⎡⎣(1 − u) ⋅ (1 − v) ⋅ P0,0 + u ⋅ (1 − v) ⋅ P1,0 + (1 − u) ⋅ v ⋅ P0,1 + u ⋅ v ⋅ P1,1 ⎤⎦ (0≤ u ≤ 1, 0≤ v ≤ 1)

Properties of Coon’s Patches • Because of its simplicity it has been widely used. • Not appropriate for precise modeling of a surface because the internal shape of the surface cannot be controlled from the boundary curves alone alone.

Bi Bi--Cubic Patches

BiBi-Cubic Patches A bi-cubic patch is a parametric surface with third-degree polynomials both in the u and v direction. The equation of a Bi-cubic patch is 3

3

P(u, v) = ∑∑ a i, jui v j i =0 j =0

(0 ≤ u ≤ 1, 0 ≤ v ≤ 1)

Matrix Form of Bi Bi--Cubic Patches

P (u , v ) = ⎡⎣1 u u 2

⎡a 00 a 01 a 02 a 03 ⎤ ⎡ 1 ⎤ ⎢a ⎥⎢ v ⎥ a a a 11 22 33 ⎥ ⎢ ⎥ u 3 ⎤⎦ ⎢ 10 2 ⎢a 20 a11 a 22 a 33 ⎥ ⎢v ⎥ ⎢ ⎥⎢ 3⎥ ⎢⎣a 30 a11 a 22 a 33 ⎥⎦ ⎣ v ⎦

B Boundary d Conditions C diti off Bi Bi--cubic bi Patches • Four corner points points, P(0, 0), P(0,1), P(1, 0), P(1,1)

• Tangent vectors of the boundary curves of the surface at the corner points:

Pu (0, 0), Pu (0,1), Pu (1, 0), Pu (1,1) Pv (0, (0 0) 0), Pv (0,1), (0 1) Pv (1 (1, 0), 0) Pv (1,1) (1 1)

B Boundary d Conditions C diti off Bi Bi--cubic bi Patches • Second-order derivatives, called twist vectors.

Puv (0, 0), Puv (0,1), Puv (1, 0), Puv (1,1)

Bi-cubic Patches with Known BiBoundary Conditions Using the 16 boundary conditions, the coefficient matrix of the Bi-cubic patch can be derived. The Bi cubic patch is represented Bi-cubic represented. ⎡ P(0,0) P(0,1) Pv (0,0) Pv (0,1) ⎤ ⎡ F1 (v) ⎤ ⎢P ⎥ (1,0) P(1,1) Pv (1,0) Pv (1,1) ⎥ ⎢⎢F2 (v )⎥⎥ ⎢ P(u, v) = [ F1 (u) F2 (u) F3 (u) F4 (u )] ⎢ Pu (0,0) Pu (0,1) Puv (0,0) Puv (0,1)⎥ ⎢ F3 (v )⎥ ⎢ ⎥⎢ ⎥ (1 0) Pu (1,1) (1 1) Puv(1,0) (1 0) Puv(1,1) (1 1) ⎥⎦ ⎢⎣F4 (v) ⎥⎦ ⎢⎣ Pu (1,0)

Base B F Functions ti off BiBi-cubic bi P Patches t h The blending functions of the Bi-cubic patch with known boundary conditions are defined as:

F1 (u ) = 1 − 3u 2 + 2u3 F2 (u ) = 3u 2 − 2u 3 F3 (u ) = u − 2u 2 + u 3 F4 (u) = − u2 + u3 The blending functions are the same as the blending function used in Hermite curves.

Bezier Surfaces

Definition of Bezier Surfaces The equation of Bezier surfaces is

P (u , v ) =

n

m

∑∑P

i,j

i =0

⋅ Bi ,n (u ) ⋅ B j ,m (v )

j =0

(0 ≤ u ≤ 1, 0 ≤ v ≤ 1) are the blending functions. The control points compose a control polyhedron polyhedron.

Bi ,n , Bj ,m

Control Polyhedron of Bezier Surfaces The control polyhedron of a Bezier surface is illustrated.

Bezier Surfaces Evaluation The equation of a Bezier surface can be expanded by evaluating the summation for j as follows: n

P(u, v) = ∑ ⎡⎣ Pi,00 B00,m (v) + Pi,11B11,m (v) + " + Pii,m Bm ,m (v) ⎤⎦ Bii,n (u) i= 0

The Bezier surface is obtained by blending the (n+1) Bezier curves, each of which is defined by the control points Pi ,00 , Pi ,11, Pi ,22 ," , Pi ,m

with the blending functions

Bi ,n (u )

Properties of Bezier Surfaces The four corner points of the control polyhedron lie on the surface. n

P (0, 0 ) =

∑ ∑ i = 0

=

n



i = 0

=

n



i = 0

=

m

n



i = 0

P

i, j

B

i,n

(0 )B

j,m

(0 )

j= 0

⎡ ⎢ ⎣



⎡ ⎢ ⎣



m

P

i, j

P

i, j

j,m

j = 0 m

j = 0

⎛ m ⎞ ⎜ ⎟ P ⎝ 0 ⎠

⎛ m ⎞ = ⎜ ⎟ ⎝ 0 ⎠

B

n



i = 0

⎛ m ⎞ = ⎜ ⎟ P ⎝ 0 ⎠ = P 0 ,0

0 ,0

i ,0

⎤ (0 )⎥B ⎦

⎛ m ⎞ ⎜ ⎟ v ⎝ j ⎠ B

i ,n

j

(0 )

(1 − v ) m

− j

⎤ ⎥ ⎦

B v = 0

(0 )

⎡⎛ n ⎞ P i ,0 ⎢ ⎜ ⎟ u ⎣⎝ i ⎠ ⎛ n ⎞ ⎜ ⎟ ⎝ 0 ⎠

i,n

i

(1 − u )

n − i

⎤ ⎥ ⎦

u = 0

i,n

(0 )

P Properties ti off Bezier B i S Surfaces f The boundary curves of a Bezier surface are Bezier curves defined by the proper subsets of the control points. n

m

P (0, v ) = ∑∑ Pi, j Bi, n (0)B j , m (v) i =0 j =0

⎡n ⎤ ⎛n⎞ i n− i = ∑ ⎢∑ Pi, j ⎜ ⎟ u (1 − u ) ⎥ B j, m (v ) j= 0 ⎣ i= 0 ⎝ i⎠ ⎦ u= 0 m

m

= ∑ P0, j B j ,m (v ) j= 0

Properties of Bezier Surfaces • Degree in u and v direction are determined by the number of control points in the respective direction. • Convex hull of the control polyhedron contains the Bezier surface.

z

u

B-Spline Surfaces

D fi iti off BDefinition B-spline li Surfaces S f A B-spline surface is defined in parametric form as: n

m

P (u , v ) = ∑∑ Pi , j ⋅ Ni ,k (u ) ⋅ N j ,l (v ) i= 0 j= 0

(sk −1 ≤ u ≤ s n+ 1 , t l− 1 ≤ v ≤ t l+ 1 ) Pi , j

are the control points compose a control polyhedron.

Ni ,k , N j ,l

are the blending functions.

Control Polyhedron of B B--spline Surfaces

Control Polyhedron and its B-spline Surface

B- Spline S li Surfaces S f • Bezier surface is only a special case of B-spline surface. surface • It is common to set the orders k and l for parameters, u and v, respectively, as 4, because a surface of degree 3 is used most. • Non-periodic knots are widely used in B-spline surfaces.

Properties of BB-Spline Surfaces The boundary curve (u = 0) is a B-spline curve. Substituting u = 0 in a B B-spline spline surface equation, equation yields

⎡ n ⎤ P (0, v) = ∑ ⎢ ∑ Pi , j ⋅ Ni ,k (u)⎥ ⋅ N j ,l ( v) j = 0 ⎣ i= 0 ⎦ u= 0 m

m

= ∑ P0, j ⋅ N j ,l (v ) j=0

NURBS Surfaces

D fi iti off NURBS Surfaces Definition S f The equation of a NURBS surface is : n

m

∑∑ h

i, j

P(u, v) =

Pi, j N i , k (u ) N j ,l (v)

i =0 j =0 n m

∑∑ h

i, j

( sk −1 ≤ u ≤ sn +1 , tl −1 ≤ v ≤ tl +1 ) N i ,k (u ) N j ,l (v )

i= 0 j= 0

are the homogeneous coordinates of the control points points. hi , j

Features of NURBS Surfaces • Similar to the relation between B-spline curves and NURBS curves, if all hi , j equal 1, the NURBS surface is same as the B-spline surface. • NURBS surfaces are able to accurately represent many types of surfaces, e.g. the quadric cylindrical, conical, spherical paraboloidal, spherical, paraboloidal and hyperboloidal surfaces. surfaces • NURBS surface equation often serves as a unified i t internal l representation t ti for f allll these th surface. f

Surface Interpolation

Interpolation with B B--Spline Surfaces Given a set of data points on a surface, derive a B-spline surface to interpolate the points. Q

p ,q

( p = 0 ,11 , " n

and

p = 0 ,11 , " ,m m)

Interpolation with B- Spli ne Surfaces To interpolate (n+1) by (m+1) constraints (points), any Bspline surface with at least (n+1) by (m+1) control points can be used. The B-spline surface is: n

m

P (u, v) = ∑∑ Pi , j Ni ,k (u) N j ,l (v) i =0 j =0

Procedure of Interpolation • Determine the orders k and l in the u and v directions, respectively. Generally, the order is set to 4 in u and v directions. • Determine the knot vectors in u and v directions. Generally they are non-periodic uniform knots.

Procedure of Interpolation (II) Assume the parameter values for each data point Q p, q are u p a n d v q

n

m

Q p, q = ∑∑ Pi, j N i, k (u p ) N j,l (vq ) i =0 j =0

P Procedure d off Interpolation I t l ti (III) m

Set the terms ∑ P

i, j

be

N j, l (v q )

j= 0

Ci (vq )

, the equation becomes:

n

Q p ,q = ∑ Ci (vq ) N i ,k (u p ) i =0

n

Substituting the values 0-m for q, gives

Q p,0 = ∑Ci (v0 )Ni ,k (u p ) i= 0 n

Q p,1 = ∑ Ci ( v1 ) Ni ,k ( u p ) i= 0

" n

Q p, m = ∑ C i ( v m ) N i, k (u p ) i =0

P Procedure d off Interpolation I t l ti (IV) Substitute the values 0-n for p,

C i ( v0 )

( i = 0,1," n)

are obtained as the control points of the B-spline curve interpolating Q0,0 , Q1,0 ," Q n ,0 .

Procedure of Interpolation (V) After Ci ( vq ) ( i = 0,1, " , n and q = 0,1, " , m ) the control points Pi , j can be found.

are calculated,

m

Ci (v q ) = ∑ Pi , j N j ,l (v q ) j =0

Substituting the 0-m for q, solve the equation system to get the control points.

Intersection of Surfaces

Methods of Surface Intersection Generally the methods for calculating intersection curves fall mainly into two categories: • Based on nonlinear equation • Based on subdivision

Nonlinear Equation Method (I) The intersection curves of two parametric surfaces should satisfy the following equation:

P (u , v ) − Q (s , t ) = 0 In this equation, equation there are three equations with four unknowns, u, v, s, and t.

Nonlinear Equation Method (II) Assume one parameter t. For any given t, we can solve the nonlinear equation:

P(u, v) − Q( s, t ) = 0 t all the intersection points on the With all the values of t, intersection curves can be found. However, if selecting t this may miss out some intersection points. some t, points

Sub Sub--Division Method (I) • Subdivide the surface recursively until all the surface patches are similar to planar quadrilaterals. quadrilaterals • Test the quadrilaterals from one surface with those on the other surfaces for intersection. • If there is possibility for intersection between the two quadrilaterals, compute to get it.

Sub--Division Method (II) Sub • The intersection segment between two quadrilaterals can be regarded as a intersection curve between two surface approximately. • If an accurate intersection curve is needed, utilize nonlinear

equation

segments as initial.

method

with

the

intersection

Conclusions • Bilinear Surfaces • Coon’s Patches • Bi Bi-cubic cubic Patches • Bezier Surfaces • B-spline Surfaces • NURBS Surfaces...


Similar Free PDFs