Path: chuka.playstation.co.uk!news From: "Derek da Silva" Newsgroups: scee.yaroze.freetalk.english Subject: Re: line intersect algorithm Date: Fri, 26 Jan 2001 13:31:37 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 26 Message-ID: <94ru9h$5ro3@www.netyaroze-europe.com> References: <94rtem$5ro2@www.netyaroze-europe.com> NNTP-Posting-Host: usr2057-avo.cableinet.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Hi Is this any use? www.netyaroze-europe.com/~topcats/routines.html > Hi > > Can anyone give me a good standard algorithm to check if two lines > intersect? > > bool Intersect(x1,y1,x2,y2,x3,y3,x4,y4) > > Where the bool is 1 if they intersect and 0 if they don't, x1,y1-x2,y2 is > one line, x3,y3-x4,y4 is the other. > > I think you check if points lie clockwise or something, right? > > > Matt > > Derek