Hi, All
I have a problem , to Get all same elements's zone boundary elements's index code set from the matrix list .
Any of the following forms of two adjacent elements considered Unicom , like 米
(( ... ... ...)
... 1 1 1 ...
... 1 1 1 ...
... 1 1 1 ...))
e.g.
((nil 1 1 1 1 nil 0 2 2)
(nil 1 1 1 1 1 0 nil 2)
(nil nil 1 1 1 1 1 nil nil)
(nil nil 0 1 2 3 1 0 nil)
)
fuction to cal (item = 1 )'s zone boundary , the result is ( ((0 1) (1 1) (2 2) (3 3) (2 4) (2 5) (3 6) (2 6) (1 5) (0 4) (0 3) (0 2)) ...)
Here's item=1 has one zoon just supposed , Function have to cal all zones just like the nil item .
This function is very often encountered (e.g. used in Vector graphics), so I dubbed the "challenge" the beginning of .