» Minimum Polygon Distance
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Minimum Polygon Distance

plugin
Credits: Hormoz Pirzadeh

about

Get minimal distance of two or more arbitrary convex polygons.
Calculation using Rotating Calipers.

Should work with polygons of any edge point number.

Please note that:

  • Polygons have to be convex
  • Corner points of polygons have to be ordered clockwise
  • No collision detection is performed (i.e. overlapping polygons do not have a distance of zero. Probably could use HitTest (2d Polygon)for that.

Outputs a distance matrix containing all distances between all input polygons. Also, the closest points between the polygons are supplied.

Not heavily tested - use with caution!
Any feedback or suggestions for improvement is welcome.
Work partly commissioned by This.Play

download

MinimumPolygonDistance_v1.zip
10.03.14 [23:39 UTC] by motzi | 875 downloads

anonymous user login

Shoutbox

~7d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~13d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~13d ago

~14d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~27d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~2mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~2mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/