LCC 6310 The Computer as an Expressive Medium. Lecture 1

Similar documents
An Introduction to Multicodes. Ben Stephenson Department of Computer Science University of Western Ontario

GRAPHICS & INTERACTIVE PROGRAMMING. Lecture 1 Introduction to Processing

Introduction Basic elements of Java

The Processing language. Arduino and Processing.

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Improving Java Performance

What is a programming language?

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Compiler construction 2009

BASICS.

1 Getting started with Processing

02 B The Java Virtual Machine

Computer Principles and Components 1

HTML/CSS Lesson Plans

1 Getting started with Processing

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

Compiler construction 2009

CISC 1600 Lecture 3.1 Introduction to Processing

THE JAVASCRIPT ARTIST 15/10/2016

Improving Java Code Performance. Make your Java/Dalvik VM happier

An Introduction to Processing

Introduction to Computation and Problem Solving

CS 134 Programming Exercise 3:

Scientific Computing

CS2110 Fall 2011 Lecture 25. Under the Hood: The Java Virtual Machine, Part II

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

CISC 124: Introduction To Computing Science II

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

Accessible Documents & Presentations. By Amy Maes, DNOM

TTh 9.25 AM AM Strain 322

: Distributed Systems Principles and Paradigms Assignment 1 Multithreaded Dictionary Server

Lecture B3 Style : Algorithmic Thinking. Computing and Art : Nature, Power, and Limits CC 3.12: Fall 2007

CS Problem Solving and Object-Oriented Programming

Chapter 11 Program Development and Programming Languages

CSC116: Introduction to Computing - Java

Interaction Design A.A. 2017/2018

Under the Hood: The Java Virtual Machine. Lecture 23 CS2110 Fall 2008

Processing & Arduino in Tandem. Creating Your Own Digital Art Tools

EXAMINATIONS 2014 TRIMESTER 1 SWEN 430. Compiler Engineering. This examination will be marked out of 180 marks.

AP Computer Science A: Java Programming

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

CSC116: Introduction to Computing - Java

We will start our journey into Processing with creating static images using commands available in Processing:

SOFTWARE ARCHITECTURE 7. JAVA VIRTUAL MACHINE

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

CS 051 Homework Laboratory #2

From High Level to Machine Code. Compilation Overview. Computer Programs

Administration Computers Software Algorithms Programming Languages

CMSC 150 LECTURE 1 INTRODUCTION TO COURSE COMPUTER SCIENCE HELLO WORLD

CS 142 Style Guide Grading and Details

Plan for Today. Safe Programming Languages. What is a secure programming language?

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

Chapter 5. A Closer Look at Instruction Set Architectures

Intensive Introduction to Computer Science. Course Overview Programming in Scratch

Object Oriented Programming

Code Profiling. CSE260, Computer Science B: Honors Stony Brook University

ELEC 377 Operating Systems. Week 1 Class 2

Practical VM exploiting based on CACAO

University of Cincinnati. P5.JS: Getting Started. p5.js

COMP-202: Foundations of Programming. Lecture 26: Image Manipulation; Wrap-Up Jackie Cheung, Winter 2015

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered.

What can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work.

Information Systems Software

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Late Penalty: Late assignments will not be accepted.

Class Meeting 05 (Lecture 04) Objectives for this class meeting. Conduct vote on basic style of game for class project

All textures produced with Texture Maker. Not Applicable. Beginner.

Announcements. 1. Forms to return today after class:

Introduction to Computers and Java

Space Exploration EECS /25

Software Development. Integrated Software Environment

Just In Time Compilation

If you click the links in this document or on the class website and get a logon screen:

There are four (4) skills every Drupal editor needs to master:

Under the Hood: The Java Virtual Machine. Problem: Too Many Platforms! Compiling for Different Platforms. Compiling for Different Platforms

Class #1. introduction, functions, variables, conditionals

CSC 101: Lab #8 Digital Video Lab due date: 5:00pm, day after lab session

