Creative Computing. \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position.

Slides:



Advertisements
Similar presentations
Physical Computing INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.
Advertisements

Basics of motion. Fluid motion Fluid motion is best achieved with floats, try and work out why: floats have decimal places, which provide more resolution,
Creative Computing. Comments on Assignments Everyone did very well Report writing needs more work Jumping scale Update first then draw.
Variables Conditionals Boolean Expressions Conditional Statements How a program produces different results based on varying circumstances if, else if,
Lesson One: The Beginning Chapter 3: Interaction Learning Processing: by Daniel Shiffman Presentation by Donald W. Smith Graphics from text.
Windows Basics: The Mouse. The Mouse Before you can explore the Desktop and Taskbar, you must know how to use your mouse. Your mouse is a pointing device.
Introduction to Programming
Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
A Quick Introduction to Processing
Emerging Platform#5: Processing 2 B. Ramamurthy 6/13/2014B. Ramamurthy, CS6511.
© Calvin College, Being abstract is something profoundly different from being vague... The purpose of abstraction is not to be vague, but to create.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
IAT 334 Java using Processing ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY.
FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 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.
ICM Week 2. Structure - statements and blocks of code Any single statement ends with semicolon ; When we want to bunch a few statements together we use.
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.
PROCESSING Animation. Objectives Be able to create Processing animations Be able to create interactive Processing programs.
LO: Learn how to develop your game further to include interactions with the device.
Beech Hall School Computing Science Course. To learn how to design and create a software application – an App Learn the basics of App Design Learn the.
Creative Computing Marco Gillies Robert Zimmer. Creative Computing \\ Purpose To learn the key technical and programming skills you will need to make.
Review Blocks of code {.. A bunch of ‘statements’; } Structured programming Learning Processing: Slides by Don Smith 1.
FUNDAMENTALS OF PROGRAMMING SM1204 SEMESTER A 2012.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Locally Edited Animations We will need 3 files to help get us started at
Review Transformations – Scale – Translate – Rotate Combining Transformations – Transformations are cumulative – Rotating about the center of an object.
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
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
Review of ArT3 Programming Course David Meredith Aalborg University
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Barclays Mobile Robotics Hour 1 Overview Session.
B. RAMAMURTHY Lab1 Discussion. General Instructions Attend the recitation (s), office hours (s) to get help Read the Lab description Understand what is.
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.
Lesson Two: Everything You Need to Know
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
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.
B. RAMAMURTHY Processing and Programming cse
Welcome to Processing Who does not have access to digital camera?
Processing Variables. Variables Processing gives us several variables to play with These variables are always being updated and you can assume they have.
Review Random numbers mouseX, mouseY setup() & draw() frameRate(), loop(), noLoop() Mouse and Keyboard interaction Arcs, curves, bézier curves, custom.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Introduction to Processing Dominique Thiebaut Dept. Computer Science Computer Science Dominique Thiebaut Thiebaut -- Computer Science.
Arrays. 2 Why do we care (about arrays)? What if you have a whole bunch of cars (or aliens or balls or ???) bouncing around the screen? How do we keep.
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.
p5.js mouse, keyboard and if’s
Computation as an Expressive Medium
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
For Net Art Lecture 2 J Parker
Mouse Inputs in Processing
Chapter 5, Conditionals Brief Notes
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
More programming with "Processing"
IAT 265 Lecture 2: Java Loops, Arrays Processing setup, draw, mouse Shapes Transformations, Push/Pop.
LCC 6310 Computation as an Expressive Medium
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Presentation transcript:

Creative Computing

\\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position to draw points and lines 4.Use if statements to control animation and mouse interaction 5.Use transforms for moving objects

Creative Computing int x; void setup() { background(255); size(200, 200); x = 0; } void draw() { x = x + 1; strokeWeight(4); point(x, 100); }

Creative Computing int x; void setup() { background(255); size(200, 200); x = 0; } void draw() { x = x + 1; strokeWeight(4); point(x, 100); } Variables

Creative Computing int x; void setup() { background(255); size(200, 200); x = 0; } void draw() { x = x + 1; strokeWeight(4); point(x, 100); } Happens at the start of the program Do any initial set up like changing the size of the screen or the background colour Set the initial values of any variables

Creative Computing int x; void setup() { background(255); size(200, 200); x = 0; } void draw() { x = x + 1; strokeWeight(4); point(x, 100); } Happens every time the screen is redrawn (many times a second) Update any variables Draw stuff (using the variables)

Creative Computing \\ Exercise Look up random, make a point move randomly Both left-right and up-down Change colour over time Can you make a point move back and forth?

Creative Computing \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position to draw points and lines 4.Use if statements to control animation and mouse interaction 5.Use transforms for moving objects

Creative Computing \\ if statements void draw() { background(255); strokeWeight(10); if (mousePressed) { point(mouseX, mouseY); } Check if the mouse is pressed Anything in the curly brackets only happens if the mouse is pressed

Creative Computing \\ Exercise Make a point follow the mouse cursor without a trail Look up pmouseX draw a line from the previous mouse position to the current one Look up rect and draw a box with the mouse, what about ellipse? Make the mouse change the screen colour

Creative Computing \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position to draw points and lines 4.Use if statements to control animation and mouse interaction 5.Use transforms for moving objects

Creative Computing \\ more about if statements void draw() { if (mousePressed) { background(0); } else { background(255); } Happens if the mouse is pressed Happens if it isnt pressed

Creative Computing \\ more about if statements void draw() { if (mouseX > 100) { background(0); } else { background(255); } You can compare things If the mouse position is more than 100

Creative Computing \\ comparisons X == Y is X equal to Y? (not different from X = Y) X != Y is Y not equal to Y? X Y is X less/greater than Y X = Y is X less/greater than or equal to Y

Creative Computing \\ more about if statements void draw() { if (mousePressed && mouseX > 100) { background(0); } else { background(255); } && (and) combines different tests together

Creative Computing \\ more about if statements void draw() { if (mousePressed && (mouseButton == LEFT) ) { background(0); } else { background(255); } Check which mouse button has been pressed

Creative Computing \\ exercises Draw points only if the left button is down Create a rollover – a box that changes colour if the mouse is over it Create a moves that moves and bounces of the edges of the window Can you create Pong?

Creative Computing

\\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position to draw points and lines 4.Use if statements to control animation and mouse interaction 5.Use transforms for moving objects