-
Notifications
You must be signed in to change notification settings - Fork 98
vectors2d
David Legland edited this page Nov 19, 2018
·
1 revision
A vector is defined by its two cartesian coordinates, put into a row vector of 2 elements:
V = [vx vy];
Several vectors are stored in a matrix with two columns, one for the x-coordinate, one for the y-coordinate.
VS = [vx1 vy1 ; vx2 vy2 ; vx3 vy3];
createVector - Create a vector from two points
vectorNorm - Compute norm of a vector, or of a set of vectors
vectorAngle - Angle of a vector, or between 2 vectors
normalizeVector - Normalize a vector to have norm equal to 1
isPerpendicular - Check orthogonality of two vectors
isParallel - Check parallelism of two vectors
transformVector - Transform a vector with an affine transform
rotateVector - Rotate a vector by a given angle