DOC PREVIEW
GT LCC 6310 - The Computer as an Expressive Medium

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 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 33 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 33 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 33 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 33 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 33 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 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

LCC 6310 The Computer as an Expressive Medium Lecture 1Overview Go over the syllabus Brief introduction to me and my work Art, programming and JavaSyllabus Signup sheet If you’re not listed, please add your name If you’re listed, please check off your name and update your information as needed, e.g. nickname, email, program (DM-MS, DM-PhD, etc.) Handout Online http://lcc.gatech.edu/~bmagerko6/classes/LCC6310/ Books Required Optional / recommendedBackgroundSome of my past work…percepts story content user actions player author director ida ai actors direction haunt 2percepts story content user actions player author director ida ai actors direction haunt 2Scribedigital improv studios.c.r.u.b. explicit content score pause button play vs. watch malleable GUISome directions I’m someone to chat with about… Interactive Narrative Artificial Intelligence Improvisation Cognitive Science Game Design Board GamesIntroduce yourselves Name & place of origin? Background, academic & other? Research & other interests? Programming experience? Something interesting about yourself?Programming languages An abstract "human understandable" language for telling the computer what to do The abstract language must be translated into the low level language understood by the machine This translation is accomplished by an interpreter or compiler We will be learning the compiled language Java Some definitions: A compiler is a program that processes statements written in a programming language and converts them into machine language, binary code, that a computer processor uses. E.g. Java, C, C++ An interpreter translates code one line at time, executing each line as it is translated. Generates binary code that is never compiled into one program entity, but interpreted every time the program executes. E.g. BASIC, JavaScript, Perl (can also be compiled)A simple Java program for (int i = 0; i < 10; i++) { println(i); } Human readable?!? Just prints the numbers 0 to 9 on the screen"Human readable" is relative for (int i = 0; i < 10; i++) { println(i); } Java compiler translates this into…Java VM assembly code public 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: return test.PrintLoop(); Code: 0: aload_0 1: invokespecial #43; 4: returnProgramming paradigms A programming paradigm is a style of programming, complete with concepts & common practices that determine how the programmer will structure the program and think about its execution Different programming languages advocate different programming paradigms Not necessarily a one-to-one mapping, since some programming languages can support multiple programming paradigms Some examples C - Procedural programming Java - Object-oriented programming C++ - Supports elements of both More about these paradigms…Object Oriented vs. Procedural Languages 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 that will draw it Encourages programmers to think in terms of data and the functions that can be used to manipulate the data 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" Encourages programmers to think of their programs as sets of interacting "objects" that can operate on each otherA couple of Java’s relatives Smalltalk Invented by Alan Kay and a group of researchers at Xerox PARC in the 1970s Designed for programming the Dynabook, a concept handheld computer that would enable learning, reading, and creative expression with different kinds of media (graphics, audio, etc) Centered on the concept of objects C++ Bjarne Stroustrup developed C++ in 1983 at Bell Labs as an enhancement to the C programming language Used object-oriented programming to ease the management of big C programsJava Developed at Sun Microsystems in the early 1990s Designers started with C++ Smaller Simpler Safer Programming embedded systems Toasters, microwave ovens, TV set top boxes Reliability very important--avoid costly recalls Web programming Incorporated into web browsers at critical momentThe virtual machine Since Java was designed to run on embedded systems, it was designed around a virtual machine "Write once, run everywhere" x86 Windows OS X G3/4/5 Processor Phone OS Java VM Java VM Java VM Java VM “Java OS” Java MachineBut we’re using Processing Processing is built on top of Java Supports 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 easy Easy to export program to appletThe Processing environment Menu Toolbar (run, stop, new, open, save, export) Tabs Text editor (this is where you type code) Text output (print commands) Message area (feedback, errors)Drawing in Processing Automatic creation of display window Window has a coordinate system for drawing x y 0 50 100 0 50 100Let's draw a point: point() point(x, y) – draws a point at the location x, y Let’s try it in Processing: point(50, 50) Unexpected token: null – what the #@#$ !?! Compiler errors appear in the bottom pane All lines must be terminated with a semicolon ;Drawing several points point(30, 20); point(85, 20); point(85, 75); point(30, 75);Comments Comments are non-program text you put in the file to describe to others (and yourself) what you’re doing Important for being able to look back at your code and understand it Single-line comments begin with // Multi-line comments begin with /* and end with */ Commenting and uncommenting lines useful for figuring out codeDrawing shapes: some primitives line(x1, y1, x2, y2) triangle(x1, y1, x2, y2, x3, y3) rect(x, y, width, height) rectMode() – CORNER, CENTER_DIAMETER, CORNERS elipse(x, y, width, height) ellipseMode() – CORNER, CENTER_DIAMETER, CORNERS, CENTER_RADIUSControlling color and line Colors represented as Red Green Blue (RGB) values Each one ranges from 0 to 255 Can also use Hue Saturation Value (HSV) space, but we won’t worry about this for now background(R, G, B) – set the background color stroke(R, G,


View Full Document

GT LCC 6310 - The Computer as an Expressive Medium

Documents in this Course
Load more
Download The Computer as an Expressive Medium
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 The Computer as an Expressive Medium 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 The Computer as an Expressive Medium 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?