We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi everyone !
When trying to draw a noisy circle I'm facing the following problem: the last vertex and the first vertex don't share the same position (due to the applied noise) so "closing" the circle becomes impossible:
How can I fix this ?
def setup(): size(600, 600) def draw(): background(255) n_points = 300 angle = radians(360) / n_points radius = 300 beginShape() strokeWeight(4) for e in range(n_points): n = noise(map(e, 0, n_points, 0, 3)) x = cos(angle * e) * radius * n y = sin(angle * e) * radius * n vertex(width / 2 + x, height / 2 + y) endShape(CLOSE)