Edit in JSFiddle

var c = document.getElementById('c');
c.width = 200;
c.height = 200;
var ctx = c.getContext('2d');
ctx.translate(100, 100);

ctx.beginPath();

// start at 0°
ctx.lineTo(Math.cos(0) * 90, Math.sin(0) * 90);
// to 120°
ctx.lineTo(
    Math.cos((Math.PI * 2) / 3) * 90,
    Math.sin((Math.PI * 2) / 3) * 90);
// to 240°
ctx.lineTo(
    Math.cos(2 * ((Math.PI * 2) / 3)) * 90,
    Math.sin(2 * ((Math.PI * 2) / 3)) * 90);
// and back
ctx.lineTo(Math.cos(0) * 90, Math.sin(0) * 90);
ctx.stroke();
<canvas id='c'></canvas>