CS 330 Lecture 12 – Storing a Program
Agenda what ?s think about this storing program structures in Basecalc TODO Watch two videos on optimization from Stanford professor Alex Aiken: https://www.youtube.com/watch?v=_8PEtL9AYmQ and https://www.youtube.com/watch?v=yRfh7hUx26k. Feel free to watch at double speed. Share 3-4 questions or observations on a 1/4 sheet. Think About This Suppose we add a ternary operator to our Basecalc language. What happens when we […]
CS 455 Lecture 8 – Calculating Normals
Agenda what ?s finding Playdoh normals finding normals of a model Think About This Here’s what you know: The positions of five vertices. Connectivity information (e.g., vertices 0, 1, and 2 form a face). Vector operations: you can add 3D quantities, subtract them, take their dot product (which tells you the cosine of the angle […]
CS 330 Lecture 11 – Basecalc Interpreter Cont’d
Agenda what ?s defining an interpreter add callbacks to interpreter internode communication variables TODO See post Git Syncing + Permissions Issues on Thingies on Piazza to fix some problems you are likely to encounter. Get your homework (at least the first two problems) pushed to Bitbucket before Friday. If you can’t see your code on Bitbucket’s site, neither […]
CS 455 Lecture 7 – Diffuse and Ambient Lighting
Agenda what ?s diffuse lighting ambient lighting TODO Incorporate diffuse and ambient shading into the sphere renderer. Mix 90% of the diffuse color with 10% ambient. Cast a white light on an orange diffuse surface. Email me a screenshot of your lit sphere. Code … Haiku
CS 330 Lecture 10 – Basecalc Interpreter
Agenda what ?s whitespace expr productions parse trees a REPL an interpreter TODO Read up on the origin of a programming language of your choosing, and share some interesting factoids on a 1/4 sheet. Review Process of Interpretation Write your grammar in a *.g file. Run antlr on *.g file to produce the Java source […]
CS 330 Lecture 9 – A Calculator
Agenda what ?s a grammar lexing to get a token stream TODO 1/4 sheet: read chapter 1 in your book. Code Basecalc.g Haiku
CS 455 Lecture 6 – Matrices
Agenda what ?s dot product recasting rotation, scaling homogeneous coordinate recasting translation a Matrix4 class TODO Read about calculating normals and shading. I encourage you to read a few other sources as well. Bring a 1/4 sheet with 3-4 questions or observations. You are welcome to answer any these challenge questions: If a light is […]
CS 330 Lecture 8 – Regex Closeout
Agenda what ?s regex bingo a few more examples links between images double-spaces between sentences finding repeats ith field TODO Right now: You and a partner make a 4×4 grid of randomly generated strings. Include upper- and lowercase letters, numbers, whitespace, and punctuation. Keep the strings short. There’s no free space. Before Friday: Familiarize yourself […]
CS 455 Lecture 5 – Indexed Geometry and OBJ Models
Agenda what ?s filled geometry GL_TRIANGLES reading in an OBJ model TODO Before next class: Lab: tweak our model renderer to allow the user to toggle between a wireframe and filled display of our model. See glPolygonMode. Participation: Next lecture we’re going to build a Matrix class to help us represent our transformations. Before that, […]
CS 330 Lecture 7 – Regex Cont’d
Agenda what ?s what does this do? substitution capturing lookaround assertions TODO 1/4 sheet: Try your hand at Regex Golf. Report some of your regices and your score. What Does This Do? Code arithmetic.txt calc.rb music.rb Haiku