Xref: utzoo comp.graphics:1791 comp.sys.ibm.pc:12385 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!sunybcs!ugfailau From: ugfailau@sunybcs.uucp (Fai Lau) Newsgroups: comp.graphics,comp.sys.ibm.pc Subject: Re: COMPLICATED PROBLEM; ONLY INTELLIGENT PEOPLE SHOULD READ Message-ID: <8807@sunybcs.UUCP> Date: 25 Feb 88 10:20:02 GMT References: <971@ut-emx.UUCP> Sender: nobody@sunybcs.UUCP Reply-To: ugfailau@joey.UUCP (Fai Lau) Organization: SUNY/Buffalo Computer Science Lines: 20 Keywords: READ THIS ONLY IF YOUR IQ >>125 In article <971@ut-emx.UUCP> jezebel@ut-emx.UUCP (Jim @ MAC@/) writes: >Have a nice one here: >Have a boundary defined on the screen. Boundary is composed of points >joined by lines... Now some random points are generated and I want to check >if a given point is within or outside the existing boundary.. Any algorithm for >this ? Is it at all possible ???? >Running with GKS....under Fortran... Yes, it is at all possible. It is not easy though, but it can be done. All you have to do is to look up some good computer graphics book. Being able to determine if a point is inside a boundary is the building block of several more complicated algorithms dealing with windowing, clipping, and so forth. Actually, in order to simulate the problem and the solutions to the problem, all that is needed are C and a decent graphics package (anything that lets you put a line or a point on the screen is all right.) Fai Lau SUNY at Buffalo (The Arctic Wonderland) UU: ..{rutgers,ames}!sunybcs!ugfailau BI: ugfailau@sunybcs INT: ugfailau@joey.cs.buffalo.EDU