Thanks for the replies, I like the superimposition idea. If I had a known irregular shape I could map it onto the existing grid. A brute force approach would be to just make a list of all the X-Y coordinates in the irregular area, then just search through the entire grid and see if any coordinates show up in the list, and count them if they do. If the grid spacing was coarse enough I suppose I could do this on graph paper. Creating this kind of pre-defined list with a grid that had a lot of coordinates would be tougher as it would need to be done programmatically. I think a drawing program where you have a grid and mark coordinates perhaps as the mouse cursor goes over them could generate the boundry coordinates of the irregular inner area. The task then would be to somehow programmatically create a list of all the coordinates within that area and write them to a list. I've noticed the MS Paint app has a "fill" function to color in some boundried figure you've drawn with the mouse. So maybe theres an algorithm out there for this somewhere. -- View this message in context: http://nabble.documentfoundation.org/Filter-algorithm-question-tp4141022p4141061.html Sent from the Users mailing list archive at Nabble.com. -- To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted