-2

I'm currently working on my master's thesis where I get:

  • A Delaunay triangulation drawn for me with given n points in (x, y, z) form.

My task is to use this triangulation and make contour lines at given z values. I have been nearly successful at doing this by implementing the wikipedia spline interpolation : https://en.wikipedia.org/wiki/Spline_interpolation

My problem is that I get contour lines crossing each other when implementing the splines while of course the linear drawings doesn't cross.

Parametric cubic spline interpolated contour lines

If you look at the bottom part of the screen you see two contour lines crossing, I don't have enough reputation points to show that the linear drawings doesn't. You can also see that from point to point that the edges are way too rounded. What I've tried is to interpolate more points between any pair of points to make more knot points along the lines, this to restrict them further, but to get non-crossing lines the splines look too much like a linear drawing which isn't satisfactory to the eye.

What I'd like to know, is not actual code implementation of the how, but maybe a pointer to how, readings and so forth. (NB, I'm going to make this from scratch, no libraries).

Question: How to make a higher degree polynomial function which doesn't curve too much outside its linear counterpart. By too much I mean that a given contour at let's say 50 meters, that it doesn't cross a contour at 60 meters.

Any help is highly appreciated.

Solve Johnsen
  • 67
  • 1
  • 1
  • 7
  • pointers? I dont think so - you need to define what exactly yu want to achieve -if the lines look too linear then what is it that you want? – gpasch May 08 '16 at 14:58
  • I'd like to know how to propperly interpoate using a higher degree polynomial function which doesn't curve too much, with too much I mean doesn't cross other contour lines. – Solve Johnsen May 08 '16 at 16:39

2 Answers2

1

You can try a weighted delaunay triangulation. It's defined as the euklidian distance minus the weight.

Micromega
  • 12,486
  • 7
  • 35
  • 72
  • I have a weighted Delaunay-triangulation, and I've found some interesting results from using butterfly algorithms like Powell-Sabin six triangle subdivision. Interestingly you curve the space rather then curving the contour lines, such that the linear lines gets curved by the space around itself. This promisses that the lines will never cross. – Solve Johnsen May 14 '16 at 13:04
-2

Couples of years ago I solved similar task. Here are some of my working notes. Probably it would help you.

  1. Refer to XoomCode AcidMaps plugin, on github: https://github.com/XoomCode/AcidMaps/tree/master/examples/isolines

Here is a demo: http://ams.xoomcode.com/flex/index.html Set, for example, the renderer type "Sparse" and interpolation strategy as "Linear", then press the "Update" button.

  1. Refer to VividSolutions JTS Java library: http://www.vividsolutions.com/jts/download.htm

  2. http://mike.teczno.com/notes/curves-through-points.html

  3. http://blog.csdn.net/xsolver/article/details/8913390

Artem Larin
  • 142
  • 6