November 2011
Intermediate to advanced
348 pages
7h 2m
English
Caution, this recipe may induce hypnosis. In this recipe, we'll draw a spiral by connecting a series of short lines to form a spiral path.

Follow these steps to draw a centered spiral:
window.onload = function(){
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
var radius = 0;
var angle = 0;context.lineWidth = 10;
context.strokeStyle = "#0096FF"; // blue-ish color
context.beginPath();
context.moveTo(canvas.width / 2, canvas.height / 2);Read now
Unlock full access