CS 455 Lecture 14 – Mipmapping and UV Mapping
Before Class Mipmapping Watch http://youtu.be/ZyH–0fh2hM. Watch http://youtu.be/NTy0uKlYpJQ. Watch http://youtu.be/NAcwJOvkx4M. Contrast http://www.twodee.org/forothers/check_linear.png, http://www.twodee.org/forothers/check_nearest.png, and http://www.twodee.org/forothers/check_mipmap.png. Read https://developer.valvesoftware.com/wiki/MIP_Mapping. Skim what NVIDIA has to say about mipmapping: ftp://download.nvidia.com/developer/presentations/2005/Misc/Lets_Get_Small-2005.pdf. The first third, ending at the talk of caching, is most relevant. UV Mapping Watch http://youtu.be/w7G1S2jGLu8. Watch http://youtu.be/6yfFelpqBdo. Read http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_Basics. In Class We haven’t talked much about Blender, so call upon me or Google if you’re not sure how to […]
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 […]
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 […]
CS 330 Lecture 18 – A Logo REPL
Agenda what ?s why write our own languages? program this building an interpreter… …with a REPL TODO Nada. Though you wish to write more exam questions and post them in the comments. The more questions you come up with, the fewer I’ll come up with. Program This Code Logo.g4 makefile Note to copy and pasters: […]
CS 330 Lecture 17 – Callbacks and Parsing with ANTLR
Agenda one more thing on C function pointers: callbacks http://www.opengl.org/resources/libraries/glut/spec3/node46.html http://www.opengl.org/resources/libraries/glut/spec3/node54.html#SECTION00089000000000000000 program this the translation process: lexing, parsing, generating ANTLR v4 why write our own languages and parsers? TODO Read chapter 2 through section 2.1. Walk through http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4. Quarter sheet. Program This Code torus.c Divs.g4 messy.txt PrettyPrinter.java Haiku
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, […]