Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.

Slides:



Advertisements
Similar presentations
Lesson One: The Beginning Chapter 3: Interaction Learning Processing: by Daniel Shiffman Presentation by Donald W. Smith Graphics from text.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Introduction to Programming
Processing Lecture. 1 What is processing?
Emerging Platform#5: Processing 2 B. Ramamurthy 6/13/2014B. Ramamurthy, CS6511.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Aim: Use the given examples to record examples and our own ideas in our journal 1.Write technical examples in journal and/or participate in full.
Lab 10: Creating a Presentation
DSA Processing. Links Processing.org My Processing page Ben Fry Ben Fry’s Thesis on Computational Information DesignThesis Casey Reas siteCasey Reas Casey.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Lesson One: The Beginning
Chapter 2: Exploring the Desktop The Complete Guide to Linux System Administration.
C HAPTER 7 Microsoft Windows 7. Part1: Getting Started with Windows7 Fundamentals 7.1 What is Windows 7? It is the latest version of a series of Operating.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Chapter 3 Working with Symbols and Interactivity.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Web Technologies Website Development Trade & Industrial Education
CIS—100 Chapter 9—PowerPoint 1. The PowerPoint User Interface 2 There is a tall band across the screen that contains many, very visual commands arranged.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
CIS 205—Web Design & Development Flash Chapter 1 Getting Started with Adobe Flash CS3.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
IE 411/511: Visual Programming for Industrial Applications
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Working with Symbols and Interactivity
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Adobe Flash CS3 Revealed Chapter 1 - GETTING STARTED WITH FLASH.
Creating a Logo – Lesson 3 1 Creating a Logo Lesson 3.
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Introducing Cascading Style Sheets. Cascading Style Sheet Basics  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles.
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.
Processing Workshop. What is processing? “Processing is an open source programming language and environment for people who want to program images, animation,
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
XP Tutorial 2 Drawing, Adding Text, and Creating Symbols.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Adobe Photoshop T.Ahlam Algharasi. Adobe Photoshop Adobe Photoshop is a seriously powerful photo and image edit ( treating and manipulation, compositing,
Welcome to Processing Who does not have access to digital camera?
Chapter1 The flash interface and action script 3.0.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
1 Development Environments AUBG, COS dept Lecture Title: Dev Env: NetBeans (Extract from Syllabus) Reference:
Creating Web Pages in Word. Sharing Office Files Online Many Web pages are created using the HTML programming language. Web page editors are software.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Introduction to Processing David Meredith Aalborg University Art &Technology, 3rd Semester Programming.
More programming with "Processing"
Introduction to Problem Solving & Programming using Processing 2
Working with Symbols and Interactivity
Introduction to Problem Solving & Programming using Processing 2
Introduction to Problem Solving & Programming using Processing 2
Adobe Flash CS3 Revealed
Presentation transcript:

Introduction to Processing

2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis on animation and providing users with instant feedback through interaction

3 Processing consists of: The Processing Development Environment (PDE). –This is the software that runs when you double-click the Processing icon. –The PDE is an Integrated Development Environment (IDE) with a minimalist set of features designed as a simple introduction to programming or for testing one-off ideas. A collection of functions (also referred to as commands or methods) that make up the “core” programming interface, or API, as well as several libraries that support more advanced features such as drawing with OpenGL, reading XML files, and saving complex imagery in PDF format. A language syntax, identical to Java but with a few modifications. An active online community, hosted at

4 Sketching with Processing A Processing program is called a sketch –The idea is to make Java-style programming feel more like scripting, and adopt the process of scripting to quickly write code –Sketches are stored in the sketchbook, a folder that's used as the default location for saving all of your projects. Advanced programmers need not use the PDE, and may instead choose to use its libraries with the Java environment of choice.

5 Hello world line(15, 25, 70, 90);

6 Change the size of the display window, set the background color size(400, 400); background(192, 64, 0); stroke(255); Line This version sets the window size to 400 x 400 pixels, sets the background to an orange-red, and draws the line in white, by setting the stroke color to 255(150, 25, 270, 350);

7 Stroke stroke(255); // sets the stroke color to white stroke(255, 255, 255); // identical to the line above stroke(255, 128, 0); // bright orange (red 255, green 128, blue 0) stroke(#FF8000); // bright orange as a web color stroke(255, 128, 0, 128); // bright orange with 50% transparency The same alternatives work for the fill() function, which sets the fill color, and the background() function, which clears the display window. Like all Processing functions that affect drawing properties, the fill and stroke colors affect all geometry drawn to the screen until the next fill and stroke functions.

8 Hello mouse A program written as a list of statements (like the previous examples) is called a static mode sketch. In static mode, a series of functions are used to perform tasks or create a single image without any animation or interaction. Interactive programs are drawn as a series of frames, which you can create by adding functions titled setup() and draw() as shown in the code below. –These are built-in functions that are called automatically

9 Hello mouse void setup() { size(400, 400); stroke(255); background(192, 64, 0); } void draw() { line(150, 25, mouseX, mouseY); } The setup() block runs once, and the draw() block runs repeatedly. As such, setup() can be used for any initialization; in this case, setting the screen size, making the background orange, and setting the stroke color to white. The draw() block is used to handle animation. The size() function must always be the first line inside setup().

10 To draw just a single line that follows the mouse, move the background() function to the draw() function, which will clear the display window (filling it with orange) each time draw() runs. void setup() { size(400, 400); stroke(255); } void draw() { background(192, 64, 0); line(150, 25, mouseX, mouseY); }

11 Most programs will employ active mode, which use the setup() and draw() blocks. More advanced mouse handling can also be introduced; for instance, the mousePressed() function will be called whenever the mouse is pressed. void setup() { size(400, 400); stroke(255); } void draw() { line(150, 25, mouseX, mouseY); } void mousePressed() { background(192, 64, 0); }

12 Exporting and distributing your work One of the most significant features of the Processing environment is its ability to bundle your sketch into an applet or application with just one click Select File → Export to package your current sketch as an applet

13 Creating images from your work Images are saved with the saveFrame() function. Adding saveFrame() at the end of draw() will produce a numbered sequence of TIFF-format images of the program's output, named screen-0001.tif, screen-0002.tif, and so on. A new file will be saved each time draw() runs You can also specify your own name and file type for the file to be saved with a function like –saveFrame("output.png") To do the same for a numbered sequence, use # (hash marks) where the numbers should be placed: –saveFrame("output-####.png");

14 Examples and references The examples can be accessed from the File → Examples menu To see how a function works, select its name, and then right-click and choose Find in Reference from the pop-up menu