“Processing” easy coding Jens Dalsgaard Nielsen

Slides:



Advertisements
Similar presentations
Introduction to Programming
Advertisements

Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
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.
DSA Processing. Links Processing.org My Processing page Ben Fry Ben Fry’s Thesis on Computational Information DesignThesis Casey Reas siteCasey Reas Casey.
Lecture 3 IAT 800. Sept 15, Fall 2006IAT 8002 Suggestions on learning to program  Spend a lot of time fiddling around with code –Programming is something.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 1 Introduction to Processing.
Processing Dr Andy Evans. Processing MIT Media Lab Libraries for visualisation. Wraps a simple visualisation scripting language.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
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
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Review Loops – Condition – Index Functions – Definition – Call – Parameters – Return value.
Concurrent Programming and Threads Threads Blocking a User Interface.
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.
Objects. The Heart of the Matter - The "Black Box" Object-oriented software is all about objects. An object is a "black box" which receives and sends.
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
Computer Science I Classes and objects Classwork/Homework: Examine and modify my examples. Make your own.
Computer Science I Programming in Java (programming using Processing IN Java, using IntelliJ IDE) Classwork/Homework: copy your Processing projects over.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Continuous. Flow of Control Programs can broadly be classified as being –Procedural Programs are executed once in the order specified by the code varied.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
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,
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.
CS 177 Recitation Week 1 – Intro to Java. Questions?
How to create interactive CS lessons with Office Mix + Online Python Tutor Philip Guo University of Rochester Aug 2015.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Introduction to Processing David Meredith Aalborg University Art &Technology, 3rd Semester Programming.
PhoneGap, Processing.
Dive Into® Visual Basic 2010 Express
Unit 5: Canvas Painter.
Top 8 Best Programming Languages To Learn
MOM! Phineas and Ferb are … Aims:
Emerging Platform#1: Processing 3
Event loops 16-Jun-18.
Chapter 14, Translate & Rotate
Event Driven Programming Dick Steflik
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
Roller Coaster Design Project
Computation as an Expressive Medium
For Net Art Lecture 2 J Parker
Event loops.
Introduction to Algorithm Design
Chapter 10 Algorithms.
Mouse Inputs in Processing
Chapter 5, Conditionals Brief Notes
Chapter 10 Algorithms.
Introduction to Applet, Application and JDK
More programming with "Processing"
Introduction to Problem Solving & Programming using Processing 2
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Lecture 7: Introduction to Processing
Event loops 8-Apr-19.
Introduction to Problem Solving & Programming using Processing 2
LCC 6310 Computation as an Expressive Medium
Chapter 10 Algorithms.
Event loops.
Continuous & Random September 21, 2009.
Event loops.
Event loops 19-Aug-19.
Introduction to Problem Solving & Programming using Processing 2
Presentation transcript:

“Processing” easy coding Jens Dalsgaard Nielsen Section of Automation & Control Student Sat Lab Aalborg University – Denmark {jdn,jal}@space.aau.dk http://www.studentspace.aau.dk

Purpose Need an easy way to do some nice programming GUI – facilities External link (to arduino or othe system with “serial” communication) No need for 5 years CS education :-) Up and running i 5 minuttes Nice with experience from an imperative language C, pascal, C++, java,... You need a computer Mac, windows, linux – dosnt matter – multiplatform environment :-)

Many many many solutions Glade, python, .net, gtk, visual-*, Qt, tcl/tk,... None of them so easy to use for what we are heading for Easy level Medium level Adv level ... depending on you

A solution ?!?! Similar to Arduino No religious discussions - support mac, win, linux Used by many ~= lot to be found out in the world Free

Your problem Learning by “doing” - all/some people to the keys Do a (simple) design so you can do a living system A suggestion for a plan for the people who want to ... Short intro for Processing (the language/environment) Install of Processing environment Read and getting first small sketches up and running

First Who has coding experience (imperative coding) ???

??? C ? C++ ? C# ? Java ? Python ? Matlab ? Tk/tcl ? Machine coding

Arduino C /C++ Processing Java, simple java

Material www.control.aau.dk/~jdn/edu/courses/11-2/best11 Processing.org processing.org/reference/libraries/ Processing IDE !!

Modes of coding in processing Basic This mode is used drawing static images and learning fundamentals of programming. Simple lines of code have a direct representation on the screen. The following example draws a yellow rectangle on the screen: size(200, 200); background(255); noStroke(); fill(255, 204, 0); rect(30, 20, 50, 50);

Continuous This mode provides a setup() structure that is run once when the program begins and a draw() structure which by default continually loops through the code inside. This additional structure allows writing custom functions and classes and using keyboard and mouse events. void setup() { size(200, 200); noStroke(); background(255); fill(0, 102, 153, 204); smooth(); noLoop(); } void draw() { circles(40, 80); circles(90, 70); void circles(int x, int y) { ellipse(x, y, 50, 50); ellipse(x+20, y+20, 60, 60);

Java This mode is the most flexible, allowing complete Java programs to be written from inside the Processing Environment (as long as they're still subclasses of PApplet). This mode is for advanced users only and is not really recommended. Using this mode means that any additional tabs will no longer be inner classes, meaning that you'll have to do extra work to make them communicate properly with the host PApplet. It is not necessary to use this mode just to get features of the Java language. public class MyDemo extends PApplet { void setup() { size(200, 200); rectMode(CENTER); noStroke(); fill(0, 102, 153, 204); } void draw() { background(255); rect(width-mouseX, height-mouseY, 50, 50); rect(mouseX, mouseY, 50, 50);

Processing and GUI: controlP5 Easy to use library Radio buttons, rulers,...

Let's get it done