# OpenGL Mesh from unordered points?

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, I'm a student programmer who has recently begun my learning experience with OpenGL (2 months ago). So far, I have quite enjoyed the intuitiveness of the API, and the abundance of online resources/tutorials. However I come to these forums with a problem that I cannot find the answer for on the web: Is it possible to use OpenGL to generate a basic mesh from a set of unordered points? I have already experimented with the OpenGL tessellation routines, and though I was successfully rendering a complex polygon, it wasn't quite what I needed. My data points are contour-less and may be supplied to the program in any order. I need a way to essentially 'throw a blanket' over the points, that is, to generate a surface encompassing all the points, without holes. Here are some example pictures to illustrate my situation: The data points: But due to the ordering, tessellation results in: I just want a mesh that covers the whole dome. So if anyone knows how I could do this with OpenGL, it would be much appreciated. Thanks in advance, areksu

##### Share on other sites
"Throwing a blanket" over the points sounds like finding the convex hull, which will be exactly what you want as long as your object is actually convex. If it isn't, there's no one true solution, but the most popular one is Delaunay triangulation. More info here. In any case, OpenGL won't do any of this stuff on its own, though of course it'll render the mesh once you calculate it in your own code.

##### Share on other sites
constructing a mesh from points is a very hard problem, and indeed, nothing that openGL will for you.
Look into DeLaunay triangulations (creating triangle structures from the points)

You'll have to specify what your result should be like with respect to the unput points. Must the mesh conatin only those points, and simply calculate triangle structures among them (delaunay). is it allowd to add new points to a nmesh (tesselations)?? etc etc.

In its most basic. the get A mesh that is guaranteed to contain all points, simply get the center of gravity, search the farthest vertex from that point from the set, and construct a spehere with exatcly that radius, positioned at the center.
(due to resolution etc, remmber that points can still exceed the sphere in practice, but never when the sphere is assumed to be perfect)

'throwing a blanket' can simply be done by starting with a quad plane above and lowering all points untill they 'hit' one of the input points.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
13
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633663
• Total Posts
3013233
×