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

Embed Size (px)

DESCRIPTION

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.

Citation preview

Processing TYWu Where can I download?2.0b9 Windows 32-bit 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. Getting Started Windows RUN STOP 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: 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); } Getting Started Result 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 Negative Picture PImage img, new_img; float offset = 0; float easing = 0.05; 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(); } 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); } Negative Picture Run On Android Download Android SDK http://developer.android.com/sdk/index.htmlhttp://developer.android.com/sdk/index.html Installing your SDK Run On Android Add Android mode to Processing Run On Android In Processing, Change to Android Mode Run On Android Install API 10 Run On Android Copy data files to data/ fold E.g. vessel1.jpg Run On Android Run on Emulator Run On Android Result Run On Android Run on Device Sketch Run on Device References Processing-Serial-Communication-withou/http://www.instructables.com/id/Arduino-to- Processing-Serial-Communication-withou/ ssing-arduino.htmlhttp://coopermaa2nd.blogspot.tw/2011/03/proce ssing-arduino.html