Upload
gerda
View
72
Download
1
Tags:
Embed Size (px)
DESCRIPTION
ME 521 Computer Aided Design. 6. Surfaces and Surface Modeling. Dr . Ahmet Zafer Şenalp e-mail: [email protected] Makine Mühendisliği Bölümü Gebze Yüksek Teknoloji Enstitüsü. Types od Surfaces. 6. Surfaces and Surface Modeling. Analytical Surfaces Primitive surfaces Plane surface - PowerPoint PPT Presentation
Citation preview
6. Surfaces and Surface Modeling
Assoc.Dr. Ahmet Zafer Şenalpe-mail: [email protected]
Mechanical Engineering DepartmentGebze Technical University
ME 521Computer Aided Design
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
Types od Surfaces
Dr. Ahmet Zafer Şenalp ME 521 2Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
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
Surface Patch
Dr. Ahmet Zafer Şenalp ME 521 3Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
v
u
Isoparametric curves
Surface Patch
Dr. Ahmet Zafer Şenalp ME 521 4Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Surface Patch
u=ui
v=vj
v=0
v=1
p(ui,vj)-
n(ui,vj)-
Dr. Ahmet Zafer Şenalp ME 521 5Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Analytical Surfaces
Primitive surfaces Plane surface Offset surface Tabulated cylinder Surface of revolution Swept surface Ruled surface
Dr. Ahmet Zafer Şenalp ME 521 6Mechanical Engineering Department,
GTU
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 7Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Primitive Surfaces
• PlaneP(u, v) = u i + v j + 0 k
• CylinderP(u, v) = R cos u i + R sin u j + v k
• SphereP(u, v) = R cos u cos v i + R sin u cos v j + R sin v k
• ConeP(u, v) = m v cos u i + m v sin u j + v k
• TorusP(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 8Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Defined by 3 points and 3 vectors
Planar Surface
)()(),( 02010 ppvppupvup 10;10 vu
Dr. Ahmet Zafer Şenalp ME 521 9Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Planar Surface
)()(),( 02010 ppvppupvup 10;10 vu
)ˆ()ˆ),( 02010 sppvrppupvup 10;10 vu
normal surface ;srn
VectorsDirection Normalized ;pppps ;
ppppr
02
02
01
01
Dr. Ahmet Zafer Şenalp ME 521 10Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Offset Surface
Offset yönü
Dr. Ahmet Zafer Şenalp ME 521 11Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Tabulated Cylinder
• Curve is projected along a vector• In most CAD software it is called as “extrusion”
Surface generation curve
Vector
Dr. Ahmet Zafer Şenalp ME 521 12Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Surface of Revolution
• Revolve curve about an axis
Axis
Curve
Dr. Ahmet Zafer Şenalp ME 521 13Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Surface of Revolution
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 14Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Swept Surface
• Defining curve swept along an arbitrary spine curve
Defining curve
Spine
Dr. Ahmet Zafer Şenalp ME 521 15Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Ruled Surface
• 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
Edge curve 1
Edge curve 2
Linear interpolation
Dr. Ahmet Zafer Şenalp ME 521 16Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Ruled Surface
Edge curves: G(u) ve 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.
C1(u)=G(u) C2(u)=Q(u)
Dr. Ahmet Zafer Şenalp ME 521 17Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Synthetic Surfaces
Coons patches Bilinear surface Bicubic surface Bezier surface B-spline surface NURBS surface
Dr. Ahmet Zafer Şenalp ME 521 18Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
p00
p11
p01
p10
v
u
D1
D0
C1
C0
Dr. Ahmet Zafer Şenalp ME 521 19Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
• 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 20Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
• 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 21Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
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 22Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
–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:
In the above matrix left column is P1(u,v), middle column is P2(u,v), right column is P3(u,v).
Dr. Ahmet Zafer Şenalp ME 521 23Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Linearly BlendedCoons Surface
Coons surface can be used by using ruled surfaces.
Dr. Ahmet Zafer Şenalp ME 521 24Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bilinear SurfaceA bilinear surface is derived by interpolating four data points, using linear equationsin the parameters u and v so that the resulting surface has the four points at its corners,denoted; P00, P10, P01, and P11.
P0v = (1-v)P00 + vP01
P1v = (1-v)P10 + vP11
Similarly P(u, v) can be obtained by using P0v ve P1v :P(u, v) = (1-u)P0v + uP1v
By replacing P0v and P1v into P(u, v): ]vP-v)Pu[(]vP-v)P-u)[( (P(u, v) 11100100 111
11
10
01
00
1111
PPPP
uv-u)v(-v)u(-v)-u)((P(u, v)
Dr. Ahmet Zafer Şenalp ME 521 25Mechanical Engineering Department,
GTU
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 26Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
• 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 27Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
Dr. Ahmet Zafer Şenalp ME 521 28Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
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 29Mechanical Engineering Department,
GTU
Bicubic Patch
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 30Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
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 31Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
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 atthe patch corners. Thus, the boundary matrix for the F-surface patch becomes:
Dr. Ahmet Zafer Şenalp ME 521 32Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
F-surface patch
This special surface is useful in design and machining applications.Dr. Ahmet Zafer Şenalp ME 521 33Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic Patch
• 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 34Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic PatchExample:
Parametric bicubic surface is defined in terms of cartesian components for u=0.5 and v=1:
11020112110112015
1),(2
3
23
vvv
uuuvux
11201201301001101
1),(2
3
23
vvv
uuuvuy
10010015000121210
1),(2
3
23
vvv
uuuvuz
u=1/2, v=1 noktasındaki teğet vektörleri nelerdir?
Dr. Ahmet Zafer Şenalp ME 521 35Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bicubic PatchExample: To find the tangent vectors it is necesary to differentiate with respect to u and v:
14
1111
1020112110112015
01175,0),(
vuxs
25,9
1111
1201201301001101
01175,0),(
vuys
12
1111
0010015000121210
01175,0),(
vuzs
(s=1/2,t=1) noktasında
1vvv
matrixrelated
01u2u3P2
3
2u
01v2v3
matrixrelated
1uuuP
2
23v
375,11
0123
1020112110112015
15,025,0125,0),(
vuxt
25,11
0123
1201201301001101
15,025,0125,0),(
vuyt
10
0123
0010015000121210
15,025,0125,0),(
vuzt
kjiPu 1225,914 kjiPv 1025,11375,11 Dr. Ahmet Zafer Şenalp ME 521 36Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
• 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 Cartesian space
Dr. Ahmet Zafer Şenalp ME 521 37Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
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 Bj
m(v) n. and m. degree Bernstein polynomials.• Generally n=m=3: cubic Beziér patch is used. (4x4=16 control points; Pi,j is necessary.)
Dr. Ahmet Zafer Şenalp ME 521 38Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
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 Cartesian space
Dr. Ahmet Zafer Şenalp ME 521 39Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
Dr. Ahmet Zafer Şenalp ME 521 40Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
A 3rd degree Bezier surface defined with 16 control points:
Dr. Ahmet Zafer Şenalp ME 521 41Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Bezier Surfaces
Open and closed Bezier surface examples
Dr. Ahmet Zafer Şenalp ME 521 42Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
B-Spline Surfaces
• 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 43Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
B-Spline Surfaces
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-splinesurface can be derived as below.
Dr. Ahmet Zafer Şenalp ME 521 44Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
B-Spline Surfaces
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 45Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
B-Spline Surfaces
B-Spline surface example
Dr. Ahmet Zafer Şenalp ME 521 46Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
NURBS
NURBS surface (Non-Uniform Rational B-Spline surface) is a generilization to Bézier and B-splines 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 47Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
NURBS
Dr. Ahmet Zafer Şenalp ME 521 48Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Triangular Patches
Cartesian space Parametric space
In triangulation techniques, three parameters u, v and w are used and the parametric domain is defined by a symmetric unit triangle
10 ,10 ,10 wvu
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 inthe domain)
Dr. Ahmet Zafer Şenalp ME 521 49Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Triangular Patches
A triangular Bezier patch is defined by:
For example, a cubic triangular patch is;
Dr. Ahmet Zafer Şenalp ME 521 50Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Triangular Patches
For n=4, the triangular patch is defined as;
Dr. Ahmet Zafer Şenalp ME 521 51Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Triangular Patches
Dr. Ahmet Zafer Şenalp ME 521 52Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Free Form Surface
Dr. Ahmet Zafer Şenalp ME 521 53Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Sculptured Surface
• General surface form• Composed of united surface pieces
Dr. Ahmet Zafer Şenalp ME 521 54Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling
Subdivision Surface
New points are added between control points by interpollation to obtain a fine surface
Dr. Ahmet Zafer Şenalp ME 521 55Mechanical Engineering Department,
GTU
6. Surfaces and Surface Modeling