Exploring the concept of drawing a line through a circle
Example image: https://i.sstatic.net/I8B60.jpg
Check out my code snippet: https://codepen.io/ethan-horrigan/pen/OrRLXx
var r = 200;
var x1 = 800 / 2;
var y1 = 540 / 2;
var x = r * Math.cos(Math.PI / 180 * 135) + x1;
var y = r * Math.sin(Math.PI / 180 * 315) + y1;
ctx.beginPath();
ctx.arc(x1, y1, r, 0, Math.PI * 2, false);
ctx.moveTo(x1,y1);
ctx.lineTo(x, y);
ctx.stroke();