Get a vector perpendicular to another vector

Get a vector perpendicular to another vector

Assume the vector is defined by two points P1 P2

dx = p2_x - p1_x  dy = p2_y - p1_y

p3_x = p1_x -  dyp3_y = p1_y  + dx

Or in the other direction

p4_x = p1_x + dyp4_y = p1_y  - dx

Lastest update in December 2019, inital post in June 2011

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!