# Calculate Faces from Point Cloud with Python

I have a bunch of vertices in a point cloud stored in an obj file (i can change the file if need be).

How do I calculate the faces from the point cloud using python? Example:

v -1.000000 0.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 -1.000000
v 1.000000 0.000000 -1.000000
v -1.000000 0.000000 0.000000
v 0.000000 0.000000 1.000000
v 1.000000 0.000000 0.000000
v 0.000000 0.000000 -1.000000
v 0.000000 0.000000 0.000000


Edit: I may have to calculate the normal's too, right?

• I suggest taking a look at Poisson reconstruction and Delaunay triangulation. This question will likely be closed as off topic though, since this is more about computer graphics in general and not about Blender. – rjg Aug 4 at 19:58
• This is a really broad scope of work, and much of it hinges on computational geometry algorithms which would probably be better suited to other stackexchange sites (although some small bits of comp geo stuff is generally alright here, you may more help at programming and mathematics specific stacks). It would be better to narrow this down to specific parts that relate directly to Blender, and ask those here. – Sazerac Aug 5 at 2:36
• In particular, the computer graphics beta site might be a good place to ask about some parts of the process computergraphics.stackexchange.com/questions. – Sazerac Aug 5 at 2:42