DOC PREVIEW
GT LCC 6310 - Lecture Notes

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

LCC 6310 Computation as an Expressive MediumOverviewSyllabusBackgroundSome of my workSome directionsIntroduce yourselvesProgramming languagesA simple Java program“Human readable” is relativeJava VM assembly codeObject Oriented vs. Procedural LanguagesA couple of Java’s relativesJavaThe virtual machineBut we’re using ProcessingDrawing in ProcessingLet’s draw a point: point()Drawing several pointsCommentsDrawing shapes: some primitivesControlling color and linePlaying aroundSaving your workLCC 6310Computation as an Expressive MediumLCC 6310Computation as an Expressive MediumLecture 1Lecture 1OverviewOverview•Go over the syllabusGo over the syllabus•Brief introduction to me and my workBrief introduction to me and my work•Art, programming and JavaArt, programming and JavaSyllabusSyllabusBackgroundBackground•Ph.D. in Computer SciencePh.D. in Computer Science•Expressive AI: Artificial Intelligence-based art and entertainment•Worked in industrial research labs (Intel, Tektronix) Worked in industrial research labs (Intel, Tektronix) doing HCI researchdoing HCI research•Expressive AI: AI-based art and entertainmentExpressive AI: AI-based art and entertainmentSome of my workSome of my workTerminal Time – interactive video FaçadeFaçade – interactive drama – interactive dramaOffice Plant #1 – robotic sculptureSome directionsSome directions•I’m someone to chat with about…I’m someone to chat with about…•Interactive story (particularly procedural approaches)•Robotic sculpture •Video games (design, technology and culture)•Director of the Experimental Game Lab•Procedurally generative artIntroduce yourselves Introduce yourselvesProgramming languagesProgramming languages•Abstract, “human understandable” language for telling Abstract, “human understandable” language for telling computer what to docomputer what to do•The abstract language must be translated into the low The abstract language must be translated into the low level language understood by the machinelevel language understood by the machine•This translation is accomplished by an interpreter or This translation is accomplished by an interpreter or compilercompiler•We will be learning the compiled language JavaWe will be learning the compiled language JavaA simple Java programA simple Java programfor (int i = 0; i < 10; i++) { println(i);} Just prints the numbers 0 to 9 on the screenHuman readable?!?“Human readable” is relative“Human readable” is relativeJava compiler translates this into…for (int i = 0; i < 10; i++) { println(i);}Java VM assembly codeJava VM assembly codepublic static void main(java.lang.String[]); Code: 0: iconst_0 1: istore_1 2: goto 30 5: getstatic 8: new 11: dup 12: ldc 14: invokespecial #23 17: iload_1 18: invokevirtual #27 21: invokevirtual #31 24: invokevirtual #34 27: iinc 1, 1 30: iload_1 31: bipush 10 33: if_icmplt 5 36: returntest.PrintLoop(); Code: 0: aload_0 1: invokespecial #43; 4: returnObject Oriented vs. Procedural LanguagesObject Oriented vs. Procedural LanguagesProcedural (e.g. C)Procedural (e.g. C)•We create some data representing an image (array of pixels to draw on the screen)•We write a procedure than can be passed the image and will draw itObject Oriented (e.g. Java)Object Oriented (e.g. Java)•We create a class that contains an image AND a routine draw it•The data and the behavior (ability to draw) are in one "container"A couple of Java’s relativesA couple of Java’s relatives•Smalltalk 80Smalltalk 80•Alan Kay and the Dynabook (PARC)•C++C++•Managing big C programs: Bjarne StroustrupJavaJava•Designers started with C++Designers started with C++•Smaller•Simpler•Safer•Programming embedded systemsProgramming embedded systems•Toasters, microwave ovens, TV set top boxes•Reliability very important--avoid costly recalls•Web programmingWeb programming•Incorporated into web browsers at critical momentThe virtual machineThe virtual machine•Since Java was designed to run on embedded Since Java was designed to run on embedded systems, it was designed around a systems, it was designed around a virtual virtual machinemachine•“Write once, run everywhere”x86WindowsOS XG3/4/5ProcessorPhone OSJava VMJava VMJava VMJava VM“Java OS”PC Mac Cell PhoneJava MachineBut we’re using ProcessingBut we’re using Processing•Processing is built on top of JavaProcessing is built on top of Java•Supports script-like codingSupports script-like coding•Easy to get simple programs up fast•But allows transition to full Java programming•Has built-in methods and classes to make drawing Has built-in methods and classes to make drawing easyeasy•Easy to export program to appletEasy to export program to appletDrawing in ProcessingDrawing in Processing•Automatic creation of display windowAutomatic creation of display window•Window has a coordinate system for drawingWindow has a coordinate system for drawingxy0 50100050100Let’s draw a point: point()Let’s draw a point: point()•point(x, y) – draws a point at the location x, ypoint(x, y) – draws a point at the location x, y•Let’s try it: point(50, 50)Let’s try it: point(50, 50)Unexpected token: null – what the #@#$ !?!Unexpected token: null – what the #@#$ !?!•Compiler errors appear in the bottom paneCompiler errors appear in the bottom paneAll lines must be terminated with a semicolon ;All lines must be terminated with a semicolon ;Drawing several pointsDrawing several pointspoint(30, 20); point(30, 20); point(85, 20); point(85, 20); point(85, 75); point(85, 75); point(30, 75); point(30, 75);CommentsComments•Comments are non-program text you put in the file to describe to Comments are non-program text you put in the file to describe to others (and yourself) what you’re doingothers (and yourself) what you’re doing•Important for being able to look back at your code and understand Important for being able to look back at your code and understand itit•Single-line comments begin with Single-line comments begin with ////•Multi-line comments begin with Multi-line comments begin with /*/* and end with and end with */*/Commenting and uncommenting lines useful for figuring Commenting and uncommenting lines useful for figuring out code out codeDrawing shapes: some primitivesDrawing shapes: some primitives•line(x, y)line(x, y)•triangle(x1, y1, x2, y2,


View Full Document

GT LCC 6310 - Lecture Notes

Documents in this Course
Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?