How to check that lines are parallel?
1. Calculate vectors out of coordinates
dx = x2 - x1, dy = y2 - y1 => vector = (dx, dy)
2. Calcualte a slope = dy / dx.
3. any two lines that have the same slope (dy/dx) are parallel
#math
1. Calculate vectors out of coordinates
dx = x2 - x1, dy = y2 - y1 => vector = (dx, dy)
2. Calcualte a slope = dy / dx.
3. any two lines that have the same slope (dy/dx) are parallel
#math
👍4
How to check that two vectors are collinear (share the same line)
The idea behind is to calculate where both vector would intercept Y axis.
We can do it using line formula
#math
The idea behind is to calculate where both vector would intercept Y axis.
We can do it using line formula
y = kx + b. For every single point in all vectors we know x, y, k = dy / dx. From these values we can find b#math
1👍3