teaching machines

CS 455 Lecture 12 – Specular and Texture

Before Class Texture Watch http://youtu.be/xvML4htJAVU. Read chapter 4, sections Introduction through Applying a 2-D Texture, pages 105-110. Specular Watch http://youtu.be/EM4x35haH7c. Read chapter 2, section Implementing Per-Vertex ADS Shading, pages 55-62. Read chapter 3, sections Using Per-fragment Shading… through Using the Halfway Vector…, pages 88-93. In Class Augment your maze renderer from last class with a shiny texture: […]

CS 330 Lecture 16 – Polymorphism in C, Higher-order Functions

Agenda what ?s answer this! polymorphism in C through unions higher-order functions in C TODO Rest. Answer This! Code makefile Note to copy and pasters: makefile rules need to be indented with real tabs, not spaces. stack.h stack.c names.c sorters.c Haiku

Restoring the Last Known Cursor Position in Vim

In unconfigured Vim, the cursor is placed at the beginning of each file that I open. When I close a file in Vim and open it again later, it’d be really nice if the cursor would automatically move to where I left off editing. And it can, with this handy autocommand: Autocommands let you write […]

Swapping first_second to second_first in Vim

When I write C code, I never know how to name functions. In an object-oriented language, my methods are verbs: add, insert, get, swashbuckle, and so on. The subject or indirect object of these verbs is an instance of the containing class, making my code read like English sentences: vector.add, list.insert, image.get, swashbuckler.swashbuckle. In C, […]

CS 455 Lecture 11 – Perspective and Camera

Before Class Perspective Watch http://youtu.be/k3dhGlAx_DA. For another perspective, read http://www.songho.ca/opengl/gl_projectionmatrix.html. Camera Watch http://youtu.be/-c62eQ_QpBE. For a similar implementation, read http://ogldev.atspace.co.uk/www/tutorial13/tutorial13.html. In Class It’s time to test out that perspective projection with long corridors. Your task in this class is to code up a maze traverser. Grab the maze.obj file in W455. The entrance to the maze starts roughly at (0, […]

Feature 2 Post Mortem

Generating terrain from a height map was not necessarily a very difficult task, but of course, I managed to make it difficult anyway. Honestly, the craziest part for me was simply figuring out how to actually access the pixel color values of an image. I scoured the web for simple ways to read in a .png file […]

CS 330 Lecture 15 – Makefiles, For Real

Agenda what ?s the need for separate compilation the way to manage separate compilation: make polymorphism in C: unions TODO Write a midterm exam question on something you read or something discussed in lecture. Turn it in on a quarter sheet. Some portion of the upcoming midterm will be comprised of your questions. In addition […]

CS 455 Lecture 10 – Terrain and the Diamond Square Algorithm

Before Class Terrain and the Diamond Square Algorithm Watch http://youtu.be/WqnEnkx_svM. Read http://www.gameprogrammer.com/fractal.html. In Class It’s a work day.

CS 330 Lecture 14 – Postfix Calculator and Make

Agenda what ?s hw2 grading script ready and untested program this! making stack reusable managing compilation with make TODO Read section 8.3 in your book. Quarter sheet. On the valgrind logo: http://valgrind.org/gallery/artwork.html. Program This Code strappend.c stack.c stack.h stack_user.c Haiku

Accessing the W Drive on Linux

The university kindly provides central storage to students, faculty, and staff. We can access this storage on Windows, Mac, Linux, and through a browser. On Linux, however, we end up running into some annoyances when we work with files on the W drive. (Our H drive is easy to access; it becomes our home directory, […]

1 2 3