You are on page 1of 17

GEOMETRIC MODELING

AND 2D
TRANSFORMATION
Lecture 2- Prof. Ehsan T Esfahani
Spring 2016

Mathematical background β€’ Goal: Study of geometrical properties such as shape. properties of space. size. and positioning of CAD model By the end of this lecture(s) you should be able to perform the following 2D operations: .

volume.Definitions β€’ Scalar (a): Numbers representing magnitude and quantities such as length. speed β€’ Vectors (𝑽): Set of scalars [𝑣1 𝑣2 … 𝑣𝑛 ] representing both direction and magnitude β€’ Points (P): Representation of location in space [𝑝1 𝑝2 … 𝑝𝑛 ] Scalar: Latin alphabets Points: (…) Vector: [ …] . area.

π‘ˆ = 𝑒2 β†’ π‘Š = 𝑉 + π‘ˆ = 𝑣2 + 𝑒2 𝑒3 𝑣3 𝑣3 + 𝑒3 β€’ Scalar Multiplication: α𝑣1 α𝑉 = α𝑣2 α𝑣3 𝑉 π‘ˆ π‘Š 𝑉 𝛼𝑉. 𝛼 > 1 β€’ Vector multiplications (dot and cross) β€’ Operations on Points β€’ Point-point subtraction results in a vector.Operations on points and vectors: β€’ Vector operations β€’ Addition: 𝑣1 𝑒1 𝑣1 + 𝑒1 𝑉 = 𝑣2 . This is the same as point-vector addition Q-P = 𝑉 β†’ 𝑃 + 𝑉=Q β€’ Point-point addition is not defined 𝑃 𝑉 𝑄 .

Vector Space β€’ Vector Space is a set of vector on which two operations are defined: β€’ Vector Addition β€’ Scalar Multiplication β€’ Vector space lack position specification β€’ We can not precisely define 3D geometry in vector space .

Affine Space β€’ Space elements: β€’ Vector space β€’ Points β€’ There is no special point Parallelism and ratio of lengths β€’ Defined operations: β€’ Vector-Vector addition β€’ Scalar-vector multiplication β€’ Point-vector addition (equivalent to point-point subtraction) β€’ Scalar-scalar operations We defined all the 2D transformation in the affine space .

