A review of classical mechanics in physics
CS-116B: Graphics Algorithms
Instructor: Rob Bruce
Spring 2016

SLIDE 1: Newton's three laws of motion

  • 1st law of motion (law of inertia): A body remains at rest, or moves in a straight line (at a constant velocity), unless acted upon by a net outside force.
  • 2nd law of motion: The acceleration of an object is proportional to the force acting upon it. F = m * a
  • 3rd law of motion (law of reciprocal actions): For every action, there is an equal and opposite reaction.

SLIDE 2: Vectors

A vector contains two components:

  • A scaler value
  • A direction

Example: vector v = A + B + C

Thee-tuple unit vector illustration on a three-dimensional Cartesian coordinate system

Image source: https://upload.wikimedia.org/wikibooks/en/9/98/Unit-vectors-in-Cartesian-Coord.png

SLIDE 3: Computing vector magnitude

vector v = A + B + C

Magnitude of vector v:

||v|| = SQRT(A2 + B2 + C2)

SLIDE 4: Normalizing a vector (also called unit vector)

vector v = A + B + C

normalized vector v = v / ||v|| = v / SQRT(A2 + B2 + C2)

SLIDE 5: Computing the vector dot product (also called scalar product)

vector v1 = A + B + C

vector v2 = D + E + F

v1 • v2 = ||v1|| * ||v2|| * cos(θ)

v1 • v2 = A • D + A • E + A • F + B • D + B • E + B • F + C • D + C • E + C • F

v1 • v2 = A*D*cos(0°) + A*E*cos(90°) + A*F*cos(90°) + B*D*cos(90°) + B*E*cos(0°) + B*F*cos(90°) + C*D*cos(90°) + C*E*cos(90°) + C*F*cos(0°)

v1 • v2 = A*D + B*E + C*F

SLIDE 6: Computing the vector cross product (also called vector product)

The right hand rule:

× =

× =

× =

× = -ĵ

× = -k̂

× = -î

vector v1 = A + B + C

vector v2 = D + E + F

represents the unit vector perpendicular to vectors v1 and v2 using the right hand rule.

v1 × v2 = ||v1|| * ||v2|| * sin(θ)

v1 × v2 = A × D + A × E + A × F + B × D + B × E + B × F + C × D + C × E + C × F

v1 × v2 = A*D*sin(0°) + A*E*sin(90°) - A*F*sin(90°) - B*D*sin(90°) + B*E*sin(0°) + B*F*sin(90°) + C*D*sin(90°) - C*E*sin(90°) + C*F*sin(0°)

v1 × v2 = A*E - A*F - B*D + B*F + C*D - C*E

v1 × v2 = (B*F - C*E) + (C*D - A*F) + (A*E - B*D)