Coiled Dashes
Emergent pattern that came out of layering star shapes on top of each other. It has a slight illusory motion effect.
Log in to post a comment.
// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);
// Global code will be evaluated once.
const turtle = new Turtle();
const rot_shift = 11; //min = 0.1 max = 50 step = 0.1
const line_length = 2; //min = 0.1 max = 5 step = 0.1
const step_size = 1; // min = 0.1 max = 10 step = 0.1
for(let i = 0; i < 90; i+=step_size) {
pom_pom(0, 0, i, i+line_length, i, i/rot_shift);
}
function pom_pom(x_center, y_center, inner_diameter, outer_diameter, legs, rot) {
let theta = rot;
for(let i = 0; i < legs; i++) {
line(x_center + Math.cos(theta)*inner_diameter,
y_center + Math.sin(theta)*inner_diameter,
x_center + Math.cos(theta)*outer_diameter,
y_center + Math.sin(theta)*outer_diameter)
theta += Math.PI * 2 / legs;
}
}
function line(x1,y1,x2,y2) {
turtle.penup();
turtle.goto(x1, y1);
turtle.pendown();
turtle.goto(x2, y2);
}