You can support the development on the Github Sponsors page.


Tech > DISTANCE TO LINE (LIBRARY)


get closest point from line to other point
made by atesin (atesin#gmail.com)
uploaded by atesin
added:
updated:
download cartridge
- CLICK TO PLAY -

1


LIBRARY: testing a fast 2d algorithm to find the nearest point of a line, from another external point.. no square roots or triginometry.

controls: you can move the white points and line edges by dragging with the mouse/touch.

- orange point: point constrained in segment, nearest to external point
- blue point: point in infinite projected line, nearest to external point

got inspiration from = https://stackoverflow.com/a/6853926/15576834

new in this version: joystick replaced by mouse drags to ease operation, as suggested in telegram


Post comment