ho quasi fatto ditemi se vadano bene i nomi che gli ho dato e accetto consigli:
codice:
		function drawTriangle(mx,my,x,y,ex,ey,color)
	{
		// Draw triangle #A2322E
		ctx.fillStyle=color;
		ctx.beginPath();
		// Draw a triangle location for each corner from x:y 100,110 -> 200,10 -> 300,110 (it will return to first point)
		ctx.moveTo(mx,my);
		ctx.lineTo(x,y);
		ctx.lineTo(ex,ey);
		ctx.closePath();
		ctx.fill();


	}