20 minutes maximum exhibits

Slides:



Advertisements
Similar presentations
Objects. 2 Object Oriented Programming (OOP) OOP is a different way to view programming Models the real world A different view than Structured programming.
Advertisements

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
Variables Conditionals Loops The concept of Iteration Two types of loops: While For When do we use them? Iteration in the context of computer graphics.
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.
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.
Using Coordinate Geometry to Create Moving Images In unit 29 we created a simple drawing for the background of a children’s game. We are going to start.
Review Blocks of code {.. A bunch of ‘statements’; } Structured programming Learning Processing: Slides by Don Smith 1.
Classes / Objects An introduction to object-oriented programming.
Animating Coordinate Geometry In this unit we will expand upon our knowledge of using counters to create motion pictures. By using incremental mathematics,
Continuous February 16, Test Review What expression represents the zip car eligibility rules of at least 18 years old and no incidents?
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 Methods. Objectives Be able to define methods that return values Be able to define methods that do not return values Be able to use random.
Review of ArT3 Programming Course David Meredith Aalborg University
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
© Calvin College, For a number of years I have been familiar with the observation that the quality of programmers is a decreasing function of the.
Review Loops – Condition – Index Functions – Definition – Call – Parameters – Return value.
B. RAMAMURTHY Simulating Motion and Implementing Animation.
2-D Shapes, Color, and simple animation. 7 Basic Shapes Ellipse :: ellipse() Arc :: arc() Line :: line() Point :: point() Rectangle :: rect() Triangle.
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.
Lesson Two: Everything You Need to Know
Animation Pages Function Function Definition Calling a function Parameters Return type and return statement.
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.
Repetition 8/9/2009. Learning to Program -- Suggestions Spend a lot of time fiddling around with code –Programming is something you have to learn by doing.
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.
Test Review. General Info. All tests will be comprehensive. You will be tested more on your understanding of code as opposed to your ability to write.
Programming in Processing Taught by Ms. Madsen Assistants: Ms. Fischer and Ms. Yen Winsor School, 2/20/08.
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.
Functions. 2 Modularity What is a function? A named block of code Sometimes called a ‘module’, ‘method’ or a ‘procedure’ Some examples that you know are:
Variable Scope. When you declare a variable, that name and value is only “alive” for some parts of the program  We must declare variables before we use.
Processing Lecture.3 Loop and animation
Some of Chap 17.
Classwork: Examine and enhance falling drop(s) or make your own.
Chapter 14, Translate & Rotate
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
Chapter 7 Functions.
Basic Graphics Drawing Shapes 1.
Computation as an Expressive Medium
Chapter 6 Loops (iteration).
Chapter 7 Functions.
Code Elements and Processing Coordinate System
For Net Art Lecture 2 J Parker
Exam1 Review CSE113 B.Ramamurthy 11/29/2018 B.Ramamurthy.
Programming for Artists
Chapter 10 Algorithms.
Chapter 5, Conditionals Brief Notes
Chapter 10 Algorithms.
Code Elements and Processing Coordinate System
A Few Notes Starting August 29, 2018
IAT 265 Lecture 2: Java Loops, Arrays Processing setup, draw, mouse Shapes Transformations, Push/Pop.
Just a question for Mac users:
Exam1 Review CSE113 B.Ramamurthy 4/17/2019 B.Ramamurthy.
LCC 6310 Computation as an Expressive Medium
Loops & Nested Loops CSE 120 Winter 2019
Chapter 10 Algorithms.
Chapter 4, Variables Brief Notes
Trigonometry & Random March 2, 2010.
How About Some PI? Trigonometry Feb 18,2009.
Continuous & Random September 21, 2009.
Loops and Iteration CS 21a: Introduction to Computing I
Chapter 13, Math A few Examples.
Chapter 9 Arrays.
Presentation transcript:

20 minutes maximum exhibits

Variable Scope Variables can be declared anywhere in the sketch. The concept is called scope Global variables are accessible anywhere in the sketch. Local variables are limited to the code block in which they reside. Example: if() or for() function where a variable is declared for that block. Try example 6-7 and note that “x” is not accessible outside of draw() block. Advice on handling scope: Try to place variables where they are used because it is more efficient and less confusing. Some programmers, however, do like to see most of their variables at top. So it depends.

