1

我编写了一个程序来显示一些压力测量值。我想使用 NURBS 进行细节可视化。所以我引导我在 这里输入链接描述

我的字段范围为 40x48 方格。所以 40 行和 48 列。Z 分量(高度)应该是可变的。

但我不明白如何定义

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &ctrlpoints[0][0][0]);

// Parameter:
        //   target:
        //     What the control points represent (e.g. MAP2_VERTEX_3).
        //
        //   u1:
        //     Range of the variable 'u'.
        //
        //   u2:
        //     Range of the variable 'u.
        //
        //   ustride:
        //     Offset between beginning of one control point and the next.
        //
        //   uorder:
        //     The degree plus one.
        //
        //   v1:
        //     Range of the variable 'v'.
        //
        //   v2:
        //     Range of the variable 'v'.
        //
        //   vstride:
        //     Offset between beginning of one control point and the next.
        //
        //   vorder:
        //     The degree plus one.
        //
        //   points:
        //     The data for the points.

我不知道如何在我的情况下设置参数。例如 u1 和 u2 是什么?或者我的控制点是什么?

4

1 回答 1

0

在此链接中,您可以找到更详细的参数说明:

https://msdn.microsoft.com/en-us/library/windows/desktop/ee872053(v=vs.85).aspx

在您的表面上,X 方向由 u 坐标给出,Y 方向由 v 坐标给出。通常将 u1-u2 和 v1-v2 设置为 [0,1] 区间。

曲面的顺序在点之间进行插值(您可以使用 order=1 进行线性插值,使用 order=2 进行二次插值等等。2 或 3 应该可以满足您的需要。

话虽如此,恐怕方法“glMap2f”将无法准确表示您的数据,因为通常“控制点”不在表面本身(如下所示图片

您必须寻找一种算法来从点云中插入 nurbs 曲面,然后使用 glMap2f 计算控制点。

如果您想了解更多关于 Nurbs 的信息,请查找 L. Piegl 的“The Nurbs book”

于 2017-08-24T09:14:55.617 回答