[Tutor] Calculating Deflection angles

Alan Gauld alan.gauld at btinternet.com
Wed Jul 4 11:22:23 CEST 2007


"nitin chandra" <nitinchandra1 at gmail.com> wrote

> I create a list of coordinates of 2 lines.
> X11,Y11 & X12,Y12 as starting and ending of one line.
> X21,Y21 & X22, Y22 as starting and ending of the 2nd line.
>
> Now is there any way to calculate the deflection angle between the 
> two
> lines? Will any modules be required other than Python 2.3 (on 
> Linux)?

This is a standard math problem to which you can apply the
standard math techniques. You can use the trigonometry
functions found in the math module.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld





More information about the Tutor mailing list