Then to keep from flashing is to use noLoop(). Open exercise 6_2circle. Then fill colors to dark random colors rather than w. Then to keep from flashing is to use noLoop(). void setup() { size(200,200); background(255); } void draw() { float w = 200; while (w > 0) { stroke(0); fill(w); //fill(random(0,255), random(0,255), random(0,255)); ellipse(width/2, height/2, w, w); w = w - 20;

Open A, I had made a typo, which led me to an even more crazy remix. Exercise 6-3 Open B because it is visually interesting. Note how you can simply try different associations and formulas to see what happens.   Open A, I had made a typo, which led me to an even more crazy remix. size(300,300); background(255); stroke(#0033ff); noFill(); int h = height/2; int i = 0; while(i <10) { ellipse(width/2, h, i*20, i+20); i++; h += 10 ; }

Nested Loops To make a nested loop, simply place a for statement inside another. size(480,120); background(0); noStroke(); for(int y = 0; y<=height; y += 40) { for(int x = 0; x<=width; x +=40) { fill(250, 100, 100 ); ellipse(x, y, 40,40); } //need better color scheme //I founding something interesting: inverted round corner size(480,120); background(0); noStroke(); for(int y = 0; y<=height; y += 40) { for(int x = 0; x<=width; x +=40) { fill(250, 100, 100 ); ellipse(x, y, 40,40); fill(6, 200, 100 ); ellipse(x+40, y, 40,40); fill(#ff9933); rectMode(CENTER); rect(x+40, y , 20, 20,-20);//inverted round corner line(x,y-5, x, y+5); strokeWeight(.5); stroke(#cc6600); line(x, 0, x, height); line(0, y, width, y); x += 40; strokeWeight(1); }

We probably won’t get to this, but take a look and see how it works Fuzzy line size(300,200); background(0); int totalPts = 200; float steps = totalPts + 1; stroke(#ffffff); strokeWeight(2); for(int i = 1; i<steps; i++) { point((width/steps)* i , (height/2) + random(-5, 5)); } Funnel size(300,300); background(0); int totalPts = 300; float steps = totalPts + 1; stroke(255); float rand = 0; for(int i = 1; i<steps; i++) { point((width/steps)*i, (height/2) + random(-rand, rand)); rand += .1; } Wavy dots //RUN THIS ABOUT 10 TIMES. size(300,300); background(0); int totalPts = 300; float steps = totalPts + 1; stroke(255); strokeWeight(3); float rand = 0; for(int i = 1; i<steps; i++) { point((width/steps)*i, (height/2) + random(-rand, rand)); rand += random(-5, 5); }

Life is like a box of chocolates. You never know what you’re gonna get. /*originally started out with creating a spiral, which would mainly happen by translating, then incrementing the x axis and rotate(.1) However i did a remix into this abstraction */ void setup(){ size(500,500); background(0); //frameRate(5 ); } void draw(){ noLoop(); translate(width/2, height/2); for (float i = 0; i <200; i++) { //strokeWeight(.25); fill(255,random(200), random(1,100), 15);//barely visible big circles rotate(180); ellipse(i, 0,100, 100); //unplanned triangle noStroke(); fill(255,random(200), random(1,100) ); triangle(i-5, 5, 10, 15, i+5, 8); }}

/* this came from funprogramming. Also see link below size(500, 200); noStroke();stroke(0); background(23, 100, 240); // in rare cases, paint using yellow color for (int x=20; x<width-30; x=x+25) { for (int y = 20; y<height-30; y = y+25) { //if the random generated # is >90, fill yellow if (random(100) > 90) { fill(255, 255, 0); } //if the random is between 50-100, fill black else if(random(100) > 50) { fill(0); }else { noFill(); ellipse(x , y , 20, 20); /* this came from funprogramming. Also see link below http://impactdesignhub.org/2017/08/10/online-ideas-exchange-racial-equity-design */ /*This program is simply a grid, but it allows 3 different fill colors based on whether random # is between 90-100, then 50-89, or 0-49 The if() is like that grade program that we did in chap 5 */