# Fill a mesh Delaunay object

**URL:** <https://discourse.processing.org/t/fill-a-mesh-delaunay-object/3341>\
**Category:** Processing\
**Created:** [September 7, 2018, 7:57am UTC](https://discourse.processing.org/t/fill-a-mesh-delaunay-object/3341 "2018-09-07T07:57:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![solub](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/solub/32/333_2.png) [@solub](https://discourse.processing.org/u/solub)\
**Post date:** [September 8, 2018, 10:29am UTC](https://discourse.processing.org/t/fill-a-mesh-delaunay-object/3341/4 "2018-09-08T10:29:19Z")

</div>

Hi @BrokenCode,

I’m not really familiar with Lee Byron’s “mesh” library but here is my two cents:

- `getRegions()` only work with Voronoi objects
- the “Triangulate” library seems more appropriate in your case

You just need to:

- download it [here](http://n.clavaud.free.fr/processing/triangulate/triangulate-20100628.zip)

- import it in your sketch

- put all the points (PVector) you want to triangulate in an array list (let’s call it `plist`)

- call the `triangulate` method on that list: -\> `triangles = Triangulate.triangulate(plist)`

- display the triangles with the `beginShape(TRIANGLES)` function and fill them as you like:

```auto
beginShape(TRIANGLES)
for t in triangles:
    fill(random(255), random(255), random(255))
    vertex(t.p1.x, t.p1.y)
    vertex(t.p2.x, t.p2.y)
    vertex(t.p3.x, t.p3.y)
endShape()

```

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

---

_[View the full topic](https://discourse.processing.org/t/fill-a-mesh-delaunay-object/3341)._
