Multiplying vectors and scalars

s\mathtt a = (sa_x,sa_y,sa_z)

The direction of the vector is not changed, only the length is changed.

Addition and subtraction of vectors

\mathtt a+\mathtt b = [(a_x+b_x),(a_y+b_y),(a_z+b_z)]

The two offsets are superimposed, similar to the resultant force.

\mathtt a-\mathtt b = [(a_x-b_x),(a_y-b_y),(a_z-b_z)]

Equivalent to adding the opposite of another vector.

  • direction + direction = direction
  • direction – direction = direction
  • point + direction = point
  • point – point = direction
  • Dot + dot = meaningless

Vector touch

|\mathtt a|=\sqrt{a_x^2+a_y^2+a_z^2}

Get the modulus of the vector, that is, its length.

normalized vector

\mathtt u=\frac{\mathtt v}{|\mathtt v|}=\frac{1}{v}\mathtt v

Get the unit vector, that is, the vector with a modulus of 1.

normal vector

Normal vector.

vector product

点乘

\mathtt a·\mathtt b=a_xb_x+a_yb_y+a_zb_z=d
\mathtt a·\mathtt b=|\mathtt a||\mathtt b|\cos \theta

The result of vector dot multiplication is a scalar quantity.

The dot product of any vector and a unit vector is the projected length.

|\\mathtt a|^2=\\mathtt a·\\mathtt a
|\\mathtt a|=\\sqrt{\\mathtt a·\\mathtt a}

The above formula can be used to calculate and compare touches.

  • Collinear: (a · b) = ab
  • Collinear and opposite: (a · b) = -ab
  • Vertical: (a · b) = 0
  • Same direction: (a · b) > 0
  • Opposite direction: (a · b)

叉乘

\mathtt a×\mathtt b=[(a_yb_z-a_zb_y),(a_zb_x-a_xb_z),(a_xb_y-a_yb_x)]\\=(a_yb_z-a_zb_y)i+(a_zb_x-a_xb_z)j+(a_xb_y-a_yb_x)k
|\mathtt a×\mathtt b|=|\mathtt a||\mathtt b|\sin \theta

If a and b are two sides of a parallelogram, its area is the cross product.

The result of the cross product is a vector perpendicular to the two vectors.

Post Reply