2*Math.PI = 6.283185307179586
ประà¸à¸²à¸¨ tag canvas à¸à¹ˆà¸à¸™ à¹à¸¥à¹‰à¸§à¸„่à¸à¸¢à¹€à¸‚ียน javascript
https://www.w3schools.com/html/html5_canvas.asp
https://devahoy.com/posts/html5-canvas-tutorial/
à¹à¸à¸™ x, y
- ระบบ Cartesian coordinate system à¸à¸³à¸«à¸™à¸”จุด x, y จาà¸à¸à¸²à¸£à¸¥à¸²à¸à¹€à¸ªà¹‰à¸™à¹à¸à¸™à¸—ั้งสà¸à¸‡à¸•à¸±à¸”à¸à¸±à¸™à¹€à¸›à¹‡à¸™à¸¡à¸¸à¸¡à¸‰à¸²à¸
- ระบบ Canvas coordinate system à¸à¸³à¸«à¸™à¸”จุด x, y คืภมุมบนซ้าย
context.arc(x,y,r,sAngle,eAngle,counterclockwise);
Parameter Description
x The x-coordinate of the center of the circle
y The y-coordinate of the center of the circle
r The radius of the circle
sAngle The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
eAngle The ending angle, in radians
counterclockwise Optional. Specifies whether the drawing should be counterclockwise or clockwise.
False is default, and indicates clockwise, while true indicates counter-clockwise.