We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I wrote this one.
function draw() { arc(50,55,60,60,PI,PI); }
I thought nothing would appear. but It appears half circle like this.
I understand arc(x,y,width,height,start,stop);
Why start and stop are the same arguments but half circle appears?
Answers
Or is start and then how long the angle is?
@nitta --
That is strange. In Processing (Java) start and stop are absolute, and this is what would generate the image you share:
I'm not sure whether the arc
stop
argument is instead relative in p5.js -- that would be a surprising difference, and might be a bug.Are you setting ellipseMode() in your sketch?
https://GitHub.com/processing/p5.js/issues/740#issuecomment-113974932
Thank you all. but now Im more confused. I tried more patterns below. 0 to 90 degree is circle appear. 91 to 270 degree is half circle appear. 271 to 350 is nothing wold appear. 351 to 360 circle appear.
Very strange indeed.
@nitta -- would you submit an issue to p5.js issues?
Before doing so, you mightalso want to consult this closed issue -- apparently p5.js chose to implement arc differently from Processing in ways that may explain some of your edge cases: