finding the perpendicula of a line

finding the perpendicula of a line

Post by Michael Imho » Mon, 31 Aug 1998 04:00:00



Hello,
I know two points of a line.  How can I find the perpendicula?

Thanks for any help,
-Michael

 
 
 

finding the perpendicula of a line

Post by Hristo Bojino » Mon, 31 Aug 1998 04:00:00



> Hello,
> I know two points of a line.  How can I find the perpendicula?

> Thanks for any help,
> -Michael

assuming: p0=(x0,y0) , p1=(x1,y1)

define: dX=x1-x0 ; dY=y1-y0

Line Eq. ---> det | (x-x0) (y-y0) | == 0
                  | dX     dY     |

Perp. Line Eq. ---> det | (x-x0) (y-y0) | == 0
                        |   -dY    dX   |

               <---> dX*x+(-dY)*y+(dY*y0-dX*x0) == 0

I suggest reading an elementary calculus book -- can provide some
good insights.

Hristo