1. Analytical Geometry for developers (with JS examples)

It is the first part of analytical geometry tutorial in which I will show basics by coding JS library.

Vector 2D

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

Dot Product

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.


Written by

Software engineer, creator of increaser.org. More at geekrodion.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store