che possono essere calcolate come somma cumulata
var p=v.reduce(
(total,x,i)=>
[...total,
(i>0)?[total[i-1][0]+Math.cos(2*x*Math.PI/n),total[i-1][1]+Math.sin(2*x*Math.PI/n)]:
:[Math.cos(2*x*Math.PI/n),Math.sin(2*x*Math.PI/n)]
],
[]
);
o anche, solo la posizione finale
var posFin=v.reduce((total,x)=> [total[0]+ Math.cos(2*x*Math.PI/n),total[1]+Math.sin(2*x*Math.PI/n)],[0,0]);