code: function (pts, center, point)
  	{
  		var min = null;
  		
  		for (var i = 0; i < pts.length - 1; i++)
  		{
  			var pt = mxUtils.intersection(pts[i].x, pts[i].y, pts[i + 1].x, pts[i + 1].y,
  				center.x, center.y, point.x, point.y);
  			
  			if (pt != null)
  			{
  				var dx = point.x - pt.x;
  				var dy = point.y - pt.y;
  				var ip = {p: pt, distSq: dy * dy + dx * dx};
  				
  				if (ip != null && (min == null || min.distSq > ip.distSq))
  				{
  					min = ip;
  				}
  			}
  		}
  		
  		return (min != null) ? min.p : null;
  	}
docs: Function: getPerimeterPoint
  
  Returns the intersection between the polygon defined by the array of
  points and the line between center and point.