Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Diamond Square  (Read 1608 times)

0 Members and 1 Guest are viewing this topic.

DingusKhan

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Diamond Square
« on: May 11, 2015, 01:03:27 am »
Hello.

I'm not sure if this is the right place to ask this, but it seemed to be the most appropriate.

Does anyone have a 1D implementation of the Diamond Square algorithm in SFML? I'm entirely new to fractals and procedural generation, and this algorithm seems to fit my needs the best, but I'm not quite sure about how to get started. I have a general understanding of the algorithm, but not in the implementation details for SFML. Just to clarify, by 1D I mean a single line.

Thanks.
« Last Edit: May 11, 2015, 01:05:59 am by DingusKhan »

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Diamond Square
« Reply #1 on: May 11, 2015, 01:40:28 am »
I'm not sure there is even a 1D version of the Diamond Square... I mean, it's whole concept is based on a 2D grid iirc.
wikipedia.

DingusKhan

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Diamond Square
« Reply #2 on: May 11, 2015, 02:01:54 am »
Y'know, you're 100% correct. I actually misread the article I was reading, which caused my confusion. I also solved the problem (after closer analysis, I realised my issue was in working out how to divide a single line into 2 lines and so on). The algorithm I was writing was a basic 1D midpoint displacement algorithm.