previous

page 4

next

You can now test your work so far by adding the spiral function from page 1 and by also adding:

function test() {
spiral();
}

We can make the spiral function more versatile by supplying the angle as an input:

function spiral(angle,d=1) {
fd(d); rt(angle); d++;
if (d<500) spiral(angle,d);
}

Test this modification with 82 or any angle you fancy!

function test() {
spiral(82);
}
previous
next