Solution of direction vector
So as long as a straight line is given, two direction vectors can be constructed (starting from the origin).
That is to say, given a straight line l:ax+by+c=0, the direction vector of the straight line L is
S=(-b, a) or (b, -a).
If the slope of the straight line L is k, then a direction vector of L is?
s=( 1,k)
If a (x 1, y 1) and b (x2, y2), a direction vector of the straight line where AB is located.
s=(x2-x 1,y2-y 1)