angle-normals

v1.0.0
Compute mesh normals using angle weights
mesh normal simplicial complex angle weight vertex rendering graphics and 1 more...

angle-normals

Computes vertex normals for a mesh using angle weights. This is slower, but produces results which are more robust to the mesh subdivision.

Install

Angle normals

npm i angle-normals

Example

var bunny = require('bunny')
var normals = require('angle-normals')(bunny.cells, bunny.positions)

console.log(normals)

API

require('angle-normals')(cells, positions)

Computes vertex normals from for a mesh.

  • cells are the cells of the mesh
  • positions are the positions of the mesh's vertices

Returns An array of normals

License

(c) 2015 Mikola Lysenko. MIT License

npm i angle-normals

Metadata

  • MIT
  • Whatever
  • Mikola Lysenko
  • released 11/7/2015

Downloads

Maintainers