Examples / p5.js Examples / / Lines Silhouette

Lines Silhouette

example p5.js javascript for-loops

This sketch uses a for loop to draw a bunch of lines with random lengths to create a silhouette effect.

lines silhouette

Remix Ideas

  • Change the minLineWidth, maxLineWidth, and lineWidthChange variables to create different effects.
  • Give each line a different color.
  • Make the lines pattern horizontal instead of vertical, so that it looks like an audio waveform.

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!