Examples / p5.js Examples / / Arcs

Arcs

example p5.js javascript calling-functions

Click here to edit this code in the p5.js editor.

This sketch calls the arc() function to draw a circular pattern. It also uses the random() function to pick a random color for each arc.

arcs arcs arcs arcs

Remix Ideas

  • Change how many arcs are drawn on each layer. Instead of starting with two half-circles, start with 3 arcs, then go to 2 arcs. Try out different patterns to see what looks cool to you.
  • Give your arcs different sizes by changing the stroke weight.
  • Make your arcs all shades of blue.

Comments and Questions

Happy Coding is a community of folks just like you learning about coding.
Do you have a comment or question? Post it here!