example/threejs/asset/three.js
function ( contour ) {

		var n = contour.length;
		var a = 0.0;

		for ( var p = n - 1, q = 0; q < n; p = q ++ ) {

			a += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;

		}

		return a * 0.5;

	}
function ( contour ) {

		var n = contour.length;
		var a = 0.0;

		for ( var p = n - 1, q = 0; q < n; p = q ++ ) {

			a += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;

		}

		return a * 0.5;

	}
function ( contour ) { var n = contour . length ; var a = 0.0 ; for ( var p = n - 1 , q = 0 ; q < n ; p = q ++ ) { a += contour [ p ] . x * contour [ q ] . y - contour [ q ] . x * contour [ p ] . y ; } return a * 0.5 ; }
calculate area of the contour polygon
calculate area of the contour polygon