实现移动立方体算法? [英] Implementing Marching Cube Algorithm?

查看:324
本文介绍了实现移动立方体算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的最后一个问题:移动立方体问题

From My last question: Marching Cube Question

不过,我仍然不清楚的:

However, i am still unclear as in:

  1. 如何创建假想的立方体/体素检查一个顶点是等值面?
  2. 以下
  3. 我怎么知道哪个顶点是等值面之下?
  4. 如何做每个立方体/像素决定了cubeindex /表面使用?
  5. 如何使用数据triTable绘制表面?

比方说,我有一个苹果的点云数据。
我该如何进行?

Let's say i have a point cloud data of an apple.
how do i proceed?

可以是任何人所熟悉的移动立方体帮助我吗?
我只知道C ++和OpenGL。(c是有点脱离我的手)

can anybody that are familiar with Marching Cube help me?
i only know C++ and opengl.(c is a little bit out of my hand)

推荐答案

psented以两种方式首先,等值面可以重新$ P $。一种方法是具有等值和每个点标量作为来自外部源的数据集。这是MRI扫描是如何工作的。第二种方法是使一个隐含函数F(),它接受一个点/顶点作为其参数,并返回一个新的标。考虑一下这个功能:

First of all, the isosurface can be represented in two ways. One way is to have the isovalue and per-point scalars as a dataset from an external source. That's how MRI scans work. The second approach is to make an implicit function F() which takes a point/vertex as its parameter and returns a new scalar. Consider this function:

float computeScalar(const Vector3<float>& v)
{
    return std::sqrt(v.x*v.x + v.y*v.y + v.z*v.z);
}

这将计算从点和原点在你的标量场的每一个点的距离。如果等值为半径,你只是想出一个方法来重新present一个球体。 这是因为,| V | &LT; = R是真正的球体,或生活在其内部内部的所有点。只要找出哪些顶点是球形的,哪些是在外面进去。你想使用小于或大于运营商,因为卷共分两个空间。当你知道它指向的多维数据集被划分为内,外,您还知道哪些边等值面相交。你可以结束一切从没有三角形到五个三角形。的网格顶点的位置可以通过在相交边缘内插以找到实际的交点来计算。

Which would compute the distance from the point and to the origin for every point in your scalar field. If the isovalue is the radius, you just figured a way to represent a sphere. This is because |v| <= R is true for all points inside a sphere, or which lives on its interior. Just figure out which vertices are inside the sphere and which ones are on the outside. You want to use the less or greater-than operators because a volume divides the space in two. When you know which points in your cube are classified as inside and outside, you also know which edges the isosurface intersects. You can end up with everything from no triangles to five triangles. The position of the mesh vertices can be computed by interpolating across the intersected edges to find the actual intersection point.


说与标量场一个苹果,你要么需要得到设置为插入到你的应用程序,或使用pretty的复杂的隐函数的源数据。我建议得到简单的几何元素像球体和托里先工作,然后从那里展开。

If you want to represent say an apple with scalar fields, you would either need to get the source data set to plug in to your application, or use a pretty complex implicit function. I recommend getting simple geometric primitives like spheres and tori to work first, and then expand from there.

这篇关于实现移动立方体算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