Path: utzoo!utgpu!water!watmath!clyde!att!ulysses!gamma!sword!faline!bellcore!texbell!sugar!ficc!uunet!mcvax!ukc!stc!idec!prlhp1!yuleat From: yuleat@prlhp1.prl.philips.co.uk (yuleat) Newsgroups: comp.graphics Subject: Contour to grid algorithm Message-ID: <661@prlhp1.prl.philips.co.uk> Date: 25 Oct 88 09:47:03 GMT Reply-To: yuleat@prlhp1.UUCP () Organization: Philips Research Laboratories, Redhill, UK Lines: 26 Can anyone help me with the following problem? I have data for a relief map in terms of height contours. The data stored for each contour is : 1. A height above sea-level 2. A linked list of points, which are joined by straight line segments to make up the contour. The area mapped by this data is rectangular and all component points of the contour must be within this area. As a result, some contours do not join up, as they start/finish off the map. All the contour line segments are guarenteed not to touch/cross. The problem I have is that I wish to convert this relief data stored in contour form into a form where a uniform rectangular grid is used. Each point of the grid will have a spot height. I have considered a number of "simple" algorithms, but they all tend to fail in particular cases (mostly near the corners of the rectangular map area, when contours are sparse). How do I work out what the height should be at each point? Thanks in advance, Andy Yule (yule@prl.philips.co.uk)