I have two lines which I´d like to know whether they are parallel or not in 3D space. Each line is defined using two points $(x_1,y_1,z_1)$,$(x_2,y_2,z_2)$. Important condition is that there should be a slight rotation threshold allowed, i.e. if the angle between the two lines is < 5 degrees then they are still parallel.
My idea is to compare the slopes of the two line segments somehow? Another way is to find the direction/normal of the line segment, and compare the two directions using the dot product