I need to visualize 3D point clouds using C++, I started learning OpenGL but so far all I find is drawing shapes using vertices
What if I want the 3D scene to be built using pixels, does OpenGL support this ? if not what alternatives I have ?
I need to visualize 3D point clouds using C++, I started learning OpenGL but
Share
Two approaches:
Render geometry using GL_POINTS mode. You’ll end up with a
literal display of a point cloud (i.e. bigger and smaller dots, no
vertices, no solid faces). This is very simple to implement.
Process your data so that you’ll have solid geometry (i.e. triangles) representing the original shape. There is a couple of algorithms which try to generate a mesh from a 3D bitmap. Most notable are Marching Cubes and Marching Tetrahedrons. These are commonly used i.e. in medicine (to create a 3D mesh of an organ after it’s scanned by MRI or something). You’ll find plenty of resources for them on Google.