SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions...

26
SOME 024: Computer Aided Design E. Rozos

Transcript of SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions...

Page 1: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

SOME 024:Computer Aided Design

E. Rozos

Page 2: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Introduction to CAD theorypart 1

Page 3: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Lesson structure• Definitions (raster-vector, topology-geometry,

coordinates, projections)• Basic 2D shapes• 3D geometric modelling• Parametric shapes• Surface modelling

Page 4: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-type of graphics

Vector graphics

Raster graphicsThe objects are represented with a set of pixels-cells laid on a grid.

The objects are represented with geometrical primitives.

Page 5: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Raster graphics

Vector graphics

Definitions-type of graphics

Applications: link the spatial data with other kind of information (e.g. height, temperature, mean annual rainfall), spatial related operations (aggregation, interpolation), spatial queries, spatial statistics, 2D numerical models.Data storage: binary with the form of a 2D matrix

Applications: Geometrical operations (intersections, union), objects are handled as entities, representation accuracy.Data storage: parametrically using analytical forms

Page 6: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-topology geometryTopologyThe branch of mathematics dealing with the Connectivity of geometric elements not including specific information of those elements.

GeometryThe branch of mathematics dealing with the measurements of lines, angles, surfaces and solids.

Topological representation of

the Internet

Page 7: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-coordinate types

3D cartesian coordinates (x,y,z)2D cartesian coordinates (x,y)

Suitable for spaces described by Euclidian geometry.

Cartesian coordinates

Page 8: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-coordinate types

2D Homogeneous coordinates (x,y,w). Each point on plain W=1 is associated with a line joining it with the origin of the 3D space.

Transformation of a circle disk to elliptical disk.

Homogeneous coordinates

W=1 plane

Ellipticaldisc

Circulardisc

W=1 plane

Rotation of cone ofLines about the Y axis

Page 9: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-coordinate types

(6,4.5,-2)(2,4.5,-2)P6

(7,2.5,-2)(3,2.5,-2)P5

(6,2.5,-2)(2,2.5,-2)P4

(6,2.5,1)(2,2.5,1)P3

(7,2.5,1)(3,2.5,1)P2

(6,4.5,1)(2,4.5,1)P1

New coordinates

Original coordinates

Corner points

TransformationsTranslation, rotation, reflection, scaling, inversion, shearing.

(-4.5,2,-2)(2,4.5,-2)P6

(-2.5,3,-2)(3,2.5,-2)P5

(-2.5,2,-2)(2,2.5,-2)P4

(-2.5,2,1)(2,2.5,1)P3

(-2.5,3,1)(3,2.5,1)P2

(-4.5,2,1)(2,4.5,1)P1

New coordinates

Original coordinates

Corner points

Translation

Rotation

Page 10: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-coordinate types

1000

∆z100

∆y010

∆x001

1000

0cos θsin0

0-sin θcos θ0

0001

1000

0100

00cos θsin

00-sin θcos θ

Mathematic implementation of the transformations using 3D homogeneous coordinates.

1000

0cos θ0-sin θ

0010

0sin θ0cos θ

Translation T=Rotation around x Rx=

Rotation around z Rz=

Rotation around y Ry= Scaling S=

0

Sz

0

0

100

000

0Sy0

00Sx

Apply translation, rotation around x, rotation around y to P1:P2=RyRxT P1Undo:P1=T-1 Rx

-1 Ry-1 P2

Page 11: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-coordinate types2D polar coordinates (r, θ)x = r cosθ, y = r sinθApplications in problems with circular symmetry (point heat source in an infinite plate)

3D cylindrical coordinates (r, θ, Z)x = r cosθ, y = r sinθ, z = Z

3D spherical coordinates (r, θ, φ)x = r sinφ cosθ, y = r sinφ sinθ, z = r cosφApplied in non Euclidean spaces.

Page 12: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-projection types

Oblique, only sizes parallel to projection plane are preserved

Isometric, axes equally foreshortened

Parallel projection

