venn.js
function getCenter(points) {
        var center = {x: 0, y: 0};
        for (var i =0; i < points.length; ++i ) {
            center.x += points[i].x;
            center.y += points[i].y;
        }
        center.x /= points.length;
        center.y /= points.length;
        return center;
    }
function getCenter(points) {
        var center = {x: 0, y: 0};
        for (var i =0; i < points.length; ++i ) {
            center.x += points[i].x;
            center.y += points[i].y;
        }
        center.x /= points.length;
        center.y /= points.length;
        return center;
    }
function getCenter ( points ) { var center = { x : 0 , y : 0 } ; for ( var i = 0 ; i < points . length ; ++ i ) { center . x += points [ i ] . x ; center . y += points [ i ] . y ; } center . x /= points . length ; center . y /= points . length ; return center ; }
Returns the center of a bunch of points
Returns the center of a bunch of points