given image above,

I would like to check both segments (maroon/orange line could be in any slope value) which are parallel to each other if they intersect.

dashed lines are the perpendicular lines of the maroon or of the orange line (my plan is to use these to get the intersections) .

The problem now is, how can i get the points of the perpendicular lines.

Im welcome for other suggestions.