Array Shapes Algorithm

I am looking for an algorithm that could create on arrays with coordinates. I have two 50x arrays 50: one with x and the second with y coordinates.

There are always 2500points. Then I have another 50x array 50with my values ​​for the coordinates.

I create 3 to 6 areas based on the value (e.g. 0-100, 200-300 and 300-500). Points with specific values ​​create areas.

I need an algorithm that can calculate if there is only one shape in the area or more, and fill the shapes with colors. I need this because I have to fill the shapes with specific colors for each area. Language is C #.

  • Examples.
  • Expected Edges.
  • Expected Result

Example picture

+4
1

.

  • -
  • , .

: 2 . , ,

3 , 2 ( ). , .

, , . .

- Area - constant * Length.

+1

All Articles