Error Resilience Coding

Download Report

Transcript Error Resilience Coding

Basics of Analytical Geometry
By
Kishore Kulkarni
1
Outline
 2D Geometry


Straight Lines, Pair of Straight Lines
Conic Sections
 Circles, Ellipse, Parabola, Hyperbola
 3D Geometry

Straight Lines, Planes, Sphere, Cylinders
 Vectors


2D & 3D Position Vectors
Dot Product, Cross Product & Box Product
 Analogy between Scalar and vector representations
2
2D Geometry
 Straight Line


ax + by + c = 0
y = mx + c, m is slope and c is the y-intercept.
 Pair of Straight Lines
ax2 + by2 + 2hxy + 2gx + 2fy + c = 0
where abc + 2fgh – af2 – bg2 – ch2 = 0

3
Conic Sections
 Circle, Parabola, Ellipse, Hyperbola
 Circle – Section Parallel to the base of the cone
 Parabola - Section inclined to the base of the cone
and intersecting the base of the cone
 Ellipse - Section inclined to the base of the cone and
not intersecting the base of the cone
 Hyperbola – Section Perpendicular to the base of
the cone
4
Conic Sections
 Circle: x2 + y2 = r2 , r => radius of circle
 Parabola: y2 = 4ax or x2 = 4ay
 Ellipse: x2/a2 + y2/b2 =1, a is major axis & b is
minor axis
 Hyperbola: x2/a2 - y2/b2 =1.
In all the above equation, center is the origin.
Replacing x by x-h and y by y-k, we get equations
with center (h,k)
5
Conic Sections
 In general, any conic section is given by
ax2 + by2 + 2hxy + 2gx + 2fy + c = 0
where abc + 2fgh – af2 – bg2 – ch2 != 0
 Special cases




h2 = ab, it is a parabola
h2 < ab, it is an ellipse
h2 > ab, it is a hyperbola
h2 < ab and a=b, it is a circle
6
3D Geometry
 Plane - ax + by + cz + d = 0
 Sphere - x2 + y2 + z2 = r2
(x-h)2 + (y-k)2 + (z-l)2 = r2 , if center is (h, k, l)
 Cylinder - x2 + y2 = r2, r is radius of the base.
(x-h)2 + (y-k)2 = r2 , if center is (h, k, l)
7
3D Geometry
 Question
What region does this inequality represent in a 3D
space ?
9 < x2 + y2 + z2 < 25
8
3D Geometry
 Straight Lines
Parametric equations of line passing through (x0, y0, z0)
x = x0 + at, y = y0 + bt, z = z0 + ct
 Symmetric form of line passing through (x0, y0, z0)
(x - x0)/a = (y - y0)/b = (z - z0)/c

where a, b, c are the direction numbers of the line.
9
Vectors
 Any point in P in a 2D plane or 3D space can be
represented by a position vector OP, where O is the
origin.
 Hence P(a,b) in 2D corresponds to position vector
< a, b> and Q(a, b, c) in 3D space corresponds to
position vector < a, b, c>
 Let P <x1, y1, z1> and Q < x2, y2, z2 > then vector
PQ = OQ – OP = < x2 – x1, y2 – y1, z2 – z1>
 Length of a vector v = < v1, v2, v3> is given by
|v| = sqrt(v12 + v22 + v32)
10
Dot (Scalar) Product of vectors
 Dot product of two vectors a = a1i + a2j + a3k
and b = b1i + b2j + b3k is defined as
a.b = a1b1 + a2b2 + a3b3.
 Dot Product of two vectors is a scalar.
 If θ is the angle between a and b, we can write
a.b = |a||b|cosθ
 Hence a.b = 0 implies two vectors are orthogonal.
 Further a.b > 0 we can say that they are in the same general
direction and a.b < 0 they are in the opposite general
direction.
 Projection of vector b on a = a.b / |a|
 Vector Projection of vector b on a = (a.b / |a|) ( a / |a|)
11
Direction Angles and Direction Cosines
 Direction Angles α, β, γ of a vector a = a1i + a2j +
a3k are the angles made by a with the positive
directions of x, y, z axes respectively.
 Direction cosines are the cosines of these angles.
We have
cos α = a1/ |a|, cos β = a2/ |a|, cos γ = a3/ |a|.
 Hence cos2 α + cos2 β + cos2 γ = 1.
 Vector a = |a| <cos α, cos β, cos γ>
12
Cross (Vector) Product of vectors
 Cross product of two vectors a = a1i + a2j + a3k
and b = b1i + b2j + b3k is defined as
a x b = (a2b3 – a3b2)i +(a3b1 – a1b3)j +(a1b2 – a2b1)k.
 a x b is a vector.
 a x b is perpendicular to both a and b.
 | a x b | = |a| |b| sinθ represents area of
parallelogram.
13
Cross (Vector) Product
 Question
What can you say about the cross product of
two vectors in 2D ?
14
Box Product of vectors
 Box Product of vectors a, b and c is defined as
V = a.(b x c)
 Box Product is also called Scalar Tripple
Product
 Box product gives the volume of a
parallelepiped.
15
Vector Equations
 Equation of a line L with a point P(x0, y0, z0) is given by
r = r0 + tv
where r0 = < x0, y0, z0>, r = < x, y, z>, v = <a, b, c> is a
vector parallel to L, t is a scalar.
 Equation of a plane is given by
n.(r - r0) = 0
where n is a normal vector, which is analogous to the scalar
equation
a (x- x0) + b (y- y0) + c (z- z0) = 0
16
Vector Equations
 Let a and b be position vectors of points
A(x1, y1,z1) and B(x2, y2,z2). Then position vector of
the point P dividing the vector AB in the ratio m:n
is given by
p = (mb + na) / (m+n)
which corresponds to
P = ((mx2 + nx1)/(m+n), (my2 + ny1)/(m+n), (mz2 + nz1)/(m+n))
17