Presentation is loading. Please wait.

Presentation is loading. Please wait.

LCC 6310 Computation as an Expressive Medium

Similar presentations


Presentation on theme: "LCC 6310 Computation as an Expressive Medium"— Presentation transcript:

1 LCC 6310 Computation as an Expressive Medium
Lecture 1

2 Overview Go over the syllabus Brief introduction to me and my work
Art, programming and Java

3 Syllabus

4 Background Ph.D. in Computer Science
Expressive AI: Artificial Intelligence-based art and entertainment Worked in industrial research labs (Intel, Tektronix) doing HCI research New at Georgia Tech – arrived in January

5 AI & Art The Senster, 1970 Black and White, 2000 Edward Ihnatowicz
Peter Molyneux (Lionhead)

6 Work Façade – interactive drama Terminal Time – interactive video
Illustrate these ideas by describing three AI-based artworks. I’ll talk briefly about Office Plant #1, and in more depth about Terminal Time and Façade. This talk is primarily structured as a computer science talk – if you are more interested in conceptual, aesthetic, or art theoretic issues, please ask at the end. Terminal Time – interactive video Office Plant #1 – robotic sculpture

7 Façade Dramatic world inhabited by computer controlled characters (believable agents) The user (player) plays a protagonist within the story, first-person point of view The player experiences a story with a dramatic arc Collaborator: Andrew Stern, independent artist and researcher

8 Terminal Time Collaborators:
Goal trees (ideology) Historical events Audience feedback Audio-visual elements Collaborators: Steffi Domike, Design Department, Chatham College Paul Vanouse, Art Department, SUNY Buffalo

9 Office Plant #1 Creates a background presence
Sorts incoming into social and emotional categories Behavior is a function of the received Switch to video at the end of this slide. Collaborator: Marc Bohlen, Media Studies, SUNY Buffalo

10 Combine AI research and art
Expressive AI Artistic practice AI research Wrestling with meaningful human experiences suggests new AI research directions… AI methods and technology suggest new audience experiences…

11 Some directions I’m someone to chat with about…
Interactive story (particularly procedural approaches) Robotic sculpture Video games as a cultural practice (design and technology) Meta-art (generative systems)

12 Introduce yourselves

13 Programming languages
Abstract, “human understandable” language for telling 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

14 A simple Java program Human readable?!? class PrintLoop {
public static void main(String[] args) { for (int i = 0; i < 10; i++) System.out.println("i = " + i); } Just prints the numbers 0 to 9 on the screen

15 “Human readable” is relative
class PrintLoop { public static void main(String[] args) { for (int i = 0; i < 10; i++) System.out.println("i = " + i); } Java compiler translates this into…

16 Java VM assembly code public static void main(java.lang.String[]);
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: return

17 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 will draw it 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"

18 A couple of Java’s relatives
Smalltalk 80 Alan Kay and the Dynabook (PARC) C++ Managing big C programs: Bjarne Stroustrup

19 Smalltalk 80 Alan Kay and the Dynabook (PARC)
Developed idea of a general purpose computer to be used by normal people! Highly interactive interface Included concept of windows! Smalltalk 80 – end users could create their own tools

20 Smalltalk 80 Includes objects Objects contain data and procedures
Procedures in objects are called methods All computing is done by sending a message to an object asking it to perform one of its method Objects are defined by classes

21 C++ Managing big C programs: Bjarne Stroustrup
Started as "C with Classes" idea borrowed from Simula 67 & Smalltalk Goals Organize programs as classes with inheritance No performance penalty compared to C Thus somewhat dangerous!!! C++ is converted into C

22 Java Designers started with C++ Programming embedded systems
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 moment

23 The virtual machine Since Java was designed to run on embedded systems, it was designed around a virtual machine “Write once, run everywhere” PC Mac Cell Phone Java VM Java VM Java VM Windows OS X Phone OS x86 G3/4/5 Processor Java Machine “Java OS” Java VM

24 Steps for running a Java program
“Source Code” HelloWorld.java Java compiler javac HelloWorld.java Generic “Byte Code” HelloWorld.class OS-specific JVM java HelloWorld Execute program OS-specific “Object Code”

25 Structure of Java programs
Create one or more Java source files Compile each source file into a class file An application consists of these class files (not a single file like a .exe) To run the program, send one of the class files to Java This entry file must have method called main public static void main(String[ ] argv)

26 Sample application File: HelloWorld.java public class HelloWorld {
public void greet() { System.out.println("Hello World!"); } public static void main(String argv[]) { HelloWorld hw = new HelloWorld(); hw.greet();

27 Java file and class names
Source code files must have the ".java" extension. The file name should match the class name. The class name should start with a capital letter. This naming convention is enforced by most reasonable compilers. A file containing class HelloWorld {…} must be named HelloWorld.java Compiled bytecode has the ".class" extension

28 Compiling HelloWorld HelloWorld.java HelloWorld.class javac
public class HelloWorld { public void greet() { System.out.println("Hello World!"); } public static void main(String argv[]){ HelloWorld hw = new HelloWorld(); hw.greet(); HelloWorld.class javac javac HelloWorld.java 0xCAFEBABE ... javac is the Java Compiler

29 Executing HelloWorld HelloWorld.class java HelloWorld java is the Java
0xCAFEBABE ... java HelloWorld java is the Java Virtual Machine C>java HelloWorld Hello World! C>

30 Object Oriented Programming
OOP is all about programming using something called an object. Objects are created from classes. An object is called an instance of a class. Objects do useful stuff by calling methods on them. Let’s look at classes and objects in more detail.

31 Previously... public class HelloWorld { public void greet() {
System.out.println("Hello World!"); } public static void main(String argv[]) { HelloWorld hw = new HelloWorld(); hw.greet();

32 A Class class Greeter { String greeting;
A class will be used to define how objects made from this class will operate class Greeter { String greeting; public Greeter(String newGreeting) { greeting = newGreeting; } public void greet(String name) { System.out.println(greeting + ", " + name);

33 Field class Greeter { String greeting;
A class typically will have one or more fields which are the data items which the object holds class Greeter { String greeting; public Greeter(String newGreeting) { greeting = newGreeting; } public void greet(String name) { System.out.println(greeting + ", " + name);

34 A Constructor class Greeter { String greeting;
Classes can have Constructors which contain code only run when an object is created. Useful for initialization class Greeter { String greeting; public Greeter(String newGreeting) { greeting = newGreeting; } public void greet(String name) { System.out.println(greeting + ", " + name);

35 A Method class Greeter { String greeting;
Once created an object can be asked to run a "method" which will do something normally involving data stored by the object (plus sometimes data passed in.) class Greeter { String greeting; public Greeter(String newGreeting) { greeting = newGreeting; } public void greet(String name) { System.out.println(greeting + ", " + name);

36 Another Class This class is just being used to hold
a main method. Here we make two Greeter objects and use them class Driver { public static void main(String args[]) { Greeter g1 = new Greeter("Hello"); Greeter g2; g2 = new Greeter("Good morning"); g1.greet("Bob"); g2.greet("Mary"); g1.greet("Sam"); g2.greet("Joan"); } C>java Driver Hello, Bob Good morning, Mary Hello, Sam Good morning, Joan C>

37 OOP OOP consists of designing a bunch of classes most of which are used as templates to make objects The objects are used to hold data They are initialized with constructors and perform useful functions by being asked to run their methods


Download ppt "LCC 6310 Computation as an Expressive Medium"

Similar presentations


Ads by Google