B. RAMAMURTHY Simulating Motion and Implementing Animation.

Slides:



Advertisements
Similar presentations
OpenGL Open a Win32 Console Application in Microsoft Visual C++.
Advertisements

2006 by Jim X. Chen: 1.1. Review –Graphics commands specify straight lines or other geometric primitives that are scan-converted.
Code Elements and Processing Coordinate System. Code elements: pages Comments: are documentation notes that are ignored by the computer but are.
A Quick Introduction to Processing
Recursion October 5, Reading Read pp in the text.
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.
Grundaufbau import processing.core.PApplet; public class Proc_Minimal extends PApplet { public void setup(){ size(1024, 768); frameRate(60.0f);
Translate, Rotate, Matrix Pages Function Function Definition Calling a function Parameters Return type and return statement.
IAT 334 Java using Processing ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY.
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.
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.
Microsoft® Small Basic The Math Object Estimated time to complete this lesson: 1 hour.
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.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Continuous February 16, Test Review What expression represents the zip car eligibility rules of at least 18 years old and no incidents?
Microsoft® Small Basic
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.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Introduction to Image processing using processing.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
Game Programming Step-01 how to create a camera to render the game
Review Inheritance Overloading and overriding. example1.pde.
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.
Test 2 Review. General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested.
Animation Pages Function Function Definition Calling a function Parameters Return type and return statement.
Creating visual interfaces in python
Often being different. Control flow By default Java (and therefore Processing) executes lines of a program one after the other –Doesn’t matter what happened.
Words. Characters and Strings Character –A single character inside of single quotes char letter = 'A' ; char digit = '0' ; – Strings Zero or more character.
Computer Science I Recap: variables & functions. Images. Pseudo-random 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.
Review Expressions and operators Iteration – while-loop – for-loop.
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.
Computer Science I Text input. Transformations. Yet another jigsaw. Classwork/Homework: Create new application making use of transformations.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
IAT 800 Lecture 8 PImage and PFont. Oct 13, Fall 2009IAT 8002 Outline  Programming concepts –PImage –PFont.
Computer Science I Looking at code: "Where did Prof. Shablinsky go" Classwork/homework: midterm projects.
Variables. Something to mention… void setup(){ size(200, 200); background(255); smooth(); } void draw() { stroke(0); strokeWeight(abs(mouseX-pmouseX));
Loops. About the Midterm Exam.. Exam on March 12 Monday (tentatively) Review on March 5.
Some of Chap 17.
IAT 265 PImage and PFont.
Classwork: Examine and enhance falling drop(s) or make your own.
Chapter 14, Translate & Rotate
20 minutes maximum exhibits
Array Data Structure and Processing Arrays
Chapter 6 Loops (iteration).
Code Elements and Processing Coordinate System
More programming with "Processing"
Code Elements and Processing Coordinate System
A Few Notes Starting August 29, 2018
A Few Notes August 30, 2017.
Chapter 15, Images …a few points
IAT 265 Lecture 2: Java Loops, Arrays Processing setup, draw, mouse Shapes Transformations, Push/Pop.
Chap 17 Section 3.
Variables & Datatypes CSE 120 Winter 2019
Translate, Rotate, Matrix
Animation Pages
LCC 6310 Computation as an Expressive Medium
Chapter 10 Algorithms.
How About Some PI? Trigonometry Feb 18,2009.
Continuous & Random September 21, 2009.
Chapter 9 Arrays.
Presentation transcript:

B. RAMAMURTHY Simulating Motion and Implementing Animation

Processing Features for Motion/animation fill(), nofill() in color commands loop(), noloop() : this is for controlling draw() function frameRate() height, width Displaying text on the screen translate () rotate()

Display Text on Screen PFont f; // STEP 1 Declare PFont variable void setup() { size(200,200); f = createFont("Arial",16,true); // STEP 2 Create Font } int x= 10; int y = 100; void draw() { background(255); textFont(f,16); // STEP 3 Specify font fill(0); // STEP 4 Specify font color text("Hello Strings!", x, y); // STEP 5 Display Text }

Print text on the terminal window These are useful for debugging print( string); println(string) Example: println (“Position of the animal is” + x, “ “ + y);

frameRate() Observe naming convention “frame” “Rate” Specifies the number of frames to be displayed every second: default is 60 sec void setup() { frameRate(4); } int pos = 0; void draw() { background(204); pos++; line(pos, 20, pos, 80); if (pos > width) { pos = 0; }

loop() and noloop() And redraw() draw() function by default keeps looping without any control. You make control it using loop() and noloop() function calls You can also call draw to execute only once by calling redraw() function

translate and rotate Last class we looked at translating (moving x and y) by moving the object. You can also simulate this by moving the grid, that’s what translate(x,y) function does. You can also rotate the object by rotating the grid. It takes the parameters in radians. We think is degrees. We have a function radians() to convert degrees to radians. Lets look at some examples.