Presentation is loading. Please wait.

Presentation is loading. Please wait.

Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.

Similar presentations


Presentation on theme: "Processing TYWu. Where can I download? 2.0b9 Windows 32-bit."— Presentation transcript:

1 Processing TYWu

2 Where can I download? http://processing.org/download/ 2.0b9 Windows 32-bit

3 How to Install You'll have a.zip file. Double-click it, and drag the folder inside to a location on your hard disk. It could be Program Files or simply the desktop, but the important thing is for the processing folder to be pulled out of that.zip file. Then double-click processing.exe to start.

4 Getting Started Windows RUN STOP

5 Getting Started Function –ellipse(50, 50, 80, 80); This line of code means "draw an ellipse, with the center 50 pixels over from the left and 50 pixels down from the top, with a width and height of 80 pixels." Click the Run button, which looks like this:

6 Getting Started Example void setup() { size(480, 120); //Open a Display Window } void draw() { if (mousePressed) fill(0); else fill(255); ellipse(mouseX, mouseY, 80, 80); }

7 Getting Started Result

8 Function rect(a, b, c, d) –a (float): x-coordinate of the rectangle by default –b (float): y-coordinate of the rectangle by default –c (float): width of the rectangle by default –d (float): height of the rectangle by default

9 Negative Picture PImage img, new_img; float offset = 0; float easing = 0.05;

10 Negative Picture void setup() { size(640, 480); img = loadImage("vessel1.jpg"); // Load an image into the program new_img = createImage(img.width,img.height, RGB); new_img.copy(img,0,0,img.width,img.height,0,0,img.width,img.height); new_img.loadPixels(); for (int i = 0; i < new_img.height*new_img.width; i++) { new_img.pixels[i] = color(255-red(new_img.pixels[i]), 255-green(new_img.pixels[i]), 255-blue(new_img.pixels[i])); } new_img.updatePixels(); }

11 Negative Picture void draw() { image(img, 0, 0); // Display at full opacity float dx = (mouseX-img.width/2) - offset; offset += dx * easing; tint(255, 126); // Display at half opacity image(new_img, offset, 0); }

12 Negative Picture

13 Run On Android Download Android SDK –http://developer.android.com/sdk/index.htmlhttp://developer.android.com/sdk/index.html Installing your SDK

14 Run On Android Add Android mode to Processing

15 Run On Android In Processing, Change to Android Mode

16 Run On Android Install API 10

17 Run On Android Copy data files to data/ fold –E.g. vessel1.jpg

18 Run On Android Run on Emulator

19 Run On Android Result

20 Run On Android Run on Device –Sketch  Run on Device

21 References http://processing.org/learning/gettingstarted/ http://www.instructables.com/id/Arduino-to- Processing-Serial-Communication-withou/http://www.instructables.com/id/Arduino-to- Processing-Serial-Communication-withou/ http://www.processing.org/reference/rect_.html http://coopermaa2nd.blogspot.tw/2011/03/proce ssing-arduino.htmlhttp://coopermaa2nd.blogspot.tw/2011/03/proce ssing-arduino.html http://processing.org/tutorials/pixels/ http://processing.org/tutorials/android/


Download ppt "Processing TYWu. Where can I download? 2.0b9 Windows 32-bit."

Similar presentations


Ads by Google