Advertisement Jump to content


This topic is now archived and is closed to further replies.


Convex or concave?

This topic is 5844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, how can i find out if a terrain surface is convex or concave in order to get the exposure to wind and weather. Thanks alot. - Stephan
OpenMountains | Open source snowboard simulation - some day.

Share this post

Link to post
Share on other sites
If it is a mesh then you would check whether the normals point towards or away from one another. The cross product of an edge and the normal gives you a vector which you can use in a dot product with the other normal to make that determination. At the actual vertices I''m not sure what the appropriate thing would be.

If it is a conteneous surface, i.e. z=f(x,y) or r(s,t)=(x(s,t),y(s,t),z(s,t)) then I think you have to choose a direction. With z=f(x,y) then (0,0,1) would be a natural choice for direction. With r(s,t) then it would be dot product of the direction with the cross product of the second derivatives with respect to s and t. That is basically equivalent to the second derivative test. I can''t swear that is correct through. I would suggest trying a few reasonableness tests. If you use a parametric equation of the form r(s,t)=(s,t,z(s,t)) then you can color map z of the function and the second derivative to create a bitmap. You should be able to compare the two bitmaps and see if it is reasonable.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!