examples/js/three.js
function visible( face, vertex ) {

		var va = vertices[ face[ 0 ] ];
		var vb = vertices[ face[ 1 ] ];
		var vc = vertices[ face[ 2 ] ];

		var n = normal( va, vb, vc );

		// distance from face to origin
		var dist = n.dot( va );

		return n.dot( vertex ) >= dist; 

	}
function visible( face, vertex ) {

		var va = vertices[ face[ 0 ] ];
		var vb = vertices[ face[ 1 ] ];
		var vc = vertices[ face[ 2 ] ];

		var n = normal( va, vb, vc );

		// distance from face to origin
		var dist = n.dot( va );

		return n.dot( vertex ) >= dist; 

	}
function visible ( face , vertex ) { var va = vertices [ face [ 0 ] ] ; var vb = vertices [ face [ 1 ] ] ; var vc = vertices [ face [ 2 ] ] ; var n = normal ( va , vb , vc ) ; // distance from face to origin var dist = n . dot ( va ) ; return n . dot ( vertex ) >= dist ; }
Whether the face is visible from the vertex
Whether the face is visible from the vertex