Let me be more clear and specific. I have a 2-d sparse matrix of size 10 * 10 of points of different colours . The co-ordinates of the points are integers, i.e points may be at positions (1,1) , (10,9 ) for example but not (1.1,2.5) etc.
Now the Problem is to make an algorithm which finds which points that appear in a series of four or more points in contact with each other and of a particular colour.The colour will be given beforehand. The algorithm should return the set of such points.
An example of points in contact is (1,1) and (2,2). Two points are in contact when the difference between their x-coordinates and y-coordinates are both less than 1.
Please do help me solve this. If you even know where I can find algorithms for co-ordinate geometry and where this particular problem might be covered please do let me know. Its really urgent and important.
Thanks a ton
2006-12-17
17:45:01
·
1 answers
·
asked by
MarxVsFromm
2
in
Science & Mathematics
➔ Mathematics