I am just making a little program with p5.js, but I found something weird. The arc() function doesn't seem to render correctly when the size is quite big.
Here is my code:
var ellipseSize = 200;
var strokeSize = 60;
for(var j=0; j<filteredTrees.length; j++){
strokeWeight(strokeSize);
var rad = 0;
for(var i =0; i < filteredTrees[j].trees.length; i++){
var element = filteredTrees[j].trees[i];
var radBegin = rad;
rad += (element.nbr/filteredTrees[j].rangeNbr)*(2*PI);
stroke(element.color.red, element.color.green, element.color.blue);
arc(width/2, height/2, ellipseSize, ellipseSize, radBegin, rad);
}
ellipseSize += (strokeSize*2);
strokeSize *= 0.9;
}
And here is the rendered image, with black circles shwoing the correct alignment the arcs should have. Some arcs exceed their expected position, as you can see down there:
Do you have any idea why it does this ?