# plotting – Extract original vertex from VoronoiMesh

Consider a set of random coordinates.

``````pts = SortBy(RandomReal({-1, 1}, {25, 2}), {First, Last});
``````

and find it’s `VoronoiMesh`,

``````mesh = VoronoiMesh(pts)
``````

Now for finding faces, we can use `mesh("Faces")` to list them base on the coordination of mesh vertices

``````pts2 = mesh("Coordinates");
``````

Which for example you can colored them as follows,

``````col = RandomColor(Length@pts);
Graphics({{col, Polygon(pts2((#))) & /@ mesh("Faces")}(Transpose)})
``````

But I cannot find in `mesh("Properties")` any entry related to original vertices, `pts.`
In other words, I want to relate faces (listed in `mesh("Faces")` ) to original points (listed in `pts`)
For example, properties `"PointInFaces"` gives a point in each face, but it is not the original points,

I can use the following code to relate faces to original points, but it is a time-consuming task, particularly when the number of points is large.

``````VORfaces = Polygon(pts2((#))) & /@ mesh("Faces");
Flatten@Position(# (Element) VORfaces((1)) & /@ pts,True) // AbsoluteTiming
``````

Another suggestion is by using `PointInFaces` and `Nearest` function.

``````ff = Nearest(pts -> "Index")
originalpointIndex =Flatten(ff /@ mesh("PointInFaces"))
``````

By potting them, you can find an excellent match,

``````Graphics({{col, Polygon(pts2((#))) & /@ mesh("Faces")}(Transpose), Text(#((1)), #((2))) & /@ ({Range(Length@pts), pts}(Transpose)), White, Text(#((1)), #((2))) & /@ ({originalpointIndex, mesh("PointInFaces")}(Transpose)) })
``````

I am wondering if there are any natural properties to relate mesh coordinate and original vertices?