js/plugins/highchart/parts-3d/SVGRenderer.js
/** Method to construct a curved path
  * Can 'wrap' around more then 180 degrees
  */
Method to construct a curved path
Can 'wrap' around more then 180 degrees
Method to construct a curved path Can ' wrap ' around more then 180 degrees
function curveTo(cx, cy, rx, ry, start, end, dx, dy) {
	var result = [], 
		arcAngle = end - start;
	if ((end > start) && (end - start > Math.PI / 2 + 0.0001)) {
		result = result.concat(curveTo(cx, cy, rx, ry, start, start + (Math.PI / 2), dx, dy));
		result = result.concat(curveTo(cx, cy, rx, ry, start + (Math.PI / 2), end, dx, dy));
		return result;
	}
	if ((end < start) && (start - end > Math.PI / 2 + 0.0001)) {			
		result = result.concat(curveTo(cx, cy, rx, ry, start, start - (Math.PI / 2), dx, dy));
		result = result.concat(curveTo(cx, cy, rx, ry, start - (Math.PI / 2), end, dx, dy));
		return result;
	} 
	return [
		'C', 
		cx + (rx * Math.cos(start)) - ((rx * dFactor * arcAngle) * Math.sin(start)) + dx,
		cy + (ry * Math.sin(start)) + ((ry * dFactor * arcAngle) * Math.cos(start)) + dy,
		cx + (rx * Math.cos(end)) + ((rx * dFactor * arcAngle) * Math.sin(end)) + dx,
		cy + (ry * Math.sin(end)) - ((ry * dFactor * arcAngle) * Math.cos(end)) + dy,
		cx + (rx * Math.cos(end)) + dx,
		cy + (ry * Math.sin(end)) + dy
	];
}
function curveTo ( cx , cy , rx , ry , start , end , dx , dy ) { var result = [ ] , arcAngle = end - start ; if ( ( end > start ) && ( end - start > Math . PI / 2 + 0.0001 ) ) { result = result . concat ( curveTo ( cx , cy , rx , ry , start , start + ( Math . PI / 2 ) , dx , dy ) ) ; result = result . concat ( curveTo ( cx , cy , rx , ry , start + ( Math . PI / 2 ) , end , dx , dy ) ) ; return result ; } if ( ( end < start ) && ( start - end > Math . PI / 2 + 0.0001 ) ) { result = result . concat ( curveTo ( cx , cy , rx , ry , start , start - ( Math . PI / 2 ) , dx , dy ) ) ; result = result . concat ( curveTo ( cx , cy , rx , ry , start - ( Math . PI / 2 ) , end , dx , dy ) ) ; return result ; } return [ 'C' , cx + ( rx * Math . cos ( start ) ) - ( ( rx * dFactor * arcAngle ) * Math . sin ( start ) ) + dx , cy + ( ry * Math . sin ( start ) ) + ( ( ry * dFactor * arcAngle ) * Math . cos ( start ) ) + dy , cx + ( rx * Math . cos ( end ) ) + ( ( rx * dFactor * arcAngle ) * Math . sin ( end ) ) + dx , cy + ( ry * Math . sin ( end ) ) - ( ( ry * dFactor * arcAngle ) * Math . cos ( end ) ) + dy , cx + ( rx * Math . cos ( end ) ) + dx , cy + ( ry * Math . sin ( end ) ) + dy ] ; }
Method to construct a curved path
 Can 'wrap' around more then 180 degrees
Method to construct a curved path Can ' wrap ' around more then 180 degrees