• Create Account

Banner advertising on our site currently available from just \$5!

Member Since 28 Feb 2013
Offline Last Active Yesterday, 10:11 AM

### In Topic: Can i do this using the fourier transform?

15 April 2015 - 09:57 AM

I'm unsure on what you're trying to accomplish. Can you provide a more detailed and concrete example?

### In Topic: Understanding Generalized Barycentric Coordinates

13 April 2015 - 09:09 AM

Randy Gaul is right. You lose the one-to-one mapping because you can find other sets of weights that satisfy all the equations.

However, if I understand the application right (which maybe I don't), I don't think you need to care about that for a rasterizer. Losing the one-to-one mapping in this case means that you could have two points be rendered as the same color, but does that matter? I wouldn't think so, but then I might be missing the point of the application.

### In Topic: Understanding Generalized Barycentric Coordinates

08 April 2015 - 04:54 PM

Your example doesn't work because of 2 things:

1. You're using the normal Cartesian coordinates of the triangle points instead of converting them to barycentric coordinates.
2. You're basically pre-selecting the barycentric coordinates. You need to use the formulas to compute all the $$w_j$$ values and then you'll see $$\sum_{j=0}^n w_j(\mathbf{q}_j-\mathbf{p}) = 0$$, where $$\mathbf{q}_j, \mathbf{p}$$ are in Cartesian coordinates.

In order to get the proper interpolation you're looking for, You have to use the formulas in that paper to convert the point to the barycentric coordinates (the $$\alpha_j$$ vector) and then dot that with the values you want those points to have in order to get the interpolated value of the given point.

I will agree with Randy Gaul that you do lose coordinate uniqueness if the polytope isn't a simplex. However, I disagree with him that this paper is not interesting. True, barycentric coordinates with a simplex will guarantee a unique coordinate value for any point, but there are a lot of uses beyond just finding points in a simplex, although you have to be sufficiently interested in computational geometry to appreciate them. In a game programming setting, there might be only a couple of relevant uses beyond this one.

### In Topic: Cubic interpolation on an irregular grid (triangle mesh)?

26 March 2015 - 11:06 AM

As a quick note about the Bezier triangle, you have to be somewhat careful in "ghosting" your vertices. Interpolation is a way of getting continuous data out of a smaller set of discrete data. You've got a certain amount of information in your data set and interpolation won't increase that amount of information. The linear, quadratic, and cubic interpolation schemes are just ways of guessing what's happening between the data points, but it doesn't give you any new information that you didn't have before. I guess the main point here is if you're trying to linearly interpolate the triangle vertices to get these "ghost" points and then use a cubic interpolation to get the colors, you're going to end up with a cubic approximation of a linear interpolation.

The polyharmonic spline is probably a good way to go if you're comfortable with the approximations it's making. It assumes that the grid points are exact and that it minimizes the "bending energy". The way Eberly puts it, it's like a thin metal sheet that is constrained not to move at the grid points. However, you're right that the linear solve will take a lot of time, especially since the matrices are not sparse. It's really up to you.

http://www.geometrictools.com/Documentation/ThinPlateSplines.pdf

http://mathematica.stackexchange.com/questions/11765/data-interpolation-and-listcontourplot/11883#11883

### In Topic: Cubic interpolation on an irregular grid (triangle mesh)?

25 March 2015 - 09:06 AM

Yes you can, in a similar fashion to how you're doing it there. You'll need to have more data points along the edges and in the middle (10 points for a cubic interpolation), similar to a Bezier triangle:

It's going to be tricky since it'll be hard to guarantee a 10-point triangle. There might be some sort of adaptive method, but I'm not sure how to make it work with the mesh you've shown here.

PARTNERS