Here is a snippet of code from my P4 implementation. This takes an array of triangles and sorts them. Notice that for each triangle, I have already computed a “sum of the Z values” of its 3 vertices (this is the average, but not divided by 3). this.triangles.sort(function (a, b) { if (a.zsum > b.zsum) […]
News
We’re realizing a lot of people are having trouble with the programs. And even if you didn’t have problems with Program 3, maybe you can help us help others. While these programs are small, they do really require you to understand the concepts and to be able to translate the concepts into code. We try […]
For some reason, the tutorial on how TWGL (and GL) handle matrices didn’t get posted. (curiously no one noticed that the links to it were broken). https://pages.graphics.cs.wisc.edu/559-Old-Tutorials/matrices-and-gl/ is there. Sorry this wasn’t available last week.
We will hold extra office hours this week. Prof. Sifakis: Tuesday, September 29th, 2:30 (until at least 3 – or until everyone gets helped) Prof Gleicher: Tuesday, September 29th, 5:00 (until at least 5:30 – or until everyone gets helped)
This past week, we saw the basics of how to draw in 3D – the pipeline of steps that take our objects (triangles) to pixels on the screen. We focused on certain stages of the pipeline (Viewing, Projection, Visibility). In the coming week, we’ll see how that pipeline gets implemented. Your programming assignment has you […]
Is now posted. You can read about it here.
In the “Lecture Notes” section, I have uploaded not only my slides from class today, but also Prof. Sifakis’ notes from last year. There is also a link to my viewing demo.
Now that we have some experience using Canvas, we are realizing that we need to change the way we hand-in programs. There are some issues with how Canvas handles files. Please follow these instructions for ALL program handins (starting with P3). When you turn in a program, please turn in ONE file. This file should […]
I just did a sample solution for Programming Assignment 3. (I had tried it before, but used code from another project). The idea was to see what it was like to make the program from scratch, like you would have to. Using just twgl.m4. As simple as possible, and as fast as possible. (for me […]
This past week, we learned about transformations and hierarchical modeling. And you got to try out programming it in JavaScript. This coming week, we’ll start drawing in 3D. You probably saw a simple taste of it in the example, but you’ll see much more. For Reading 3 (due Monday, September 21), you’ll read about the […]