Download Geometry review, part I Geometry review I

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Lie derivative wikipedia , lookup

Dual space wikipedia , lookup

Analytic geometry wikipedia , lookup

Duality (projective geometry) wikipedia , lookup

Cartesian coordinate system wikipedia , lookup

Cross product wikipedia , lookup

Metric tensor wikipedia , lookup

Riemannian connection on a surface wikipedia , lookup

Line (geometry) wikipedia , lookup

Tensors in curvilinear coordinates wikipedia , lookup

Curvilinear coordinates wikipedia , lookup

Covariance and contravariance of vectors wikipedia , lookup

Transcript
Geometry review, part I
 2005, Denis Zorin
Geometry review I
Vectors and points
Q
points and vectors
Q
Geometric vs. coordinate-based (algebraic)
approach
Q
operations on vectors and points
Lines
Q
implicit and parametric equations
Q
intersections, parallel lines
Planes
Q
implicit and parametric equations
Q
intersections with lines
 2005, Denis Zorin
13
Geometry vs. coordinates
Geometric view: a vector is a directed line segment,
with position ignored.
different line segments (but with the same length and
direction) define the same vector
A vector can be thought of as a translation.
Algebraic view: a vector is a pair of numbers
 2005, Denis Zorin
Vectors and points
Vector = directed segment with position ignored
w
-w
v
v+w
addition
w
negation
w
cw
multiplication by
number
Operations on points and vectors:
point - point = vector
point + vector = point
 2005, Denis Zorin
14
Dot product
Dot product: used to compute projections, angles
and lengths.
Notation: (w·v) = dot product of vectors w and v.
w
α
(w·v) = |w| |v| cosα,
|v| = length of v
v
Properties:
if w and v are perpendicular, (w·v) = 0
(w·w) = |w|2
angle between w and v: cosα = (w·v)/|w||v|
length of projection of w on v: (w·v)/|v|
 2005, Denis Zorin
Coordinate systems
For computations, vectors can be described as
pairs (2D), triples (3D), … of numbers.
Coordinate system (2D) =
point (origin) + 2 basis vectors.
Orthogonal coordinate system:
basis vectors perpendicular.
Orthonormal coordinate system:
basis vectors perpendicular and of unit length.
Representation of a vector in a coordinate system:
2 numbers equal to the lengths (signed) of
projections on basis vectors.
 2005, Denis Zorin
15
Operations in coordinates
v = (v·ex)ex + (v·ey)ey
ey
vy
vx
works only for orthonormal
coordinates!
v
v = vx ex + vy ey = [ vx, vy ]
ex
Operations in coordinate form:
v + w = [ vx, vy ] + [ wx, wy ] = [vx + wx, vy + wy]
-w = [ -wx, -wy ]
α w = = [α wx, α wy ]
 2005, Denis Zorin
Dot product in coordinates
| v || w | cos α =| v || w | cos(α v − α w )
=| v || w | (cos α v cos α w + sin α v sin α w )
vy
wy
v
=| v || w | (v x w x / | v || w | + v y w y / | v || w |)
α
αw αv
vx
= vx w x + vyw y
w
wx
Linear properties become obvious:
( (v+w)·u) = (v·u) + (w·u)
(av·w) = a(v·w)
 2005, Denis Zorin
16
3D vectors
Same as 2D (directed line segments with position
ignored), but we have different properties.
In 2D, the vector perpendicular to a given vector
is unique (up to a scale).
In 3D, it is not.
Two 3D vectors in 3D can be multiplied to get a
vector (vector or cross product).
Dot product works the same way, but the
coordinate expression is
(v·w) = vxwx+ vywy + vzwz
 2005, Denis Zorin
Vector (cross) product
v × w has length v w sin α
w
v
= area of the
parallelogram with two
sides given by v and w,
and is perpendicular to
the plane of v and w.
( v + w ) × u = v × u + w × u Direction (up or down) is
(cv) × w = c( v × w )
v×w = - w ×v
 2005, Denis Zorin
determined by
the right-hand rule.
unlike a product of numbers or
dot product, vector product is not
commutative!
17
Vector product
Coordinate expressions
v × w is perpendicular to v, and w:
(u·v) = 0
(u·w ) = 0
the length of u is v w sin α :
2
2
2
2
(u·u) = v w sin2 α = v w (1 − cos2 α)
= v w ( v w − (v, w ))
Solve three equations for ux, uy, uz
 2005, Denis Zorin
Vector product
Physical interpretation: torque
torque =
r×F
axis of
rotation
force F
displacement
r
 2005, Denis Zorin
18
Vector product
Coordinate expression:
 ex

det  v x
w x

ey
vy
wy
ez 
 vy
 
v z  = det 

w y
w z  
vz 
v
,− det  x

wz 
w x
vz 
 vx
, det 

wz 
w x
vy 

w y  
Notice that if vz=wz=0, that is, vectors are 2D, the cross
product has only one nonzero component (z) and
its length is the determinant
 vx vy 
det 

w x w y 
 2005, Denis Zorin
Vector product
More properties
(a·(b × c)) = b(a·c) − c(a·b)
((a × b)·(c × d)) = (a·c)(b·d) − (b·c)(a·d)
 2005, Denis Zorin
19
Line equations
Intersecting two lines:
take one in implicit form:((q − p1)· n1) = 0
the other in parametric: q = p2 + v2 t
If qi = p2 + v2 t i is the intersection point, it satisfies
both equations.
Plug parametric into implicit, solve for ti :
((p2 + v2 ti − p1)·n2 ) = 0
If (v2 ·n1) ≠ 0 , then t i = −
(p2 − p1·n1)
(v 2 · n1)
Otherwise, the lines are parallel or coincide.
© 2001, Denis Zorin
Plane equations
implicit equation : (q-p,n)=0, exactly like line in 2D!
n
q
p
parametric equation: 2 parameters t1,t2
q(t1,t2) = v1 t1 + v2 t2, where v1 and v2 are two
vectors in the plane.
v1 × v 2 = n
© 2001, Denis Zorin
2
Intersecting a line and a plane
Same old trick: use the parametric equation for the
line, implicit for the plane.
p1
v
n
qi
p2
(p1 + vti − p2 · n) = 0
(p1 − p2 · n) Do not forget to check
t =−
for zero in the denominator!
(v · n)
i
© 2001, Denis Zorin
Transformations
Examples of transformations:
translation
rotation
scaling
shear
© 2001, Denis Zorin
3