Animation Pages 133-141. Function Function Definition Calling a function Parameters Return type and return statement.

Slides:



Advertisements
Similar presentations
Lesson One: The Beginning
Advertisements

Introduction to Programming
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
Emerging Platform#5: Processing 2 B. Ramamurthy 6/13/2014B. Ramamurthy, CS6511.
Chapter Eleven Digital Darkroom Expert Techniques.
Incorporating Color Techniques
Grundaufbau import processing.core.PApplet; public class Proc_Minimal extends PApplet { public void setup(){ size(1024, 768); frameRate(60.0f);
Color by Numbers Pages Syntax Introduced color color() colorMode()
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Translate, Rotate, Matrix Pages Function Function Definition Calling a function Parameters Return type and return statement.
Color by Numbers Pages (Skipped Curves 79-84)
IAT 334 Java using Processing ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY.
© red ©
Multi-media Graphics JOUR 205 Color Models & Color Space 5 ways of specifying colors.
1 Lecture 6 Attributes of graphical primitives Colors Colors in OpenGL Algorithms for scan-conversion.
GIMP Graphic Image Manipulation Program. GIMP Image manipulation software Free Open Source Written by two students First version in 1996.
Chapter 11 Adjusting Colors. Chapter Lessons Correct and adjust color Enhance colors by altering saturation Modify color channels using levels Create.
Animating Coordinate Geometry In this unit we will expand upon our knowledge of using counters to create motion pictures. By using incremental mathematics,
Digital Images Chapter 8, Exploring the Digital Domain.
Week 2 Book Chapter 1 RGB Color codes. 2 2.Additive Color Mixing RGB The mixing of “ light ” Primary: Red, Green, Blue The complementary color “ White.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Coding: Games, Apps and the Arts Unit 0: Processing Basics 1.
2D Graphics: Rendering Details
CS 325 Introduction to Computer Graphics 02 / 01 / 2010 Instructor: Michael Eckmann.
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
Adobe Photoshop CS4 - Illustrated
Variables and Arithmetic. From last class More drawing functions: strokeWeight(n); // higher the n value broader the stroke fill(k) ; // single parameter.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Processing can load images, display them on the screen, and change their size, position, opacity, and tint. You can load gif, png and jpg images in processing.
Introduction to Image processing using processing.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
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.
Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing.
Do Now: Take out your notebook and a pen. Good Morning Do Now: Take out your notebook and a pen. Good Morning Aim: What is color? Mr. Spaterella Technology.
Color Color Color Tsung-Yi Wu.
Elements of Design 1.02 Investigate Design Principles and Elements.
Intro to Color Theory. Objectives Identify and discuss various color models including RGB, CMYK, Black/white and spot color. Investigate color mixing.
Graphics Primitives in Processing 1/14/2010. size(x, y) ; Sets the initial size of the screen Units are in pixels –Pixel == picture element –Small dots.
Hue: the property of light by which the color of an object is classified as red, blue, green, or yellow in reference to the spectrum. Saturation: the.
HSB to RGB to HEX.
B. RAMAMURTHY Processing and Programming cse
RED, YELLOW, and BLUE These colors cannot be made Used to make all other colors.
PROCESSING A computer screen is a grid of small light elements called pixels.
Some of Chap 17.
Pixels, Colors and Shapes
Emerging Platform#1: Processing 3
Tutorial 4 Topic: CSS 3.0 Li Xu
Chapter 14, Translate & Rotate
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
FOREGROUND COLOR h1 { color: DarkCyan;} h2 { color: #ee4e80;} p { color: rgb(100, 100, 90);} The three traditional ways to specify colors: Color name.
Basic Graphics Drawing Shapes 1.
Chapter 15, Images …a few points
Chapter 5, Conditionals Brief Notes
Pages Section: Control2: Repetition
Light Light has wave-like properties
Variables and Arithmetic
HSB Hue-Saturation-Brightness
What employers and colleges expect you to have.
Chapter 15, Images …a few points
What Color is it?.
Translate, Rotate, Matrix
Animation Pages
Chapter 15, Images …a few points
Pages Section: Control2: Repetition
Pages Section: Control2: Repetition
Chapter 13, Math A few Examples.
Presentation transcript:

Animation Pages

Function Function Definition Calling a function Parameters Return type and return statement

Function: Intuitive Understanding Function F X F(x)

Examples Subtract 6 Add 10 Multiply (x,y) X=10, y=4

Function concept int z = add(34, 10); // function call add 3410 XY Function definition: int add (int x, int y) // x,y formal parameters { int sum;// sum is a local variable sum = x + y; return sum; } sum

translate Translate function moves the origin by the amount specified int x,y; x = 10; y = 10; void draw() { background(30,50,60); translate(x,y); rect(x,y,70,30); x++; if (x> width) x = 0; y++; if (y>height) y = 0; }

Multiple objects Consider a scenario with multiple objects Each with its own initial position Size Speed How will you define these? How will control these? How will you detect collisions among these and take action?

Matrices (or layers) In order to represent independent motion and axes and other attributes, Processing provides pushMatrix() and popMatrix() These create new layers of axes for objects to exist and be controlled independently. Lets look at some examples.

Color by Numbers Pages 85-93

Syntax Introduced color color() colorMode()

Red, Green, Blue RGB is a common way to specify color Minimum value of number is 0 Maximum value of number is 255 Resulting in 256 different shades for each color 0 is black, 255 is the specific color…

Functions that take color as parameters background(r,g,b); fill (r,g,b); fill(r,g,b,alpha) stroke(r,g,b); stroke(r,g,b, alpha) alpha is for opaque/transparency 0 – entirely transparent 255 – entirely opaque

Example1 (size 100X100) background(129,130,87); noStroke(); fill(174,221,60); rect(17,17,66,66);

Example2 background(129,130,87); noFill(); strokeWeight(4); stroke(174,221,60); rect(19,19,62,62);

Example 3: transparency background(116,193,206); noStroke(); fill(129,130,87,102); // more transparent rect(20,20,30,60); fill(129,130,87,204); // less transparent rect(50,20,30,60);

Example 4 background(0); noStroke(); fill(242,204,47,160); // yellow ellipse(47,36,64,64); fill(174,221,60,160); // green ellipse(90,47,64,64); fill(116,193,206,160); // blue ellipse(57,79,64,64);

color object color(gray); color(gray,alpha); color ruby= color(211,24,24,160); color pink = color(237,159,176); background(pink); noStroke(); fill(ruby); rect(35,0,20,200);

Hue, Saturation, Brightness mode Hue is the actual color. It is measured in angular degrees counter-clockwise starting and ending at red = 0 or 360 (so yellow = 60, green = 120, etc.). Saturation is the purity of the color, measured in percent from (0) to (100). At 0% saturation, hue is meaningless. Brightness is measured in percent from black (0) to white (100). At 0% brightness, both hue and saturation are meaningless.

Set a single pixel Lets look at three program and review the code.

Summary We studied the usage of color and transparency We also covered other color mode HSB (Hue, Saturation, Brightness) We analyzed code using these attributed and some complex math.