Triangle to Decagon spiral
Log in to post a comment.
// Forked from "Sqiral" by Meintevds // https://turtletoy.net/turtle/8936a24c63 // Fork by Rupert Russell // https://turtletoy.net/turtle/d9cb103919# const stepSize = 0.602 // min=0.002 max = 3 step=0.01 const sides = 5 // min=2 max = 10 step=0.1 const angle = 0.007 // min=-0.1 max = 0.1 step=0.001 const cycles = 187 // min=100 max = 700 step=1 const turtle = new Turtle(); function walk(i) { turtle.forward(i*stepSize) turtle.right((360 / sides) + i * angle); console.log("angle = " + angle); // send a message to the browser console return i < cycles; }