se 313 – computer graphics and visual programming
DESCRIPTION
SE 313 – Computer Graphics and Visual Programming. Lecture 1: Introduction Lecturer: Gazihan Alankuş. Please look at the last three slides for assignments (marked with TODO ). Briefly. A coding-heavy class with some simple math You should be comfortable with programming - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/1.jpg)
1
SE 313 – Computer Graphics and Visual Programming
Lecture 1: IntroductionLecturer: Gazihan Alankuş
Please look at the last three slides for assignments (marked with TODO)
16.02.2012
![Page 2: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/2.jpg)
2
Briefly
• A coding-heavy class with some simple math– You should be comfortable with programming
• 8 labs in which you code in class and get graded
• Preparatory homeworks before each lab• Term project
16.02.2012
![Page 3: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/3.jpg)
3
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 4: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/4.jpg)
4
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 5: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/5.jpg)
5
Instructor
• Dr. Gazihan Alankuş• METU, BS 2002, MS 2005• WUSTL, PhD 2011• Currently a Lecturer (no office…)• Background– Some industry experience (including Google)– Some computer graphics research in the past– Now I get to teach computer graphics– reasonable > idealistic
• Please use [email protected] for class-related e-mail exchange16.02.2012
![Page 6: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/6.jpg)
6
Can you understand me?
• English language is just a tool, not a goal. – The goal is to communicate and learn.
• Stop me when you don’t understand something.
• In general, be active in class.
16.02.2012
![Page 7: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/7.jpg)
7
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 8: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/8.jpg)
8
Logistics• Website
– http://www.cse.wustl.edu/~gazihan/teaching/12spring/se313/
– Reach from my homepage (Google me if you must)• Slides and extra material
• Google group– http://groups.google.com/group/ieu-se313-graphics-spring-2012
– I will send announcements using the Google group
16.02.2012
![Page 9: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/9.jpg)
9
Logistics• Grades– Attendance (except today)– Labs / homeworks– Project– Midterm– Final
16.02.2012
![Page 10: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/10.jpg)
10
Labs• A week before the lab– We will learn the topic in classroom– Homework• The lab will be much simpler if you do it• Graded at the beginning of the lab
• Lab will be in the classroom– Last two hours of class– You will use your own laptops– I will supply boilerplate code• You will add code about the main topic
16.02.2012
![Page 11: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/11.jpg)
11
Projects
• Programming project related to computer graphics– You choose the topic
• I will supply suggestions that you can choose from• You can merge this with projects from other classes
– Group of at most three• Expectation will be proportional with group size• Everybody contributes
– You can use other people’s code (samples, libraries, etc.), but you have to clearly indicate it. I will not tolerate cheating.
16.02.2012
![Page 12: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/12.jpg)
12
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 13: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/13.jpg)
13
Let’s get to know you
• Introduce in detail, from where, etc.• Registered? Why?• What do you expect– from this class?– to see happen by the end of semester?
• Programmer?– C/C++? IDEs? Debugging? Open source? SE116?
• What do you know about computer graphics?
16.02.2012
![Page 14: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/14.jpg)
14
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 15: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/15.jpg)
15
Class
• What is computer graphics?– Let’s watch some videos
16.02.2012
![Page 16: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/16.jpg)
16
Computer Graphics and Visual Programming
• What it is– Theoretical basis of 3D graphics– Coding them with OpenGL• Real-time rendering using the GPU
• What it is not – Creating user interfaces with buttons, etc. • Take SE 204 Human-Computer Interaction for that
16.02.2012
![Page 17: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/17.jpg)
17
Graphics vs. Vision
• Computer Vision – images -> computer
• Computer Graphics – computer -> images
16.02.2012
![Page 18: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/18.jpg)
18
Computer Graphics
• Using computers to store and generate images of virtual scenes
• There are different ways– We will be focusing on using GPUs to render in
real-time (using OpenGL)– We will also talk about the theory behind it
16.02.2012
![Page 19: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/19.jpg)
19
How Do Computers Create and Display Images?
• Store abstract representation of a scene• Perform the necessary projection for the
output device (2D image, 3D hologram)• Use the output device (monitor) to display it
to the user
16.02.2012
![Page 20: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/20.jpg)
20
Computer Monitors
16.02.2012
![Page 21: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/21.jpg)
21
Computer Monitors
16.02.2012
![Page 22: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/22.jpg)
2216.02.2012
![Page 23: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/23.jpg)
23
Today We Have Better Displays
• Active matrix systems (LCD, Plasma, LED, etc)• 3D displays (with or without glasses)
16.02.2012
![Page 24: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/24.jpg)
2416.02.2012
![Page 25: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/25.jpg)
2516.02.2012
![Page 26: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/26.jpg)
2616.02.2012
![Page 27: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/27.jpg)
27
They All Display Pixels
• The images are stored and displayed as a matrix of colored points
16.02.2012
Mixture of red, green and blue
[adobe.com]
![Page 28: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/28.jpg)
28
The Goal is to Fill the Pixels
• Various mathematical techniques to convert your data to pixel output
• Good news: OpenGL does this for us using our GPUs in real-time. – We will learn how to use OpenGL
16.02.2012
![Page 29: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/29.jpg)
29
Class• Learning about computer graphics techniques and applying
them in programs using OpenGL• This is my second time teaching this class, this is an improved
version• Syllabus will be updated soon:
– http://ects.ieu.edu.tr/syllabus.php?section=ce.cs.ieu.edu.tr&course_code=SE%20313&cer=0
– Book is accurate. • Get the book!• Reading assignments
16.02.2012
![Page 30: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/30.jpg)
30
Questions?
2/10/2012
![Page 31: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/31.jpg)
31
Outline
• Me• Logistics of class• You• Class• HOMEWORK 1!!!
16.02.2012
![Page 32: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/32.jpg)
32
TODO: Google Group
• Do either one of these:– Go to http://
groups.google.com/group/ieu-se313-graphics-spring-2012 and apply for a membership.
– Or, send an e-mail to [email protected] and I will invite your e-mail to the Google group. You will have to accept the invitation.
• I will use this for class announcements• You can also send questions, comments, helpful
tips, or announcements to it but I will moderate your e-mails.
16.02.2012
![Page 33: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/33.jpg)
33
TODO: Homework 1 (bonus)• Download and install GLUT on your laptop
– Windows: http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip – Linux: install freeglut-dev using your package manager
• Try to compile this sample GLUT program: – http://www.cse.wustl.edu/~gazihan/teaching/12spring/se313/material/week1/gluttemplate.c– Compiling and linking
• In Linux it should be easy, glut includes and libs will be in the right places• In Windows, you need to do either one of these:
– Point your compiler’s include and library directories to the glut installation– Find where gl.h is in your system and copy glut files to appropriate locations. Below are examples from my system:
» glut.h to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\gl or C:\MinGW\include\gl (for VC or mingw)
» glut32.lib to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib or C:\MinGW\lib• In compilers other than Visual Studio, you need to tell the linker to link against glut, glu and gl libraries (or
glut32, glu32 and gl32).– Example for linux: gcc -Wall -o testprog testprog.c -lglut -lGLU
– Running• Linux should be fine. May need to do the following:
– LIBGL_ALWAYS_INDIRECT=1 ./program• In Windows, the program needs to find glut32.dll. Either put it next to the exe, or to the windows system
folder. C:\Windows\system in 64 bit machinez. May need to be C:\Windows\system32 in 32 bit– Last semester’s class website has useful links, too:
http://www.cse.wustl.edu/~gazihan/teaching/11fall/se313/16.02.2012
![Page 34: SE 313 – Computer Graphics and Visual Programming](https://reader036.vdocuments.site/reader036/viewer/2022063015/56815f79550346895dce8351/html5/thumbnails/34.jpg)
34
TODO: Reading
• Read Chapter 3 from your book. • Quickly skim Chapter 4 from your book.
16.02.2012