I am not certain but there will already be a matlab function that does this regression for you. Then alpha and beta is the principal components. That best approximates your set of points, with three parameters alpha, beta and theta. (with a parameter of rotating along z-axis by angle 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. The principal curvatures are inverse of the radii of the arcs. 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. I can imagine some of possible approaches to approximate the principal curvatures.Īssuming 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.įirst you'll need to determine the normal vector at your point of interest. computes the principal curvatures of the surface given by the implicit equation eq in variables x, y and z. 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. Principal curvatures at a given point X i are the minimum eigenvalues of a point, and they measure how the surface bends in different directions at the point.
0 Comments
Leave a Reply. |