V
V
VerNika2016-02-26 00:12:26
Programming
VerNika, 2016-02-26 00:12:26

Surface triangulation and smoothing. How to correctly implement?

In general, a surface is defined by a heightmap, namely a two-dimensional matrix a[n][m] (a[i][j] = z, i = x, j = y). It is clear that the points are arranged as follows:
e4676ea0812645508886ca4839d07c99.png1. Triangulation.
The surface is divided into triangles like this:
e1bd58c12dda408bac0ceb807fd68a62.png
Or like this, in some cases: Is it
fa30403547f84612ba86f8ec703a5311.png
right to do this? Couldn't it be any better?
2. Smoothing.
Actually, the main question is how to make this broken surface more or less smooth?
That is, to increase (supplement) this matrix in such a way that there are more intermediate points, and they smooth this surface? What are the methods? Which one is best for this case?
370c919be8d843769511dd570bdf18e7.png14a49ab41297444cbeff760f6107a46c.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2016-02-26
@VerNika

To begin with, try to temporarily forget about the physical meaning of your data, about all the heights and about 3D in general. Next, you just have some function z = f(x, y)of two arguments, given by a table of values ​​at some points (your heights). You need to get the values ​​of this function at other points with a smaller step, that is, with a higher resolution in x and y. This is a classic 2D interpolation problem. Lots of solution methods . Bicubic interpolation and Lanczos filter are considered classics .
As for ready-made solutions, for example, scipy has the corresponding tools .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question