This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Source code: actions geo2D

Built with Processing

Usage:

press 'h' to show/hide the help text

left click mouse and drag closest point.

press 'l' for intersection between line segment PQ and triangle ABC. This the DEFAULT mode.

press 't' (extra credits mode ) for intersection between 2 triangles.

press (while in 't' mode) 'u','i','d' for calculating union, intersection, \ndifference(PQR-ABC)respectively.THE DESIRED AREA IS ALWAYS SHOWN IN GREEN