ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.beginPath(); ctx.moveTo(offsetX, offsetY); ctx.lineTo(offsetX + base, offsetY); ctx.lineTo(offsetX, offsetY - height); ctx.closePath(); ctx.fillStyle = '#c7d2fe'; ctx.fill(); ctx.strokeStyle = '#1e3a8a'; ctx.lineWidth = 2; ctx.stroke();
Commit the file and push to GitHub. Go to your repository Settings > Pages. Set the branch to main and save. Your lesson will be live at https://yourusername.github.io/geometry-lesson/ . geometry lesson github io
ctx.fillStyle = '#0f172a'; ctx.font = '14px sans-serif'; ctx.fillText(`a = $base`, offsetX + base/2, offsetY + 20); ctx.fillText(`b = $height`, offsetX - 30, offsetY - height/2); ctx.fillText(`c = $hyp`, offsetX + base/2, offsetY - height/2); Your lesson will be live at https://yourusername
<!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script> <script src="libs/p5.min.js"></script> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Circle Inscribed in a Triangle</h1> <div id="canvas-container"></div> <p>Radius \( r = \frac2 \times \textArea\textPerimeter \)</p> <script src="sketch.js"></script> </body> </html> ctx.font = '14px sans-serif'