For the past week I've been researching the Marching Cubes algorithm. I hope to use this for Terrain as it would allow the creation of destruction of terrain. After looking at source code and reading many articles I decided to try compiling some of it myself and playing around with it to attempt to make terrain. However, It's giving me a headache and I can't seem to find any good resources on how to do it.
This is from the example found here - http://www.angelfire.com/linux/myp/MC/
The sourcecode relevant can be found on the website.
I added the source code to my project and converted all the code to be used with OpenGL 3.2. However, I don't want to be using this code in my final project. (This is just so I can understand it). I'm having trouble understanding the code. I feel I understand the algorithm now but I can't seem to understand how the object is actually formed.
How can I change this object to create terrain? Are there any better resources on the internet? Thanks in advance.