Given edges and vertices, how can we separate these into connected components? A situation where I need this is when I extract vertices and edges by using an algorithm like the marching cube method, I want to then obtain multiple connected polyhedra.
For example, say, there are two not-connected spheres and we have signed distance function f for these spheres. Marching cube algorithm can compute vertices V
where f(v)=0 forall v in V
. However, what I want to obtain is not the whole vertices V
, but the two different set of vertices V1
and V2
which corresponds to each sphere of the two. (Here, the union of V1
and V2
is V
.)
It seems easy to implement this in a naive way, but if there are some well-known algorithms for that, I wanna know this.