From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Searching for a very specific algorithm Date: 30 May 1997 03:38:05 GMT Organization: Oxford University, England Lines: 17 Message-ID: <5mli2t$fb2@news.ox.ac.uk> References: <338E2DAE DOT F88C30E AT sercomtel DOT com DOT br> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Alessandro Moure (moure AT sercomtel DOT com DOT br) wrote: : Hi all. I am developing a data manipulation tool kit and I am : experiencing a hard time trying to find the area inside a closed, : generic region. I have the points of the border line of the region : stored in a vector. Does any body knows how to do it? : Thank you and please excuse my poor english. This isn't really on-topic, but anyway... In 2D, given coordinates as X-Y pairs you would, for each pair of adjacent points p[m] and p[n] calculate a+=(p[m].x-p[n].x)*(p[m].y+p[n].y)/2; making sure you zero a to start with. -- George Foot Merton College, Oxford is what is __dpmi_int(), what it does, why it is called here, and what I could be doing elsewhere in the program that would cause it to hang. At this point I don't know what parameters are being passed to lseek(), but will try finding out tomorrow. In the meantime, any suggestions would be helpful. BTW, This is running in a DOS window under Win/Lose-95, DJGPP 2.0.1 on a Pentium Pro. Fred -- ---- Fred Smith -- fredex AT fcshome DOT stoneham DOT ma DOT us -- fred AT computrition DOT com ---- "For the word of God is living and active. Sharper than any double-edged sword, it penetrates even to dividing soul and spirit, joints and marrow; it judges the thoughts and attitudes of the heart." ---------------------------- Hebrews 4:12 (niv) ------------------------------