简体   繁体   English

基于像素的3D可视化

[英]Pixel based 3D Visualization

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 ? 我需要使用C ++可视化3D点云,我开始学习OpenGL,但到目前为止,我发现使用顶点绘制形状如果我想使用像素构建3D场景,OpenGL是否支持这个? if not what alternatives I have ? 如果不是我有什么选择?

Two approaches: 两种方法:

  1. Render geometry using GL_POINTS mode. 使用GL_POINTS模式渲染几何体。 You'll end up with a literal display of a point cloud (ie bigger and smaller dots, no vertices, no solid faces). 您将最终得到一个点云的文字显示(即更大和更小的点,没有顶点,没有实心面)。 This is very simple to implement. 这很容易实现。

  2. Process your data so that you'll have solid geometry (ie triangles) representing the original shape. 处理您的数据,以便您拥有代表原始形状的实体几何体(即三角形)。 There is a couple of algorithms which try to generate a mesh from a 3D bitmap. 有几种算法试图从3D位图生成网格。 Most notable are Marching Cubes and Marching Tetrahedrons . 最值得注意的是Marching CubesMarching Tetrahedrons These are commonly used ie in medicine (to create a 3D mesh of an organ after it's scanned by MRI or something). 这些通常用于医学中(在通过MRI或其他东西扫描后创建器官的3D网格)。 You'll find plenty of resources for them on Google. 您可以在Google上找到足够的资源。

I think what you are looking for is Point Sprites. 我认为你要找的是Point Sprites。 There are some examples of Point Sprites and particle clouds on http://www.codesampler.com/oglsrc/oglsrc_6.htm (although I haven't tried these examples myself). http://www.codesampler.com/oglsrc/oglsrc_6.htm上有一些Point Sprites和粒子云的例子(虽然我自己没有尝试过这些例子)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM