Jump to content
  • Advertisement

Archived

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

stephanh

Convex or concave?

This topic is 5746 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
Advertisement
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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!