It is the first part of analytical geometry tutorial in which I will show basics by coding JS library.
A vector is an object that has only two property: endpoint and length. Vector is just direction and doesn’t need to have a start point, because the start point is always the start of coordinates.
Now let’s take a look at the basic vector operations. Normalized vector is one with length = 1.
Addition and subtraction
With dot products can be found projection and how the directions of the vectors relates to each other.
Vector3D have same implementation with z.
A lot of geometry staff coming. Give some claps if you enjoy :)
Reach the next level of focus and productivity with increaser.org.