Elements of Graphics
Name: Kevin Song (he/him)
Email: kcsong@utexas.edu
Office Hours: After Class on M/W/F (tentative)
Undergrad: B.S. Chemical Sciences
Field | Project |
---|---|
Geospatial Imaging | Parallelization of Random Forests for Tree Carbon Estimation |
Consumer Medical | Machine learning-based pill identification algorithm |
Sociology | Simulation of collaboration and productivity in academia |
HPC Systems | Bitflip error tolerance in high-performance parallel computing |
Computational Bio | Flexible Protein Docking + Folding |
Medical Imaging | Virtual surgery and reconstruction of injured pediatric skulls |
Public Policy | Acceleration of agent-based simulation for COVID-19 |
Compiler Design | Reverse compilation of PTX for custom GPU architectures |
Chemistry | Optimal representations for polymer storage |
We'll focus on group exploration and discussion rather than lecture.
Typical Class (75 mins):
Collaboration is encouraged for these hands-on activities!
Hands-on activities will be due at 5pm. Graded on completion.
This class is going to go fast.
Term Type | In-Class Minutes | Calendar Duration |
---|---|---|
Long Semester | 2100 | 14 weeks |
Half-Summer | 1875 | 5 weeks |
During the review of the last class's material, I may, time permitting, review one student's hands-on activity from the previous class.
Three primary means of assessment in this class:
This class is primarily based around discussion, activities, and learning from each other.
Attendance measured by index card submission.
You are given four days of absence, no questions asked. For each additional day you are absent, your final grade is lowered by one letter.
Miss 8 days and you are guaranteed to fail the course.
Unless...
You can make up unexcused absences by writing an essay discussing an interesting topic covered in the class you missed.
Last three days of class cannot be excused either through grace or essay--you need to let me know if you can't make it to those.
Will be based on the contents of your daily index card submission.
Each index card will ask you for the following:
Reasonable answers will get credit.
I may also dock participation if you are excessively off-task or disruptive in class, but I hope to never do this.
Short assignments which you will have some time to do in class
Expected time: 20-40 mins per day
Due at 5:30pm after class (?)
Will be due based on material covered in class. Due dates on Canvas will reflect optimistic times, but if you miss class, check with Lectures Online (or ask on EdStem).
Please try to work on these during the dedicate in-class periods!
Extended take-home assignments which require some in-depth thinking.
Main class projects are solo. You may discuss ideas with each other, but you may not share code. Four of these projects.
Final project will have the option of being in groups and require a final presentation.
Incredibly complicated story, tied to the rise of capitalism and industrialism.
Before the 18th century, there were no standardized grading systems at all!
In 1785, the president of Yale divided students into four ranks:
Systems like this are still used today, see e.g. the British system:
The modern A-F system was first used at Mount Holyoke in 1897.
This class is heavily collaborative. This makes it easier to accidentally fall on the wrong side of the rules.
Put a comment that clearly specifies the following:
// This function from WiSaGaN on SO, used under
// CC-BY-SA-4.0 https://stackoverflow.com/a/11237235
int max1(int a, int b) {
if (a > b)
return a;
else
return b;
}
If you cheat on an assignment, the minimum consequences are:
Bard, GPT, and friends are amazing tools.
Are going to change the way we program computers.
Also come with hazards...
Fun fact: it took me an additional 10 or so messages to get GPT to correctly identify the months which were wrong.
...so do people.
You need to know enough about the subject to be able to correct the LLM when it goofs.
Alt interpretation: if all you can do is type questions into the LLM and echo its response, you're already obsolete.
You may use any LLM you would like for projects for this class, subject to the following rules:
My claim: the day that you no longer need to break down a problem with an LLM is the day this certificate becomes meaningless.
Need to practice breaking down problems and building solutions back up.
What is the general skeleton of a program that solves problem Q?
Please write a program that has features X, Y, and Z, is nicely commented, no more than 30 lines long, solves problem Q
How could you add feature X to this program?
How could you add feature Y to this program?
Yes. This policy is experimental.
Stick to rules 2 and 3 and I will forgive you if you occasionally cross the line on rule 1.
Please use text formats like txt/markdown when possible!
Additional details in syllabus
If a piece of code was not written by you (or your group), tell me where it came from.
CS labs have computers which can run these. If you want an account, see the syllabus.
There are other language interfaces to Processing, such as Processing.py (Python) and p5.js (JavaScript). Please do not use these for this class: it's a huge pain to have assignments turned in which use the wrong language.
For basic syntax questions ("what symbols do I need to write down for a for-loop/if-statement/function"), consider either Syntax Cheatsheets or asking an LLM.
Processing is designed to be easy to learn, even for someone who doesn't know how to program. You will not need to learn all of Java at once.
void setup(){
// This is a comment!
int win_edge = 600;
size(win_edge, win_edge);
}
void draw(){
ellipse(250,200,200,200);
rect(250, 200, 150, 100);
}
Important syntactic differences from Python:
void setup()
and void draw()
functions. Look on the Processing website to see some of the available callsprintln()
to print your variable to the console.setup()
and draw()
functions.Links in EdStem in-class chat.
// var-type name = value ;
int x = 7;
/*
return-type name(arg-type arg-name*){
}
*/
int addTwo(int x){
return x + 2;
}
void setup(){
size(600, 600);
}
void draw(){
ellipse(250,200,200,200);
rect(250, 200, 150, 100);
}
Code inside setup()
runs once
Code inside draw()
runs in a continuous loop
Combined, these act a little like main()
int x = 0;
void setup()
{
x = 2;
int y = 7;
}
void draw()
{
x++; // Okay, x is visible here
y += 2; // Not okay, y is out of scope
}
x
y
y
x
The same point can have different coordinates in different coordinate systems!
World Coordinate System
Camera Coordinate System
Object Coordinate System
You will sometimes hear these referred to as "spaces", e.g. "world space" or "screen space". You can think of "X space" as meaning "within the X coordinate system."
Like text!
Specify a pixel within the window
Define a line between \((x1,y1)\) and \((x2, y2)\)
triangle(x1,y1,x2,y2,x3,y3)
rect(a,b,c,d)
ellipse(a,b,c,d)
quad(x1,y1,x2,y2,x3,y3,x4,y4)
arc(a,b,c,d,start,stop)
bezier(x1,y1,x2,y2,x3,y3,x4,y4)
point
, line
, rect
, ellipse
, triangle
, and quad
methods at least two times eacharc
methodbezier
methodbezier
challenging to work directly with in code?/* Java lets you write block
comments like this */
We will usually do this towards the end of class.
Write the following information: