首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在SharpGL中使用NURBS

在SharpGL中使用NURBS
EN

Stack Overflow用户
提问于 2017-08-14 17:39:33
回答 1查看 175关注 0票数 1

我写了一个程序来显示一些压力测量结果。我想使用NURBS进行细节可视化。所以我给自己定位了enter link description here

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

但我不知道该怎么定义

代码语言:javascript
复制
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?或者我的ControlPoints是什么?

EN

回答 1

Stack Overflow用户

发布于 2017-08-24 17:14:56

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

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“

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45671627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档