Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.

Slides:



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

MS® PowerPoint.
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.
Objectives Define photo editing software
© by Pearson Education, Inc. All Rights Reserved. continued …
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.
1 L44 Introduction to Java Applets. 2 OBJECTIVES  To differentiate between applets and applications.  To observe some of Java's exciting capabilities.
Macromedia Flash MX 2004 – Design Professional Macromedia Flash MX GETTING STARTED WITH.
1 Python Programming: An Introduction to Computer Science Chapter 3 Objects and Graphics.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Chapter 3 Working with Symbols and Interactivity.
Review Blocks of code {.. A bunch of ‘statements’; } Structured programming Learning Processing: Slides by Don Smith 1.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
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.
Locally Edited Animations We will need 3 files to help get us started at
IE 411/511: Visual Programming for Industrial Applications
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Working with Symbols and Interactivity
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
XP Tutorial 1 Introduction to Macromedia Flash MX 2004.
Adobe Flash CS3 Revealed Chapter 1 - GETTING STARTED WITH FLASH.
Chapter 3 – Part 1 Word Processing Writer for Linux CMPF 112 : COMPUTING SKILLS.
Keyboard and Events. What about the keyboard? Keyboard inputs can be used in many ways---not just for text The boolean variable keyPressed is true if.
Processing Lecture.2 Mouse and Keyboard
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
Tutorial 1 Introducing Adobe Flash CS3 Professional
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
Key Applications Module Lesson 21 — Access Essentials
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Chapter 2 – Introduction to the Visual Studio .NET IDE
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"
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
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,
IAT 265 Images in Processing PImage. Jun 27, 2014IAT 2652 Outline  Programming concepts –Classes –PImage –PFont.
Review Random numbers mouseX, mouseY setup() & draw() frameRate(), loop(), noLoop() Mouse and Keyboard interaction Arcs, curves, bézier curves, custom.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Adobe Photoshop CS4 – Illustrated Unit A: Getting Started with Photoshop CS4.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Creating Web Pages in Word. Sharing Office Files Online Many Web pages are created using the HTML programming language. Web page editors are software.
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.
Composition.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
Mouse Inputs in Processing
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
Processing Environment
Introduction to Problem Solving & Programming using Processing 2
Presentation transcript:

Processing Processing is 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. 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 Processing program is called a sketch. Sketches are stored in the sketchbook, a folder that's used as the default location for saving all of your projects. The (0, 0) coordinate is the upper left-hand corner of the display window. Building on this program to change the size of the display window and set the background color, type in the code below: size(400, 400); background(192, 64, 0); stroke(255); line(150, 25, 270, 350); Promjene boje: 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

Interactive Processing – static mode Interactive programs are drawn as a series of frames, which you can create by adding functions titled setup() and draw(): void setup() { size(400, 400); stroke(255); background(192, 64, 0); } void draw() { line(150, 25, mouseX, mouseY); }

Interactive Processing - active mode More advanced mouse handling can also be introduced; for instance, the mousePressed() function will be called whenever the mouse is pressed (see also keyPressed() ): void setup() { size(400, 400); stroke(255); } void draw() { line(150, 25, mouseX, mouseY); } void mousePressed() { background(192, 64, 0); }

Exporting and distributing 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. This will create a folder named applet inside your sketch folder. Opening the index.html file inside that folder will open your sketch in a browser. The applet folder can be copied to a web site intact, and will be viewable by anyone who has Java installed on their system. Similarly, you can use File → Export Application to bundle your sketch as an application for Windows, Mac OS X, and Linux. 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.

Loading and displaying data One of the unique aspects of the Processing API is the way files are handled. The loadImage() and loadStrings() functions each expect to find a file inside a folder named data, which is a subdirectory of the sketch folder. String[] lines = loadStrings("something.txt"); PImage image = loadImage("picture.jpg"); Each variable has to have a data type, such as String or PImage. To add a file to the data folder of a Processing sketch, use the Sketch → Add File menu option, or drag the file into the editor window of the PDE. The data folder will be created if it does not exist already. To view the contents of the sketch folder, use the Sketch → Show Sketch Folder menu option. This opens the sketch window in your operating system's file browser.

Libraries add new features A library is a collection of code in a specified format that makes it easy to use within Processing. One example is the PDF Export library. This library makes it possible to write PDF files directly from Processing. To use the PDF library in a project, choose Sketch → Import Library → PDF Export. This will add the following line to the top of the sketch: import processing.pdf.*; Now that the PDF library is imported, you may use it to create a file. For instance, the following line of code creates a new PDF file named lines.pdf that you can draw to. beginRecord(PDF, "line.pdf");

rect(), rectMode() Default: rectMode(CORNER) rectMode(CENTER)

elipse(), elipseMode() rectMode(CORNERS), elipseMode(CORNERS)

triange(), arc(), quad(),curve() In Processing, every shape has a stroke( ) or a fill( ) or both. The stroke( ) is the outline of the shape, and the fill( ) is the interior of that shape.

Drawing a continuous line The function smooth() enables “anti-aliasing” which smooths the edges of the shapes. no smooth() disables anti-aliasing. frameRate( ), which requires an integer between 1 and 60, enforces the speed at which Processing will cycle through draw( ). frameRate (30), for example, means 30 frames per second, a traditional speed for computer animation.

width —Width (in pixels) of sketch window. height —Height (in pixels) of sketch window. frameCount —Number of frames processed. frameRate —Rate that frames are processed (per second). screen.width —Width (in pixels) of entire screen. screen.height —Height (in pixels) of entire screen. key —Most recent key pressed on the keyboard. keyCode —Numeric code for key pressed on keyboard. keyPressed —True or false? Is a key pressed? mousePressed —True or false? Is the mouse pressed? mouseButton —Which button is pressed? Left, right, or center? System Variables

Bouncing ball

Functions & objects

…unutar clase Car – metode (funkcije)