Jump to content
  • Advertisement
Sign in to follow this  
tstandley

Diamond Square algorithm

This topic is 3666 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

So I've been looking all over the internet trying to find straightforward C code for the diamond square algorithm. I would settle for an explanation that goes into enough depth. Here's what I am trying to do. I have a height map of floats float heightMap[33][33]; I also have a boolean array bool mustBeZero[33][33]; I want to run the diamond square algorithm (also known as the midpoint displacement algorithm) where the height map at every true mustBeZero location is seeded to zero (and thus zero will be used in averaging). Most of the code out there is unreadable, and the tutorial pages don't go into enough detail for me to follow through with my idea. Please help!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!