Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3, 2014 1.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Introduction to Programming
A Quick Introduction to Processing
Processing Lecture. 1 What is processing?
Emerging Platform#5: Processing 2 B. Ramamurthy 6/13/2014B. Ramamurthy, CS6511.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 1 Truth Table Lecture 03, file P1 Due January.
“Computers and Creativity”
Lesson One: The Beginning Chapter 2: Processing Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from built-in help reference.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.
IAT 800 Lab 1: Loops, Animation, and Simple User Interaction.
DSA Processing. Links Processing.org My Processing page Ben Fry Ben Fry’s Thesis on Computational Information DesignThesis Casey Reas siteCasey Reas Casey.
Lesson One: The Beginning
Roentgen photo effect. This detailed, thoroughly explained lesson will show you how to create very attractive roentgen photo effect. You can use this.
PROCESSING Animation. Objectives Be able to create Processing animations Be able to create interactive Processing programs.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Getting Started with Dreamweaver
Chapter 3 Working with Symbols and Interactivity.
Website design Feng Zhao College of Educatioin California State University, Northridge.
Review Blocks of code {.. A bunch of ‘statements’; } Structured programming Learning Processing: Slides by Don Smith 1.
Chapter 3 Dreamweaver: Part I The Web Warrior Guide to Web Design Technologies.
FUNDAMENTALS OF PROGRAMMING SM1204 SEMESTER A 2012.
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
CIS 205—Web Design & Development Flash Chapter 1 Getting Started with Adobe Flash CS3.
Lehigh University Introduction to Flash MX Sharmeen Mecklai.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
Working with Symbols and Interactivity
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Adobe Flash CS5 Introduction. What is Flash? Flash is a multimedia platform used to add animation, video, and interactivity to Web sites. It is often.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 INTRODUCTION TO ADOBE FLASH CS3.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
CIS 3.5 Lecture 2.2 More programming with "Processing"
1 Taif University Faculty Of Computers And Information Technology TA. Kholood Alharthi & TA. Maha Thafar First Semester AH.
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Processing Workshop. What is processing? “Processing is an open source programming language and environment for people who want to program images, animation,
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
Lesson Two: Everything You Need to Know
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Visual Perception CS4390/5390 Fall 2014 Shirley Moore, Instructor September 8,
Adobe Photoshop CS5 Chapter 1 Editing a Photo. Start Photoshop and customize the Photoshop workspace Open a photo Identify parts of the Photoshop workspace.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
B. RAMAMURTHY Processing and Programming cse
Welcome to Processing Who does not have access to digital camera?
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
ADOBE INDESIGN CS3 Chapter 9 WORKING WITH TABS AND TABLES.
Processing Variables. Variables Processing gives us several variables to play with These variables are always being updated and you can assume they have.
Introduction to Processing Dominique Thiebaut Dept. Computer Science Computer Science Dominique Thiebaut Thiebaut -- Computer Science.
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
Adobe ® Photoshop ® CS6 Chapter 1 Editing a Photo.
Variables. Something to mention… void setup(){ size(200, 200); background(255); smooth(); } void draw() { stroke(0); strokeWeight(abs(mouseX-pmouseX));
Introduction to Processing David Meredith Aalborg University Art &Technology, 3rd Semester Programming.
Getting Started with Dreamweaver
David Meredith Aalborg University
Emerging Platform#1: Processing 3
Chapter 15, Images …a few points
Mouse Inputs in Processing
More programming with "Processing"
Introduction to Problem Solving & Programming using Processing 2
Getting Started with Dreamweaver
Lecture 7: Introduction to Processing
Chapter 15, Images …a few points
Introduction to Problem Solving & Programming using Processing 2
Introduction to Problem Solving & Programming using Processing 2
Presentation transcript:

Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,

Visualization Critique Discuss your critique of a visualization from the Hans Rosling video in small groups. Elect a group member to share a summary of your discussion with the class. 2

Processing Open source software available athttp://processing.org/ Design and prototyping tool for graphics and complex data visualization Library and program development environment (PDE) – Library can be used with a Java development environment without the Processing PDE Many third-party libraries available Information about all Processing functions available in Processing Reference (online and part of Help, can also right-click any function name) Example programs included with the Processing PDE 3

Sketching with Processing A Processing program is called a sketch. – A sketch comprises one or more tabs, each containing code. Sketches are stored in a sketchbook folder. The sketch last used will open by default. File  Open … can be used to open a sketch from elsewhere. 4

Let’s Get Started! Draw a line: Enter the code below and press the Run button (looks like the Play button on an audio or video device). size(400, 400); background(192, 64, 0); stroke(255); line(15, 25, 70, 90); The above is a basic mode sketch (no animation or interaction). 5

Continuous mode sketch Created by using functions setup() and draw() Draws a series of frames Example: void setup() { size(400, 400) stroke(255); background(192, 64, 0); } void draw() { line(150, 25, mouseX, mouseY); } How can you change the sketch so that it draws just a single line that follows the mouse? Called once Called repeatedly (default: 60 times/sec) Called repeatedly (default: 60 times/sec) 6

mousePressed() function Called whenever the mouse is pressed Example void setup() { size(400, 400); stroke(255); } void draw() { line(150, 25, mouseX, mouseY); } void mousePressed() { background(192, 64, 0); } 7

More about size() Can only be called once Cannot be used to resize window Sets width and height variables for the window Select renderer with optional third argument – P2D – P3D – PDF Set window to maximum display size with size(displayWidth, displayHeight); 8

Class Exercise 1 1.Draw a white circle with diameter 100 pixels in the center of a red window the size of the display. 2.Modify your sketch so that the circle changes color when you press the mouse. 9

Exporting to an Application You can create an application for MacOS, Linux, or Windows by using File  Export Application 10

The Data Folder loadImage() and loadStrings() functions use the data folder that is a subdirectory inside the sketch folder. When you export an application, the data folder gets bundled with it. Use Sketch  Add File to add a file to the data folder. 11

Let’s Draw a Map Start a new sketch. Download and add the file to the sketch. Try the following code: PImage mapImage; void setup() { size(640, 400); mapImage = loadImage("map.png"); } void draw() { background(255); image(mapImage,0,0); } 12

Class Exercise 2: Location Data for the Map Now let’s draw a red circle in the center of each state, with the size of the circle representing the state’s population. Download the following two files and add them to the sketch: – – – The second file contains code to read the data in the first file into a table. Find population data on the Web and add the data to the sketch. Draw the required circles on the map. Add rollovers to show the state name and population when the mouse hovers over it. 13

Lab 1: Election Data Use Processing to visualize data for the states from the 2012 US Presidential Election. Your visualization should answer the questions of which states went “red” (Republican), which went “blue” (Democratic), and how strongly red or blue each went. Your visualization should also compare the number of electoral votes apportioned to the states. Add rollovers to show the state name and percentage it went red or blue when the mouse hovers over it. Due Monday, September 15, at beginning of class 14

Preparation for Next Class Finish Class Exercise 2 Read Ware Chapters 1 and 2 Start on Lab 1 15