CMPSC 111 Introduction to Computer Science I Fall 2016 Lab 2 Assigned: September 7, 2016 Due: Wednesday, September 14, 2016 by 2:30 pm

CS 315 Software Design Homework 1 First Sip of Java Due: Sept. 10, 11:30 PM

Scratch Lesson 2: Movies Made From Scratch Lesson Framework

1B1a Programming I Getting Started

Design Programming DECO2011

Creating Vector Shapes Week 2 Assignment 1. Illustrator Defaults

Practice Written Examination, Fall 2016 Roger B. Dannenberg, instructor

Adding content to your Blackboard 9.1 class

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING

Topics. Structured Computer Organization. Assembly language. IJVM instruction set. Mic-1 simulator programming

CS187 - Science Gateway Seminar for CS and Math

Running class Timing on Java HotSpot VM, 1

INTRODUCTION TO COMPUTER CONCEPTS CSIT 100 LAB: MICROSOFT POWERPOINT (Part 2)

FrontPage Student IT Essentials. October 2005 This leaflet is available in other formats on request. Saving your work

Scripting Tutorial - Lesson 11: Advanced: Introducing Classes

Java Programming. Zheng-Liang Lu. Java 301 Summer Department of Computer Science & Information Engineering National Taiwan University

The way I feel about music is that there is no right and wrong. Only true and false. Fiona Apple. true false false

Introduction: From Nand to Tetris

JVML Instruction Set. How to get more than 256 local variables! Method Calls. Example. Method Calls

Digital Signage Content Creation Guidelines

Advanced Programming Concepts. CIS 15 : Spring 2007

COMP1007 Principles of Programming

Transcription:

LCC 6310 The Computer as an Expressive Medium Lecture 1

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

Signup sheet Syllabus 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 Books http://lcc.gatech.edu/~bmagerko6/classes/lcc6310/ Required Optional / recommended

Background

Some of my past work

ida percepts ai actors user actions player direction story content haunt 2 director author

ida percepts ai actors user actions player direction story content haunt 2 director author

Scribe

digital improv studio

explicit content s.c.r.u.b. score pause button play vs. watch malleable GUI

I m someone to chat with about Interactive Narrative Artificial Intelligence Improvisation Cognitive Science Game Design Board Games Some directions

Introduce 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 Human readable?!? for (int i = 0; i < 10; i++) { println(i); } 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: return

Programming 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 other

Smalltalk C++ A couple of Java s relatives 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 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 programs

Java 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 moment

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

But 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 applet

The Processing environment Menu Toolbar (run, stop, new, open, save, export) Tabs Text editor (this is where you type code) Message area (feedback, errors) Text output (print commands)

Drawing in Processing Automatic creation of display window Window has a coordinate system for drawing 0 50 100 0 50 100 x y

Let'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 ;

point(30, 20); point(85, 20); point(85, 75); point(30, 75); Drawing several points

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 code

Drawing 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_RADIUS

Controlling 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, B) set the colors of the outline (default black) nostroke() no outline drawing around shapes fill(r, G, B) set the fill color for shapes (default white) nofill() don t fill the shapes (background shows through) strokeweight(w) line width for outlines (default 1)

Playing around To learn how to program it is necessary to play around with code!!! Don t just wait for me to show you things Processing makes this easy Use the Reference in the Help menu (local version of website reference) Play with the examples

Saving your work You should install Processing on your own machine Do this for Thursday! If you use 'save' and not 'save as' Processing will save your project in a default directory If you do this, remember to copy your code to your local disk Don't depend on your project remaining undisturbed on lab machines

Things to do for Thursday Readings Three students: present one reading each Everyone else: prepare one discussion question for each reading From Software: Exhibition at the Jewish Museum (NMR p.247) Four Selections by Experiments in Art and Technology (NMR p.210) Concepts, Notations, Software, Art (Linked from course website) Processing Download and install on your own laptops or home machines http://www.processing.org Programming concepts this week: Processing, pp. 58-75, 109, 340-349 Processing, pp. 85-88, 482-486, 564-570, 603-605 Or you can start reading the Reas & Fry book