EstimatedPointNormals[{p1,p2,…}]
估计点 p1,p2,… 的法线向量.
EstimatedPointNormals[mreg]
估计网格区域 mreg 顶点的法线向量.
EstimatedPointNormals
EstimatedPointNormals[{p1,p2,…}]
估计点 p1,p2,… 的法线向量.
EstimatedPointNormals[mreg]
估计网格区域 mreg 顶点的法线向量.
更多信息和选项
- EstimatedPointNormals 通常用于从一组点中找到超曲面方向.
- EstimatedPointNormals[{p1,p2,…}] 给出一个列表 {n1,n2,…},其中 ni 是 pi 的单位法向量.
- EstimatedPointNormals[{p1,p2,…}] 中的 pi 可以是坐标列表或显式 Point 对象.
- 也可以给出 Method 选项. 可能的 Method 设置包括:
-
"PlaneFitting" 使用最近邻进行平面拟合 "FaceWeighted" 面部加权法线
范例
打开所有单元 关闭所有单元基本范例 (3)
pts = CirclePoints[20];
EstimatedPointNormals[pts]//ShallowGraphics[{Point[pts], Arrow /@ Transpose[{pts, pts + %}]}]pts = SpherePoints[100];
EstimatedPointNormals[pts]//ShallowGraphics3D[{Point[pts], Arrow /@ Transpose[{pts, pts + %}]}]pts = RandomPoint[ResourceData["Stanford Bunny"], 20000];
Graphics3D[{AbsolutePointSize[1], Point[pts]}]Graphics3D[{Point[pts, VertexNormals -> EstimatedPointNormals[pts]]}]范围 (2)
基本用法 (1)
pts = {{-0.9}, {-1.0}, {-1.1}, {0.9}, {1.0}, {1.1}};
EstimatedPointNormals[pts]Graphics[{Point[Append[#, 0]& /@ pts], Arrow /@ Transpose[{Append[#, 0]& /@ pts, Append[#, 0]& /@ (pts + %)}]}]pts = RandomPoint[Circle[], 50];
EstimatedPointNormals[pts]//ShallowGraphics[{Point[pts], Arrow /@ Transpose[{pts, pts + %}]}]pts = RandomPoint[Sphere[], 100];
EstimatedPointNormals[pts]//ShallowGraphics3D[{Point[pts], Arrow /@ Transpose[{pts, pts + %}]}]pts = RandomPoint[Sphere[{0, 0, 0, 0, 0}], 120];
EstimatedPointNormals[pts]//Shallow规范 (1)
EstimatedPointNormals 接受一组点:
pts = {{-5, 0}, {-3, 0}, {-1, 0}, {1, 0}, {3, 0}, {5, 0}};EstimatedPointNormals[pts]使用 Point 列表:
EstimatedPointNormals[Point[pts]]选项 (2)
Method (2)
EstimatedPointNormals[CirclePoints[8], Method -> "PlaneFitting"]默认情况下,通过相邻面的法线的加权平均值估算网格顶点的法线:
mesh = [image];coords = MeshCoordinates[mesh];
normals = EstimatedPointNormals[mesh];Show[mesh, Graphics3D[{Arrow[Transpose[{coords, coords + normals}]]}]]pnormals = EstimatedPointNormals[mesh, Method -> "PlaneFitting"];Show[mesh, Graphics3D[{Arrow[Transpose[{coords, coords + pnormals}]]}]]EstimatedPointNormals[mesh, Method -> "PlaneFitting"] === EstimatedPointNormals[MeshCoordinates[mesh]]应用 (3)
基本应用 (1)
给定光滑表面的充足密集采样,可以假设空间中彼此靠近的样本在平面上也彼此靠近:
pts = Table[(2 + 2 / 3.5Sin[5 t]) * {Cos[t], Sin[t]}, {t, 0, 2 Pi, Pi / 40}];
nng = NearestNeighborGraph[pts, 4]ngs = NeighborhoodGraph[nng, pts[[#]]]& /@ {1, 10, 65}fitPlane[p_] := Hyperplane[Eigensystem[Covariance[p]][[2, 2]], Mean[p]]
Show[#, Graphics[{Red, fitPlane[VertexList[#]]}]]& /@ ngsnls = Table[n = Eigensystem[Covariance[AdjacencyList[nng, pts[[pi]]]]][[2, 2]];
n * Sign[Dot[n, pts[[pi]]]], {pi, Length[pts]}];Graphics[Table[Arrow[{pts[[pi]], pts[[pi]] + nls[[pi]]}], {pi, Length[pts]}]]点云渲染 (1)
pts = RandomPoint[ResourceData["Cow"], 6000];
Graphics3D[{AbsolutePointSize[1], Point[pts]}]Graphics3D[{Point[pts, VertexNormals -> EstimatedPointNormals[pts]]}]Graphics3D[{EdgeForm[], ResourceData["Cow"]}]属性和关系 (2)
EstimatedPointNormals 可以生成用于表面重建的法线:
pts = MeshCoordinates[ResourceData["Horse"]];
Graphics3D[{AbsolutePointSize[1], Point[pts]}]GradientFittedMesh[Point[pts, VertexNormals -> EstimatedPointNormals[pts]]]f[x_, y_] := Sin[x + Cos[y]]
fx = Subscript[∂, x]f[x, y];
fy = Subscript[∂, y]f[x, y];
fnormal[a_, b_] := {-fx, -fy, 1} /. {x -> a, y -> b};
farrow[x_, y_] := Arrow[{{x, y, f[x, y]}, {x, y, f[x, y]} + fnormal[x, y]}]
arrows = Table[farrow[x, y], {x, -Pi, Pi, Pi / 6}, {y, -Pi, Pi, Pi / 6}];
Show[Plot3D[f[x, y], {x, -Pi, Pi}, {y, -Pi, Pi}], Graphics3D[{Arrowheads[Small], arrows}], PlotRange -> All]互动范例 (1)
文本
Wolfram Research (2022),EstimatedPointNormals,Wolfram 语言函数,https://reference.wolfram.com/language/ref/EstimatedPointNormals.html.
CMS
Wolfram 语言. 2022. "EstimatedPointNormals." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/EstimatedPointNormals.html.
APA
Wolfram 语言. (2022). EstimatedPointNormals. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/EstimatedPointNormals.html 年
BibTeX
@misc{reference.wolfram_2026_estimatedpointnormals, author="Wolfram Research", title="{EstimatedPointNormals}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/EstimatedPointNormals.html}", note=[Accessed: 08-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_estimatedpointnormals, organization={Wolfram Research}, title={EstimatedPointNormals}, year={2022}, url={https://reference.wolfram.com/language/ref/EstimatedPointNormals.html}, note=[Accessed: 08-September-2026]}