 class Canvas
+	controlFactor: 4 * (Math.sqrt(2) - 1) / 3 
 	constructor: ->
 		@elt = document.createElement('canvas')
 		document.getElementsByTagName('body')[0].appendChild(@elt)

		@ctx.moveTo(startX, startY)
		midX = ((startX + endX) / 2) + height
		midY = (startY + endY) / 2
		controlHeight = height * 4 * (Math.sqrt(2) - 1) / 3 
		@ctx.bezierCurveTo(startX + controlHeight, startY, midX, midY - controlHeight, midX, midY)
		@ctx.bezierCurveTo(midX, midY + controlHeight, endX  + controlHeight, endY, endX, endY)
		@ctx.strokeStyle = color
		@ctx.lineWidth = width
		@ctx.stroke()

		@ctx.moveTo(startX, startY)
		midX = (startX + endX) / 2
		midY = ((startY + endY) / 2) + height
		controlHeight = height * @controlFactor
		@ctx.bezierCurveTo(startX, startY + controlHeight, midX - Math.abs(controlHeight), midY, midX, midY)
		@ctx.bezierCurveTo(midX + Math.abs(controlHeight), midY, endX, endY + controlHeight, endX, endY)
		@ctx.strokeStyle = color
		@ctx.lineWidth = width
		@ctx.stroke()
