{{sketch.instructions}}

A fork of {{sketch.parentSketch.title}} by {{sketch.parentUser.fullname}}.

Archived Sketch

This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.

View Source Code

Click record or press 'R'
to start/stop recording (max. 10 secs)

Click capture
to take a screenshot

Nearest Distance Point To LineSegments v1.1

This is a small test sketch to get the nearest distance of a point P (the mouse position) to some line segments given by two points. Please take a look at the kernel function: float SquaredDistancePointToLineSegment(PVector A, PVector B, PVector P, PVector S). Press 'blanc' key for randomize one line.
e.g. "mouse, keyboard"
e.g. "visualization, fractal, mouse"
learn more about Creative Commons

As a Plus+ Member feature, this source code is hidden by the owner.