POV-Ray : Newsgroups : povray.general : creating heightfields from contour maps : Re: creating heightfields from contour maps Server Time
13 Aug 2024 15:24:28 EDT (-0400)
  Re: creating heightfields from contour maps  
From: Adrian Pederson
Date: 14 Aug 1998 15:15:44
Message: <35d47ed0.0@news.povray.org>
Since there seems to be some interest in this type of tool, i would
be willing to try making one, mostly for selfish reasons though.
I have Borland C++, and Matlab for development platforms, the
latter may be the easiest for doing the constrained interpolation.
I could then compile the functions into a C program.

My biggest question is where to start. What would be the best
method for defining and drawing the contour map itself? Should
it be created as some type of data file or an image map?

Putting on my cs hat for a minute and abstracting the problem,
i see that there needs to be a way to define closed or open
paths and to have an associated height value for each.

So taking the data file path, is there any preexisting app that
would be good for drawing the contours and creating a file that
would then be 'easily' convertible into an image. This could be
something that would create the contours as segmented vector
paths or (ideally) splines. sPatch jumps to mind, i think i just
read some info on its data file structure.

For the image map route, something like Illustrator, which i
don't have (yet), could do a similar job. Just create the
contours, give them the appropriate color(height value), save
as tga, png...?, and run though the interp program.

Ideas, comments...?

Adrian Pederson


>This function (constraining the height field boundary conditions
>over contours and/or regions of finite area) would be extremely
>useful for more than links.  There are many examples.
>
>One would be a road winding along a hillside.  It would
>be nice to be able to specify the road, then to have the
>landscape generator fill in a terrain which smoothly matches
>the edge of the road.  Of course, this is backwards from nature,
>where the roadbuilders must deal with the hill they are given.
>But it would be good for generating scenes.
>
>I can imagine algorithms which might do a credible job at this.
>The easiest implementation may be to manipulate tga files using
>PERL -- the format is straightforward and PERL does a nice job
>with file I/O.  It does takes a bit of work to learn, though.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.