pollier
Nov 17th, 2000, 02:49 PM
Using OpenGL, I've made a function to construct a terrain from a grayscale picture. Does anyone have a nice small efficient formula to calculate the height of the terrain in any given point-even between vertexes of the terrain
Here's a very crude diagram:
I hope it formats correctly...
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
| | | A | | |
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
Each + is a vertex of the terrain with a different height.
Suppose someone is standing at point A - how do you calculate how high the character is?
Thanks,
pollier
Here's a very crude diagram:
I hope it formats correctly...
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
| | | A | | |
+----+----+----+----+----+
| | | | | |
+----+----+----+----+----+
Each + is a vertex of the terrain with a different height.
Suppose someone is standing at point A - how do you calculate how high the character is?
Thanks,
pollier