In this post, I’d like to show you how you can interactively create custom paths with the mouse in p5js. It will serve as a basic structure for more complex interactions.
A path is made up of points, and is a basic building block of vector graphics. Think of it as Adobe Illustrator’s Pen tool. You can create a path only using a straight line, or more often than not, we create paths with bezier curves.
Here is how you can draw a path that is made up of straight line segments.