Constructing surface from a set of contours


I have a number of contours which are oriented as shown inthe attached figure. I would like to construct surface from these set ofcontours. Could any one give me somesuggestions?

You need a matching set of vertices on each contour then it is straight forward - you just create quad between to vertices. For your diagram you will need a lot of vertices or it won’t give a good approximation. Google “lofting”

Yes, i googgled on lofting. There are some softwares like 3ds max, autodesk viz which do this. I am not sure whether I would write my own program or use those. I don’t know how flexible those software are. As my contours will be extracted from images and will be set at differenr angle at different positions. Any further suggestion?

I have no thoughts on how to program it. I just thought if you looked at how they did it;, you could get an idea of how to program the same.

Without ever having done this I could imagine the following works:

Create equal-size Bitmaps from the contours such that the arrow shown in the diagram would be the Z-axis and the contour is centered.

Pick a Point on the contour from the first Image as starting Point.
Chose a Point from the next Image that is on the contour such that the coordinate-difference between the 2 Points is minimal. Those two Points can be connected such that the 2 contours get connected.
Move along the first contour for a number of Pixels based on the number of Pixels that are on the contour (this will make the tesselation more dense if the contour gets smaller). This Point is the 3rd Point of a quad or triangle. The fourth Point can be found by doing the same on the next contour-image.

The most problematic Thing is to choose connectable points from two different contours I guess as there might be Freak-cases where the above algorithm would fail: In the above diagram the second contour’s dent is problematic.

On a second thought things are likely to be more complicated as minima require Special care or are likely to get lost if not tessellating with a very high Resolution.