teaching machines

CS 330 Lecture 13 – Data Structures in C, Make

Agenda what ?s riddle variable-length arrays distinct ideas: memory is addressable heap memory can be allocated dynamically generating stereo tones pointer arithmetic a stack data structure without classes typedef separate compilation and header files a postfix calculator managing separate compile with make Variable-length Arrays The C99 standard allows arrays whose sizes are only known at […]

CS 455 Lecture 9 – Trackball Interface and Lighting++

Before Class Trackball Interface Watch http://youtu.be/CT1WO7gTls4. Read http://www.opengl.org/wiki/Trackball. Lighting++ Browse https://www.google.com/search?q=cel+shading+opengl&tbm=isch. Watch http://youtu.be/urgJXkjyVIU. Read pages 50-54 and 97-100 in your book. In Class Implement per-fragment toon shading using a positional light source. Use the right-mouse button to place the light source on a virtual sphere centered over your viewport. If you have time, use the left-mouse button to apply trackball […]

CS 330 Lecture 12 – Malloc, Classless Data Structures, and Make

Agenda what ?s what does this do? two primary reasons for heap storage: functions can return data cheaply memory needs not always known at compile time an EZMALLOC macro aplay -c 2 -f S16_LE -r 22050 file pointer arithmetic fopen, fwrite, fclose a stack API the need for separate compilation and header files makefiles What […]

CS 455 Project

See the PDF.

CS 330 Lecture 11 – Call by *, Addresses, Malloc

Agenda what ?s call by value call by reference dereferencing: turning an address into a value what pointers support cheap sharing multiple “return” values functions returning data: make_path the heap aplay -c 2 -f S16_LE -r 22050 pointer arithmetic malloc and free TODO Optionally, for the curious: http://cm.bell-labs.com/cm/cs/who/dmr/chist.html. Read sections 3.7 and 3.8. Quarter sheet. Code […]

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 […]

Disabling Touch and Stylus Button on Wacom Tablet in Linux

I’ve got a Wacom Bamboo tablet that I use for drawing during recorded lectures. The stylus works great, but the tablet also responds to my fingers. Touch events were firing at all the wrong times, so I disabled them. The xsetwacom utility came to the rescue: When I plug the tablet in, each input mechanism […]

1 2 3