Jump to content
  • Advertisement
Sign in to follow this  
Mixasik

Surface by array of points (OpenGL)

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i'm need help, because i'm not work with OpenGL. I have array of records (with fields - X,Y,Z) and i must create surface by this points. And i need help, samples and etc. In this array points not top of surface, in it all points. I need idea is it realise?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Mixasik
Hello, i'm need help, because i'm not work with OpenGL.
I have array of records (with fields - X,Y,Z) and i must create surface by this points. And i need help, samples and etc. In this array points not top of surface, in it all points. I need idea is it realise?
Can you provide some more details? It sounds like you're wanting to load or import a mesh of some kind and render it using OpenGL, but I'm not sure.

Or are you trying to build a surface from a 'point cloud' (i.e. a set of points)?

Share this post


Link to post
Share on other sites
There's many different surfaces you could construct from an arbitrary set of points. One of the more robust ones is the convex hull, which is a closed surface which covers the surface points of the point set, keeping all points inside the surface.

Share this post


Link to post
Share on other sites
I have array of the points calculated in advance under some formula, and it is necessary to me I use them to construct a surface, in advance I do not know what is this surface, I have only array of points. This point may be is points of part surface or full surface...

Share this post


Link to post
Share on other sites
You might not know what the surface looks like, but you need to know what it is made up of.

For example, does the formula give you a set of points for a surface made up of triangles? For instance, if the formula output 6 points, are the first 3 points the first triangle, and the next 3 points the 2nd triangle?

Or, if it gives 6 points, the first 3 could be a triangle, and then each point after that could be used to create a triangle fan with the previous 2 points. Or, the points might define quads (shapes made up of 4 points) instead of triangles.

So, even though you might not know what the surface looks like, the only way to draw it is if you know how the points are supposed to be drawn. Without that, there's no way to draw anything because you don't know how to interpret the data and it just stays as an array of points, there's nothing you can do with them.

Share this post


Link to post
Share on other sites
Can I get from a array of points can allocate surfaces necessary for construction? And how it to make?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!