S. R.…) can be defined using different values of a β€’ Generalization (Affine Sum) 𝛼1 𝛼2 𝑉 =π‘βˆ’π‘ž β†’ 𝑃 𝛼 = π‘ž + 𝛼 𝑝 βˆ’ π‘ž = (1 βˆ’ 𝛼)π‘ž + 𝛼𝑝 and 𝛼1 + 𝛼2 = 1 𝑃 𝛼 = 𝑛 𝑖=1 𝛼𝑖 𝑝𝑖 .Parametric Line (Affine space) β€’ Set of all points (𝑃) passing through 𝑄 π‘Ÿ in the direction of vector 𝑉 π‘ž 𝑃 𝛼 = π‘ž + 𝛼𝑉 βˆ’βˆž ≀ 𝛼 ≀ ∞ 𝑉 𝑝 𝑠 β€’ All the points on the line (P. & 𝑛 𝑖=1 𝛼𝑖 =1 βˆ’βˆž ≀ 𝜢 ≀ ∞ .

& 𝑛 𝑖=1 𝛼𝑖 =1 𝟎 ≀ 𝜢i 𝑝5 .Convexity β€’ An object is convex iff for any two points in the object all points on the line segments between these points are also in the object Convex Not Convex Convex Hull 𝑝2 𝑝1 β€’ Convex hall of a set X of points is the 𝑝3 𝑝4 smallest convex set that contains X 𝑝6 𝑃 𝛼 = 𝑛 𝑖=1 𝛼𝑖 𝑝𝑖 .

Affine Space β€’ The universe of parallel lines β€’ No angle (there is no dot product) β€’ No measurement of length (there is no dot product) β€’ No Special point (origin) β€’ Look at affine space as a vector space with no commitment to any origin point 𝑃 𝛼 = 𝑛 𝑖=1 𝛼𝑖 𝑝𝑖 . & 𝑛 𝑖=1 𝛼𝑖 =1 .

π‘ˆ = 𝑒2 β€’ Angle 𝑣3 𝑒3 β€’ Orthogonal projection β†’ 𝑉. π‘ˆ = 𝑖 𝑣𝑖 𝑒𝑖 = 𝑉 π‘ˆ π‘π‘œπ‘ πœƒ > 0 β€’ Length of a vector (distance between two points) 𝑝 βˆ’ π‘ž = 𝑉 π‘Žπ‘›π‘‘ 𝑉 = 𝑉. 𝑉 𝑉 π‘ˆ . 𝑉 β€’ Angle between two vectors (or lines) πœƒ = cosβˆ’1 π‘ˆ.Euclidian Space β€’ Affine Space + inner product 𝑉 πœƒ β€’ Using inner product we can find: π‘ˆ 𝑣1 𝑒1 β€’ Distance 𝑉 = 𝑣2 .

𝑽 𝑽𝒖 = 𝑼 𝑼 𝑼 Cross Product π‘ˆ Γ— 𝑉 = π‘Š.𝑉 𝑉 π‘ˆ π‘ˆ 𝑼.𝑉 π‘ˆ 𝑉 π‘ˆ π‘ˆ and cos πœƒ = = π‘ˆ.Orthogonal Projection β€’ Direction of 𝑽𝒖 : Same as π‘ˆ β†’ π‘ˆ π‘ˆ 𝑉 πœƒ 𝑉𝑒 β€’ Amplitude of 𝑽𝒖 : 𝑉𝑒 = 𝑉 cos πœƒ β€’ 𝑉𝑒 = 𝑉 cos πœƒ β€’ 𝑉𝑒 = 𝑉 π‘ˆ π‘ˆ π‘ˆ.𝑉 π‘ˆ π‘ˆ π‘ˆ π‘ˆ. π‘Š = 𝑉 π‘ˆ sin πœƒ = 2𝑆 𝑖 π‘Š = 𝑒1 𝑣1 𝑗 𝑒2 𝑣2 π‘˜ 𝑒3 𝑣3 𝑉 πœƒ 𝑆 π‘ˆ .

𝑐𝑛 . 𝑉𝑛 . . . 𝑐𝑖 = 0 𝑖=1 β€’ This means that one vector can not be represented in terms of other vectors . . . .Linear Combination β€’ if we have several vectors 𝑉1 . . we can form the linear combination 𝑛 𝑐𝑖 𝑉𝑖 𝑖=1 β€’ Set of vectors 𝑉1 . 𝑐2 . 𝑉2 . . . . . . 𝑉2 . and scalars 𝑐1 . . 𝑉𝑛 are linear independent iff 𝑛 𝑐𝑖 𝑉𝑖 = 0 .

Dimension of Vector Space β€’ Minimum number of linearly independent vectors needed to span the space β€’ Spanning the space: representing any possible vectors in the space β€’ Any set of linearly independent vectors form a basis β€’ For a given basis. any vector in that space can be uniquely represented by linear combination of basis .

𝑣2 .Frame β€’ Basis (𝑣1 . 𝑣𝑛 ) + origin (π‘ƒπ‘œ ) β€’ Every vector can be written as 𝑛 𝑉= 𝑐𝑖 𝑣𝑖 𝑖=1 β€’ Every point can be written as 𝑛 𝑃 = π‘ƒπ‘œ + π‘Žπ‘– 𝑣𝑖 𝑖=1 . . . . .

𝑦. 𝑧] β€’ Easy to distinguish points and vecotrs 𝑀≠0 . wy. 𝑧. w β†’ π‘₯.Homogenous Coordinates β€’ n+1 dimension to represent n dimensional space 𝑹𝒏 β€’ Examples in π‘ΉπŸ‘ (Can be generalized to π‘ΉπŸ’ ) β€’ Points β€’ Vectors wx. wz. 𝑦. 𝑧 . 0 ↔ [π‘₯. π‘₯. 𝑦.

Using Frames in HC (2D Example) β€’ Points 𝑃 = 𝛼1 𝛼2 𝑣1 1 𝑣2 π‘ƒπ‘œ β€’ Vectors 𝑉 = 𝑐1 𝑐2 𝑣1 0 𝑣2 π‘ƒπ‘œ .

Points and Vector Relationship β€’ Vector + Vector = Vector β€’ Point + Vector = Point β€’ Point – Point = Vector 𝑉 + π‘ˆ = π‘ˆ+𝑉 0 0 0 𝑃 + 𝑉 = 𝑃+𝑉 1 0 1 π‘ž 𝑃 βˆ’ = π‘žπ‘ 1 1 0 .