CS 455 Lecture 8 – Generating normals, depth testing, and aspect ratios
Before class Generating Normals Watch http://youtu.be/pVt2RUjjgVE. For another perspective, read http://www.emeyex.com/site/tuts/VertexNormals.pdf. Depth testing and aspect ratios Watch http://youtu.be/lQKjWjKGAc0. Read more about hidden surface removal solutions at http://www.cs.sun.ac.za/~lvzijl/courses/rw778/grafika/OpenGLtuts/Big/graphicsnotes009.html. Relish in the z-buffer’s simplicity. In class First, get depth testing and aspect ratio handling in your previous renderer. Next, use W455/sphere.obj to create a satellite/moon orbiting around a planet.
CS 330 Lecture 10 – Enums, Structs, Call by *
Agenda C string functions strcpy strcat strlen strchr strcmp strfry Java enums encapsulation of data (only) via C structs declarations vs. definitions call by value addresses vs. values TODO Read section 7.7 in your book. Quarter sheet. Watch Pointer Fun with Binky. Code cards.c Rank.java BlackJack.java HomecookedEnumRank.java Direction.java Go.java path.c bookmarks.c Haiku
CS 455 Lecture 7 – Diffuse Lighting and Rotational Power
Before Class Dot Product and Diffuse Watch http://youtu.be/WUU_l1IX2As. Watch http://youtu.be/MBSvCUWdOhU. For some other perspectives, read http://ogldev.atspace.co.uk/www/tutorial18/tutorial18.html (stopping at Code Walkthrough) and http://en.wikibooks.org/wiki/Cg_Programming/Unity/Diffuse_Reflection (stopping at Shader Code for One Directional Light Source). Accumulating Transformations and Rotation++ Watch http://youtu.be/tlLiJpL1BbE. Read http://www.sjbaker.org/steve/omniv/eulers_are_evil.html. In Class Implement a renderer that lets you spin a shaded cylinder (in cylinder.obj in W455). The cylinder is aligned with the Y axis and […]
CS 330 Lecture 9 – C as Assembly++
Agenda the good and the bad of assembly two purposes for high-level languages hello, C primitive types in C checking the assembly with objdump strings in C the separation of definitions from declarations enums in C enums in Java TODO If you want some refresher on types and C-style flow control, read the first two […]
CS 330 Lecture 8 – Flow Control and Functions
Agenda preserving registers before a function call looping through a number list a function to multiply as repeated addition local variables a progress “bar” TODO For your own sake, read chapter 4 of Programming from the Ground Up, stopping after the example. Read chapter 1 in your book, through section 1.5. Bring a quarter sheet […]
CS 330 Lecture 7 – Flow control
Agenda popping the ?stack stack restoration program this debugging with gdb quadrupling cmp and jmp a coin tosser a for loop TODO If you haven’t already done so, read pages 22-33 of Programming from the Ground Up, sections Finding a Maximum Value through the end of Chapter 3. Von Neumann Languages John Backus said: Von Neumann […]
CS 455 Lecture 6 – Matrix Implementation and Orthographic Transformations
Before Class Vector and Matrix Implementation Watch http://youtu.be/oanx1G_76JI. Bring these implementations to class on Thursday. Viewport and Orthogonal Projection Transformations Watch http://youtu.be/TlN4q3zt1tw. Bring the GetOrthographic method implementation to class on Thursday. In class Building on your work from Tuesday, incorporate your Matrix4 class to do the transformations. Add an orthographic projection to show the object space [-100, […]
CS 455 Lecture 5 – Vectors, Matrices, and Meshes
Before Class Meshes Watch http://youtu.be/EWtMydWVozQ. Watch an introduction to modeling: http://cgcookie.com/blender/2010/08/31/blender-intro-to-modeling. Vectors and Matrices Watch http://youtu.be/cMkKKDanIhw. Read http://www.gamedev.net/page/resources/_/technical/math-and-physics/vectors-and-matrices-a-primer-r1832, skipping the sections on determinants, inversion, and projection matrices for now. In class Create a renderer that lets you scale and or translate a tweaked OBJ model with a matrix. (I’ve placed a few models in the W455 directory.) Alter your […]
455 Programming for Mac Users
Hey there, If you’re on a Mac in CS 455, good for you. You’re spared much pain and hardship using VisualStudio. I kinda hate it. Thankfully, Xcode is your friend, and Apple is more than happy to have you come use it instead of Microsoft’s junk. You don’t need to be a paid developer for […]
Accessing thing-[012] from Mac OS X
Hey folks, I thought I’d follow up Dr. Johnson’s tutorial with my own, for Mac OS X users. I posted a brief (2 minute) video on YouTube of how to go about doing this. It’s super easy….and you won’t believe it’s not butter! Here’s the video! [youtube http://www.youtube.com/watch?v=7h29bKyPpr8?rel=0] Go get ’em