teaching machines

Feature 1

Editing ObjUtilities code from class to work on real obj files was fairly straight forward. I looped over the file, incrementing nvertices anytime a line started with ‘v ‘ and incremented nfaces anytime a line started with ‘f ‘. Other lines were simply ignored. Originally, I tried using the regex library for a bit more […]

Feature 4

Doing a skybox presented a few frustrations, but a very rewarding result. My general strategy for the skybox was to texture a cube (with all vertices at a -1 or 1 coordinate) that surrounded the camera, without depth testing. It would use the camera’s rotations, but ignore it’s translations. To ignore depth testing, simply disable […]

Post Mortem Features 1+2

I decided I didn’t really want to create a terrain on my own so I searched for some terrain online.  I figured there would be a halo community with a lot of it and I ended up finding http://hce.halomaps.org/index.cfm.  There are a lot of models people created on here that you can import into blender and […]

Feature 5

This time, I gave my camera the ability to walk around the map with its height varying with the height of the land. The first thing I did was create a class called Heightmap, which held a width, a height, and a 2D array of floats (heights). Then, I made a couple of new methods […]

Feature 5 Post Mortem

Adding a camera to my terrain came pretty quickly after I generated my terrain, but it took me a while to iron out all the bugs. I also feel like I went at the problem in kind of a strange way, but I’ll get to that later. My cameras controls use WASD for advancing and […]

CS 330 Lecture 20 – A Logo Compiler with Conditionals and Loops

Agenda what ?s interpreting vs. compiling modeling a program: follow the grammar what to do on undeclared variables? adding loops adding conditionals TODO Write a Logo program and drop it in your submissions directory in W330. Name your file todo.logo. Be exactly exact. We will have a gallery showing on Monday. You are encouraged to […]

CS 330 Lecture 19 – A Logo REPL Part II

Agenda what ?s comments bugs a REPL variables expressions General Test Topics Things on the exam: addressable memory stack vs. heap storage pattern matching with common regex primitives types and type checking declarations vs. definitions basic instructions (pushl, movl, addl, subl) and flow control (cmpl, jmp and friends) in assembly big picture ideas small code […]

Feature 2 Post Mortem

Generating terrain wasn’t too hard; the biggest problems I had were simple things that shouldn’t have been problems. I decided to write the diamond square algorithm in c++ because I’m way more familiar with it than I am with ruby, and there were a few things I wanted to try and play around with when […]

CS 455 Lecture 13 – Spotlight and Beyond Color Textures

Before Class Spotlight Watch http://youtu.be/s7NbEbNJo28. Watch http://youtu.be/AA-HzRc3vyI. Watch http://youtu.be/4zAk0F0-4QA. Read chapter 3, section Simulating a Spotlight, pages 94-97. Beyond Color Textures Watch http://youtu.be/U7RdV4X_Ml4. Watch http://youtu.be/W3vkBV-NgL8. Watch http://youtu.be/K76qRuyPUiI. Watch http://youtu.be/C3hVk47G5V4. Read chapter 4, sections Applying Multiple Textures and Using Alpha Maps, pages 111-116.  In Class Write a renderer that casts a spotlight on a scene, but instead of illuminating the objects, it […]

Feature 5 Post Mortem

I had some trouble at first getting feature 5 to work. Getting the WASD movement keys to work was as simple as setting the keys to different values from keys.h, as shown below. It also shows where I set the elevation of the camera equal to the terrain height.   I also just used the […]

1 9 10 11 12 13 16