scott <sco### [at] scott com> wrote:
> >
> > in povray terminology, I think it would be easier to generate a mesh
> > from your points.
>
> I was hoping there would be an easier way to generate a heightmap rather
> than triangulating a mesh, and there to also be a way to keep the
> gradient continuous rather than sharp changes along the contour lines. I
> got quite close by doing a simple linear interpolation from the 2
> nearest contours, but maybe I need to do a higher order interpolation.
>
I happened to be re-reading section 2.3.10 in the docs today ("SDL Tutorial: A
Raytracer") and the subsections there beginning at 2.3.10.10 detail some nice
code about creating a 'similar' kind of mesh. Perhaps your interpolation of
points could be applied to that setup in some way? Just an idea.
Post a reply to this message
|