Home /  Sketchbook /  p5.js - Common Examples - Polygon to Line
  • Info

Overview

This is a p5.js sketch to demonstrate the detection of intersection point(s) between a line segment and a polygon.

Controls

Mouse

  • Click and Drag - Allows user to click and drag the green vertices of the shapes to resize them.

References:

Links:

  • Live View
  • Source on Github

Screenshot:

screenshot