ME 521 Computer Aided Design 6 Surfaces and

  • Slides: 55
Download presentation
ME 521 Computer Aided Design 6. Surfaces and Surface Modeling Assoc. Dr. Ahmet Zafer

ME 521 Computer Aided Design 6. Surfaces and Surface Modeling Assoc. Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail. com Mechanical Engineering Department Gebze Technical University

Types od Surfaces 6. Surfaces and Surface Modeling Ø Analytical Surfaces Ø Ø Ø

Types od Surfaces 6. Surfaces and Surface Modeling Ø Analytical Surfaces Ø Ø Ø Ø Primitive surfaces Plane surface Offset surface Tabulated cylinder Surface of revolution Swept surface Ruled surface Ø Synthetic Surfaces Ø Ø Ø Coons patches Bilinear surface Bicubic surface Bezier surface B-spline surface NURBS surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 2

6. Surfaces and Surface Modeling Surface Patch A surface patch �a curved bounded collection

6. Surfaces and Surface Modeling Surface Patch A surface patch �a curved bounded collection of points whose coordinates are given by continuous, two-parameter, single-valued mathematical expression. Parametric representation: p = p(u, v) x=x(u, v), y=y(u, v), z=z(u, v) p(u, v) = [x(u, v) y(u, v) z(u, v)]T Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 3

6. Surfaces and Surface Modeling Surface Patch v Isoparametric curves u Dr. Ahmet Zafer

6. Surfaces and Surface Modeling Surface Patch v Isoparametric curves u Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 4

