如何获得给定网格的主曲率? [英] How to get principal curvature of a given mesh?

查看:149
本文介绍了如何获得给定网格的主曲率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,要从给定的网格(形状)中获取主曲率.

I have a problem of getting principal curvatures from a given mesh (of a shape).

  1. 我正在尝试使用Matlab文件交换中的'patchcurvature'方法.但是,该方法始终给出正曲率.我认为可能是该方法将网格视为单独的面片,并计算了每个面片的主曲率. [〜,〜,Dir1,Dir2,PrincipalCurvature1,PrincipalCurvature1] = patchcurvature(meshFaceVertices);

  1. I am trying to use 'patchcurvature' method from Matlab file exchange. However, the method always given the positive curvatures. I think it might be that the method considered the mesh as separate patches, and calculate the principal curvatures for each patch. [~,~,Dir1,Dir2,PrincipalCurvature1,PrincipalCurvature1]=patchcurvature(meshFaceVertices);

我还尝试使用Matlab文件交换中的另一种方法,称为"surfature".但是,它会计算表面上三个点的2D数组所定义的表面"的主曲率.我不确定如何从顶点和面定义的现有网格中使用2D点阵列创建曲面".有一些方法可以将曲面转换为网格,但没有其他方法...

I also tried to use another method from Matlab file exchange called 'surfature'; however, it calculates the principal curvatures of a 'surface' defined by three 2D arrays of points on the surface. I am not sure how to create a 'surface' with 2D point arrays from a existing mesh defined by vertices and faces. There are some methods convert surface to mesh but not the other way around...

任何想法都将不胜感激.非常感谢,新年快乐!!!

Any ideas would be appreciated. Thanks so much and Happy New Year!!!

最好, 答:

推荐答案

主曲率(如果有)我没有遗漏一个不同的定义,它们是在可微分的曲面上定义的,但是网格(通常是三角形的集合)是不可微分的.我可以想象一些可能的方法来近似主曲率.

Principal curvatures, if I am not missing a different definition, are defined on differentiable surfaces but meshes (usually a collection of triangles) are not differentiable. I can imagine some of possible approaches to approximate the principal curvatures.

假设您的网格是通过从可微表面采样获得的,则需要做的是多项式回归/a>,更具体地说,是二次插值正在尝试计算曲率.

Assuming that your mesh is obtained by sampling from a differentiable surface, what you need to do is polynomial regression, more specifically quadratic interpolation on the nearby vertices around the point you are trying to calculate curvature.

首先,您需要确定您感兴趣的法线向量.法线向量可以通过网格三角形的法线方向(AB×AC,将三角形的两个边交叉积)并与其他法线向量进行插值来获得.

First you'll need to determine the normal vector at your point of interest. The normal vector can be obtained by the normal direction of a mesh triangle ( AB × AC , cross-producting two edges of a triangle), and interpolating with some other normal vectors.

找到法线向量后,可以变换网格的坐标,以使该点位于原点,法线向量指向z轴. (具有沿z轴旋转角度theta的参数)

Once you've found the normal vector, you can transform the coordinates of you mesh so that the point is at the origin and the normal vector is pointing the z axis. (with a parameter of rotating along z-axis by angle theta)

那么您的下一个目标是找到一个表面

Then your next goal is to find a surface


     1                   1
z = --- alpha * x^2  +  --- beta * y^2
     2                   2

具有三个参数alpha,beta和theta的最近似点集.

that best approximates your set of points, with three parameters alpha, beta and theta.

然后,alpha和beta是主要组成部分.

Then alpha and beta is the principal components.

我不确定,但是已经有一个matlab函数可以为您进行这种回归.

I am not certain but there will already be a matlab function that does this regression for you.

这篇关于如何获得给定网格的主曲率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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