Page 13: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Orthographic Multi-views projection

Definitions-projection types

1st angle projection(viewer inside box)

3rd angle projection(viewer outside box)

Page 14: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Definitions-projection typesPerspective projection

3d object

Projection planeEyeEasy to conceive the 3D form, shape and size to scale are not preserved

Page 15: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Basic 2D shapes-line segment

Two points Tangent to a circle

Parallel to lin. seg. through specified point

Parallel to an axis

Parallel to a lin. seg.at specified distance

From a point withspecified length and angle

Page 16: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Basic 2D shapes-circle, arc

Centre, start, end point Three pointsTangent to figure given radius + end point.

Centre, peripheral point Centre, radius Two points

Page 17: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Wire frame modelling

1. The geometric data (coordinate positions of the vertices)

2. The topological data (relate pairs of vertices together as edges)

A wire frame representation of a 3D object consist of a finite set of points (vertices) and connecting edges. The representation is a trade of between fidelity and easiness of representation.

The wire frame representation consist of two types of information concerning:

Page 18: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

3D geometric modelling

Topological dataGeometric data

The simplest representation of a cone with only 3 vertices, 1 vertex for the apex, 2 vertices defining the diameter of the base. The fidelity may be improved by adding more vertices to the base.

Page 19: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

3D geometric modellingLow level constrains• Each vertex described by 3 coordinate values• Each edge associated with only 2 vertices• Edges must form close loops• Edges should not intersect

Object validity is not guaranteed

Page 20: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Parametric curve and surface geometry

p1

p2

u

Parametric form of a straight line with 2 control points (p1, p2)r(u) = (1-u) p1 + u p2

Parametric bilinear surface with 4 control points (p1, p2, p3, p4) r(u,v) = (1-v) (1-u) p1 + (1-v) u p2 + v (1-u) p3 + v u p4

Page 21: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

r(u) = (1-u)3 p1 + 3u(1-u)2 q1 + 3u2 (1-u) q2 + u3 p2

Bezier bicubic parametric patch with 16 control points (p1,…, p4, q1,…, q12)

Bezier cubic parametric curve 4 control points (p1, q1, q2, p2)

Parametric curve and surface geometry

Page 22: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Splines

For n given points there exists a unique polynomial of degree n-1 or less which passes through these points.

A spline is a piecewise polynomial such that the function (G0), its derivative (G1) and its second derivative (G2) are continuous at the interpolation nodes.

Parametric curve and surface geometry

Page 23: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Non uniform rational Basis-Splines (NURBS)

Parametric curve and surface geometry

A NURBS curve is defined by:

• its order i.e. the maximum degree of the polynomial basis

functions.

• a set of control points i.e. the points from which the curve passes.

• a knot vector that determines where and how the control points

affect the NURBS curve; the number of knots is always equal to

the number of control points plus curve degree plus one.

Page 24: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Non uniform rational Basis-Splines (NURBS)

Parametric curve and surface geometry

Basis functions used in NURBS.

Ni,n = fi,nNi,n-1 + gi+1,nNi+1,n−1

where i the ith control point, n degree of basis function, f and g

weigthing functions depending on knots.

Knots (2 + 1 +1) Control points

Controlpoints

Curvedegree

N0,1 N1,1

f g

N0,2

0 1 2 2.50 1

Knotspan

From here to herecp 1 deactivated, cp 3 activated

1 2 3Control points (cp)

Page 25: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Surface modelling

Creation methods1. The user supplies an array of control points. The surface

modeller fits a Bezier bicubic parametric patch to the control features.

2. The 3D surface is created either by sweeping a curve along a guide rail or by lofting a mesh of curves.

Test the aesthetic and functionality of surfaces in components such as car bodies or simulated the fluid dynamics (turbine blades, boat hulls, etc.)

Page 26: SOME 024: Computer Aided Design · Wire frame modelling 1. The geometric data (coordinate positions of the vertices) 2. The topological data (relate pairs of vertices together as

Surface modelling

Lofting