6. Surfaces and Surface Modeling Surface Patch v=1 - , v ) n(u i

6. Surfaces and Surface Modeling Surface Patch v=1 - , v ) n(u i j u=ui v=vj - , v ) p(u i j v=0 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 5

Analytical Surfaces Ø Ø Ø Ø 6. Surfaces and Surface Modeling Primitive surfaces Plane

Analytical Surfaces Ø Ø Ø Ø 6. Surfaces and Surface Modeling Primitive surfaces Plane surface Offset surface Tabulated cylinder Surface of revolution Swept surface Ruled surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 6

6. Surfaces and Surface Modeling Primitive Surfaces Plane: P(u, v) = u i +

6. Surfaces and Surface Modeling Primitive Surfaces Plane: P(u, v) = u i + v j + 0 k Cylinder: P(u, v) = R cos u i + R sin u j + v k Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 7

6. Surfaces and Surface Modeling Primitive Surfaces • Plane P(u, v) = u i

6. Surfaces and Surface Modeling Primitive Surfaces • Plane P(u, v) = u i + v j + 0 k • Cylinder P(u, v) = R cos u i + R sin u j + v k • Sphere P(u, v) = R cos u cos v i + R sin u cos v j + R sin v k • Cone P(u, v) = m v cos u i + m v sin u j + v k • Torus P(u, v) = (R + r cos v) cos u i + (R + r cos v) sin u j + r sin v k Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 8

6. Surfaces and Surface Modeling Planar Surface Defined by 3 points and 3 vectors

6. Surfaces and Surface Modeling Planar Surface Defined by 3 points and 3 vectors Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 9

6. Surfaces and Surface Modeling Planar Surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical

6. Surfaces and Surface Modeling Planar Surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 10

Offset Surface 6. Surfaces and Surface Modeling Offset yönü Dr. Ahmet Zafer Şenalp ME

Offset Surface 6. Surfaces and Surface Modeling Offset yönü Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 11

Tabulated Cylinder 6. Surfaces and Surface Modeling • Curve is projected along a vector

Tabulated Cylinder 6. Surfaces and Surface Modeling • Curve is projected along a vector • In most CAD software it is called as “extrusion” Vector Surface generation curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 12

Surface of Revolution 6. Surfaces and Surface Modeling • Revolve curve about an axis

Surface of Revolution 6. Surfaces and Surface Modeling • Revolve curve about an axis Curve Axis Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 13

Surface of Revolution 6. Surfaces and Surface Modeling When a planar curve is revoled

Surface of Revolution 6. Surfaces and Surface Modeling When a planar curve is revoled around the axis with an angle v a circle is constructed (if v=360 ). Center is on the revolving axis and rz(u) is variable. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 14

Swept Surface 6. Surfaces and Surface Modeling • Defining curve swept along an arbitrary

Swept Surface 6. Surfaces and Surface Modeling • Defining curve swept along an arbitrary spine curve Spine Defining curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 15

Ruled Surface • • • 6. Surfaces and Surface Modeling Linear interpolation between two

Ruled Surface • • • 6. Surfaces and Surface Modeling Linear interpolation between two edge curves Created by lofting through cross sections Lines are used to connect edge curves There is no restriction for edge curves It is a linear surface Linear interpolation Edge curve 1 Dr. Ahmet Zafer Şenalp ME 521 Edge curve 2 Mechanical Engineering Department, GTU 16

Ruled Surface 6. Surfaces and Surface Modeling Edge curves: G(u) ve Q(u) C 1(u)=G(u)

Ruled Surface 6. Surfaces and Surface Modeling Edge curves: G(u) ve Q(u) C 1(u)=G(u) C 2(u)=Q(u) Ruled surce only permits slope in the direction of curves in u direction. Surface has zero slope in v direction. Ruled surface cannot be used to model surfaces that have slopes in 2 directions. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 17

Synthetic Surfaces Ø Ø Ø 6. Surfaces and Surface Modeling Coons patches Bilinear surface

Synthetic Surfaces Ø Ø Ø 6. Surfaces and Surface Modeling Coons patches Bilinear surface Bicubic surface Bezier surface B-spline surface NURBS surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 18

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling p 01 D 1 C

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling p 01 D 1 C 0 p 11 C 1 v p 00 u Dr. Ahmet Zafer Şenalp ME 521 D 0 p 10 Mechanical Engineering Department, GTU 19

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling • Surface is defined by

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling • Surface is defined by linearly interpolating between the boundary curves • Simple, but doesn’t allow adjacent patches to be joined smoothly Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 20

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling • Most of the surface

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling • Most of the surface algorithms use finite number of points to model surface. However Coons surface patch uses interpolation method with infinite number of points. • Coons surface seeks P(u, v) function that will fill between 4 edge curves. • Bilineer Coons patch form: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 21

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling The form given above does

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling The form given above does not satisfy the boundary conditions as shown below. Here below is a corrrection surface With the application of correction surface; elde edilir ve bu form sınır koşullarını sağlar. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 22

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling In the above matrix left

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling In the above matrix left column is P 1(u, v), middle column is P 2(u, v), right column is P 3(u, v). – 1, 1 -u, u, 1 -v, and v functions are called blending functions, because they blend boundary curves to form one surface. For cubic blending functions the form given below is valid: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 23

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling Coons surface can be used

Linearly Blended Coons Surface 6. Surfaces and Surface Modeling Coons surface can be used by using ruled surfaces. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 24

6. Surfaces and Surface Modeling Bilinear Surface A bilinear surface is derived by interpolating

6. Surfaces and Surface Modeling Bilinear Surface A bilinear surface is derived by interpolating four data points, using linear equations in the parameters u and v so that the resulting surface has the four points at its corners, denoted; P 00, P 10, P 01, and P 11. P 0 v = (1 -v)P 00 + v. P 01 P 1 v = (1 -v)P 10 + v. P 11 Similarly P(u, v) can be obtained by using P 0 v ve P 1 v : P(u, v) = (1 -u)P 0 v + u. P 1 v By replacing P 0 v and P 1 v into P(u, v): Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 25

6. Surfaces and Surface Modeling Bilinear Surface Advantage: üTo supply 4 corner points is

6. Surfaces and Surface Modeling Bilinear Surface Advantage: üTo supply 4 corner points is enough Limitations: ÏBilinear surface is flat ÏSurfaces generally form in flat form Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 26

Bicubic Patch • • • 6. Surfaces and Surface Modeling As blending functions are

Bicubic Patch • • • 6. Surfaces and Surface Modeling As blending functions are not linear unlike bilinear surfaces it is possible to model nonlinear surface forms Extension of cubic curve 16 unknown coefficients - 16 boundary conditions Tangents and “twists” at corners of patch can be used Like Lagrange and Hermite curves, difficult to work with Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 27

Bicubic Patch Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical

Bicubic Patch Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering Department, GTU 28

Bicubic Patch To find 16 coefficients in C matrix 16 boundary conditions are necessary.

Bicubic Patch To find 16 coefficients in C matrix 16 boundary conditions are necessary. These are: Ø 4 corner points Ø 8 tangent vectors at corner points (in u and v directions at each point ) Ø 4 twist vectors at corner points Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 29

Bicubic Patch 6. Surfaces and Surface Modeling The twist vector at a point on

Bicubic Patch 6. Surfaces and Surface Modeling The twist vector at a point on a surface measures the twist in the surface at the point. It is the rate of change of the tangent vector Pu with respect to v or Pv with respect to u or it is the cross (mixed) derivative vector at the point. The normal to a surface is another important analytical property. The surface normal at a point is a vector which is perpendicular to both tangent vectors at the point. And the unit normal vector is given by: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 30

Bicubic Patch 6. Surfaces and Surface Modeling The Hermite bicubic surface can be written

Bicubic Patch 6. Surfaces and Surface Modeling The Hermite bicubic surface can be written in terms of the 16 input vectors: ; Hermite matrix ; geometri ya da sınır koşulu matrisi Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 31

Bicubic Patch 6. Surfaces and Surface Modeling P(u, v) equation can be further expressed

Bicubic Patch 6. Surfaces and Surface Modeling P(u, v) equation can be further expressed as: The second order twist vectors Puv are difficult to define. The Ferguson surface (also called the F-surface patch) is a bicubic surface patch with zero twist vectors at the patch corners. Thus, the boundary matrix for the F-surface patch becomes: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 32

Bicubic Patch 6. Surfaces and Surface Modeling F-surface patch This special surface is useful

Bicubic Patch 6. Surfaces and Surface Modeling F-surface patch This special surface is useful in design and machining applications. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 33

Bicubic Patch 6. Surfaces and Surface Modeling • Advantages – Boundary curves are Hermite

Bicubic Patch 6. Surfaces and Surface Modeling • Advantages – Boundary curves are Hermite curves – Interior points can be controlled • Disadvantages –What should be the twist factor? It is not esay to sense the effect of twist vector(Ferguson pacth twist vector is 0). – Cannot be used with high order polynomials. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 34

Bicubic Patch Example: 6. Surfaces and Surface Modeling Parametric bicubic surface is defined in

Bicubic Patch Example: 6. Surfaces and Surface Modeling Parametric bicubic surface is defined in terms of cartesian components for u=0. 5 and v=1: u=1/2, v=1 noktasındaki teğet vektörleri nelerdir? Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 35

Bicubic Patch Example: 6. Surfaces and Surface Modeling To find the tangent vectors it

Bicubic Patch Example: 6. Surfaces and Surface Modeling To find the tangent vectors it is necesary to differentiate with respect to u and v: (s=1/2, t=1) noktasında Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 36

Bezier Surfaces • • 6. Surfaces and Surface Modeling Bezier curves can be extended

Bezier Surfaces • • 6. Surfaces and Surface Modeling Bezier curves can be extended to surfaces Same problems as for Bezier curves: – no local modification possible – smooth transition between adjacent patches difficult to achieve Parametric space Dr. Ahmet Zafer Şenalp ME 521 Cartesian space Mechanical Engineering Department, GTU 37

Bezier Surfaces 6. Surfaces and Surface Modeling Bezier Surfaces: • Two sets of orthogonal

Bezier Surfaces 6. Surfaces and Surface Modeling Bezier Surfaces: • Two sets of orthogonal Bezier curves can be used to design an object surface. • A tensor product Bezier surface is an extension for the Bezier curve in two parametric directions u and v: • • 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. Curves are formed, when u is constant v changes in [0. . 1] when v is constant u changes in [0. . 1] Like in Beziér curves Bin(u) and Bjm(v) n. and m. degree Bernstein polynomials. Generally n=m=3: cubic Beziér patch is used. (4 x 4=16 control points; Pi, j is necessary. ) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 38

Bezier Surfaces 6. Surfaces and Surface Modeling P(u, v) is a point on the

Bezier Surfaces 6. Surfaces and Surface Modeling P(u, v) is a point on the surface and Pij are control points. These points form the control polygon’s vertex points. Below figure shows cubic Bezier patch. When n=3 and m=3 is placed in Bezier equation then Bezier patch equation becomes: Parametric space Dr. Ahmet Zafer Şenalp ME 521 Cartesian space Mechanical Engineering Department, GTU 39

Bezier Surfaces Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical

Bezier Surfaces Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering Department, GTU 40

Bezier Surfaces 6. Surfaces and Surface Modeling A 3 rd degree Bezier surface defined

Bezier Surfaces 6. Surfaces and Surface Modeling A 3 rd degree Bezier surface defined with 16 control points: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 41

Bezier Surfaces 6. Surfaces and Surface Modeling Open and closed Bezier surface examples Dr.

Bezier Surfaces 6. Surfaces and Surface Modeling Open and closed Bezier surface examples Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 42

B-Spline Surfaces • • • 6. Surfaces and Surface Modeling As with curves, B-spline

B-Spline Surfaces • • • 6. Surfaces and Surface Modeling As with curves, B-spline surfaces are a generalization of Bezier surfaces The surface approximates a control polygon Open and closed surfaces can be represented Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 43

B-Spline Surfaces 6. Surfaces and Surface Modeling A tensor product B-spline surface is an

B-Spline Surfaces 6. Surfaces and Surface Modeling A tensor product B-spline surface is an extension for the B-spline curve in two parametric directions u and v. For n=m=3, the equivalent bicubic formulation of an open and closed cubic B-spline surface can be derived as below. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 44

B-Spline Surfaces 6. Surfaces and Surface Modeling where [P] is an (n +1)×(m +1)

B-Spline Surfaces 6. Surfaces and Surface Modeling where [P] is an (n +1)×(m +1) matrix of the vertices of the characteristic polyhedron of the B-spline surface patch. For a 4× 4 cubic B-spline patch: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 45

B-Spline Surfaces 6. Surfaces and Surface Modeling B-Spline surface example Dr. Ahmet Zafer Şenalp

B-Spline Surfaces 6. Surfaces and Surface Modeling B-Spline surface example Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 46

NURBS 6. Surfaces and Surface Modeling NURBS surface (Non-Uniform Rational B-Spline surface) is a

NURBS 6. Surfaces and Surface Modeling NURBS surface (Non-Uniform Rational B-Spline surface) is a generilization to Bézier and Bsplines surfaces. NURBS is used widely in computer graphics in CAD applications. A NURBS surface is a parametric surface defined with its degree. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 47

NURBS Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering

NURBS Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering Department, GTU 48

Triangular Patches 6. Surfaces and Surface Modeling In triangulation techniques, three parameters u, v

Triangular Patches 6. Surfaces and Surface Modeling In triangulation techniques, three parameters u, v and w are used and the parametric domain is defined by a symmetric unit triangle 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) Cartesian space Dr. Ahmet Zafer Şenalp ME 521 Parametric space Mechanical Engineering Department, GTU 49

Triangular Patches 6. Surfaces and Surface Modeling A triangular Bezier patch is defined by:

Triangular Patches 6. Surfaces and Surface Modeling A triangular Bezier patch is defined by: For example, a cubic triangular patch is; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 50

Triangular Patches 6. Surfaces and Surface Modeling For n=4, the triangular patch is defined

Triangular Patches 6. Surfaces and Surface Modeling For n=4, the triangular patch is defined as; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 51

Triangular Patches Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical

Triangular Patches Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering Department, GTU 52

Free Form Surface Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling

Free Form Surface Dr. Ahmet Zafer Şenalp ME 521 6. Surfaces and Surface Modeling Mechanical Engineering Department, GTU 53

Sculptured Surface 6. Surfaces and Surface Modeling • General surface form • Composed of

Sculptured Surface 6. Surfaces and Surface Modeling • General surface form • Composed of united surface pieces Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 54

Subdivision Surface 6. Surfaces and Surface Modeling New points are added between control points

Subdivision Surface 6. Surfaces and Surface Modeling New points are added between control points by interpollation to obtain a fine surface Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU 55