teaching machines

HW F.2 – Hannah

March 12, 2013 by . Filed under cs455, postmortems, spring 2013.

I completed feature 2, which was including a computationally-generated terrain in my scene. I took the ruby code Chris wrote in his diamond-square lecture and translated it into C++ so I could run it in Visual Studio (I didn’t know how to run the ruby code :/, and it was fun converting it :). This went relatively smoothly, except for two problems:

1) I didn’t realize I needed to set the size to be one greater than a power of two, so I was getting extremely large numbers and NANs as results :/

 

 

 

2) The terrain wasn’t oriented correctly in the lecture, so I needed to apply the heights to the y axis instead of the z axis and reverse the ordering of the vertices.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now I have a nice terrain! I don’t want a very rough terrain, so I set the height range to be within 3. Here is a picture of the scene, including my goal post model:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Finally, here is a video of me running around on my terrain:

http://www.youtube.com/watch?v=fmO0A2sLJA8