Compute STL Vertex Normals

Find the per-vertex normals for a tesselated surface.

現在この提出コンテンツをフォロー中です。

The default normal vectors associated with tesselated surfaces are computed for each triangle face. Some purposes (like nice rendering) require per-vertex normals instead. These are typically calculated by averaging the face normals. This function offers two methods, first, an average normal weighted by triangle area, and second the normal as an average of the surrounding triangle faces. The second option is faster (because it uses the pre-computed unit-normals), but the first method generates nicer surface-normals, particularly at regions with sharp edges or small triangles.

This should do essentially the same thing as Dirk-Jan Kroon's 'Patch Normals' submission #24330, and my code is probably slower because it is not compiled. However, it's a bit simpler to read and (hopefully) to use.

引用

Francis Esmonde-White (2026). Compute STL Vertex Normals (https://jp.mathworks.com/matlabcentral/fileexchange/33226-compute-stl-vertex-normals), MATLAB Central File Exchange. に取得済み.

謝辞

ヒントを得たファイル: Patch Normals, Binary STL file reader

カテゴリ

Help Center および MATLAB AnswersTriangulation Representation についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0