How can I find a plane of minimum units that do not overlap?

16 Views Asked by At

I need a code that automatically generates plane information when there is node information and straight line information.

example: enter image description here

----input file--- node table[node num, x coord, y coord] : [[1,0,0], [2,1,0], [3,2,0], [4,4,0], [5,2,2],[6,0,2]]

line table[ele num, i node num, j node num]: [[1,1,2],[2,2,3],[3,3,4],[4,1,6],[5,3,6],[6,3,5],[7,4,5],[8,5,6]]

----wanted output result--- plane table[[plane number, (i node num, j node num, k node num , .... n node num)]] [[1,(1,2,3,6)],[2,(3,5,6)],[3,(3,4,5)]

How can this function be implemented? Since there are more than 10,000 nodes and straight lines now, I want an algorithm that is as efficient as possible.

I tried to exclude overlapping edges through simple repetitive work, but it was not as easy as I thought, so I couldn't get the desired result.

0

There are 0 best solutions below