# Connecting outermost dots with a single line?

**URL:** <https://discourse.processing.org/t/connecting-outermost-dots-with-a-single-line/16395>\
**Category:** Libraries\
**Created:** [December 14, 2019, 12:49pm UTC](https://discourse.processing.org/t/connecting-outermost-dots-with-a-single-line/16395 "2019-12-14T12:49:08Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [December 16, 2019, 7:38am UTC](https://discourse.processing.org/t/connecting-outermost-dots-with-a-single-line/16395/5 "2019-12-16T07:38:45Z")

</div>

> [@clausneergaard](#):
>
> connect the outermost randomly placed dots to make a shape?

The term of art for that is “convex hull” – and there are several tools that do it: the Mesh library, and openCV (I believe), and you can also just implement the algorithm directly.

[http://leebyron.com/mesh/](http://leebyron.com/mesh/)

> A Convex Hull is the encompassing shape around a group of points. As if you were to wrap a piece of string around all of the points. This is handy when doing collision tests on complex shapes, or finding the most extreme points within a dataset.

![hull](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b25b773c29ab3e8ec03d641ca550630f8ccd58e6.png)

and

> **[GitHub - atduskgreg/Processing-Convex-Hull: An example of finding the convex...](https://github.com/atduskgreg/Processing-Convex-Hull)**
>
> An example of finding the convex hull containing a set of points. Algorithm from Computational Geometry by de Berg, et al - GitHub - atduskgreg/Processing-Convex-Hull: An example of finding the con...

For a recent related discussion see:

> [@Anyone knows how to use getConvexHull();?](https://discourse.processing.org/t/anyone-knows-how-to-use-getconvexhull/8268/2):
>
> Hi! If you look at the source code it seems like the method returns a new contour but you are not using it (not even storing it in a variable).

---

_[View the full topic](https://discourse.processing.org/t/connecting-outermost-dots-with-a-single-line/16395)._
