View Full Version : surface and point
02-05-2010, 06:07 AM
first: sorry for my bad english! I have a set of points and I want opengl to draw serface. Opengl should interpolate with splines. Where do i have to look for?
02-05-2010, 07:15 AM
That's kind of vague. First, what do you want to interpolate? Colors? Geometry? Is this a point-sampled geometry like a laser scan of the statue of David and you want to fill in holes? Or are the points a mesh grid and you want to create a smooth surface over it? Something like this:
If it's the latter, there are several ways to do this.
One is OpenGL evaluators, which might be exactly what you're looking for. This is a Bezier-basis function, which isn't really splines, but you can convert your data to match the Bezier. It's kind of complex though.
The other is just grab an algorithm somewhere that renders the geometry for you. What kind of splinar interpolation do you want? B-spline interpolation? What degree? Linear, quadratic, cubic? Probably cubic.
Here's another link on rendering using the GLU library that comes with OpenGL. I've never used a library for rendering b-splines, but according to this page, it's supported by the evaluators.
02-05-2010, 08:49 AM
indeed i have a surface: it is the surface of a relativistic star, which i want to draw with opengl. because the surface is a numerical result i just have a set of points. but: the surface is not "open" (if this is the correct word for it).
thnak you again
02-07-2010, 09:52 AM
Ah, so you have a point cloud of geometry and want to display it as a surface?
There are several ways to do that, but I'm not sure which involve splinar interpolation.
If you can preprocess this, you can use a program that takes point clouds and turns it into surfaces. Then just read your surface in as an OBJ or something. One program I've used in the past for this is meshlab.
If you can't preprocess this, that makes it a little harder. You could alway render the points and use a reconstruction filter. There's a paper called "The Randomized z-Buffer", which provides some details of rendering high-quality point clouds.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.