<p>I have a wavefront loader, however it only works with triangular meshes.</p>

<p>I have been trying to think how to handle faces with arbitrarily many vertices but I have no idea how they are to be handled as ultimately everything needs to be given to the GPU as triangles and I cannot think fo a way to mape any arbitrary n-gon to triangles.</p>

<p>Like I know how to convert a quadrilateral to two triangles, but my way won't work for quintalaterals for example.</p>

CC BY-SA 4.0
2018-06-23T07:48:32.803Z
All convex n-gons can be represented using a triangle fan, using the first vertex as the centre of the fan and every other vertex (1+n), this is assuming the vertices are CCW order.
PaulHK
<algorithm><geometry><mesh>
How are non-triangular wavefront meshes handled?
Makogan
# How are non-triangular wavefront meshes handled?

(Asked by: username_0 on 2018-06-22)

I have a wavefront loader, however it only works with triangular meshes.

I have been trying to think how to handle faces with arbitrarily many vertices but I have no idea how they are to be handled as ultimately everything needs to be given to the GPU as triangles and I cannot think fo a way to mape any arbitrary n-gon to triangles.

Like I know how to convert a quadrilateral to two triangles, but my way won't work for quintalaterals for example.

**Tags:** algorithm, geometry, mesh
> **Comments:**
> **username_1**: All convex n-gons can be represented using a triangle fan, using the first vertex as the centre of the fan and every other vertex (1+n), this is assuming the vertices are CCW order.  

---

## 0 answers

