Difference between revisions of "Processing"

From air
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
   
 
[http://processingjs.org Processing.JS] est l'adaptation en Javascript de Processing.
 
[http://processingjs.org Processing.JS] est l'adaptation en Javascript de Processing.
  +
  +
[http://code.google.com/p/pyprocessing/ PyProcessing] est un portage de l'API Processing pour Python.
   
 
[[Image:ProcessingExampleSphere.png|300px|thumb|Processing :: Example :: Sphere]]
 
[[Image:ProcessingExampleSphere.png|300px|thumb|Processing :: Example :: Sphere]]
Line 77: Line 79:
 
=Liens=
 
=Liens=
 
* OpenProcessing: site communautaire de scketches Processing http://www.openprocessing.org
 
* OpenProcessing: site communautaire de scketches Processing http://www.openprocessing.org
  +
* Plugin Eclipse ProClipsing http://code.google.com/p/proclipsing/
  +
Quelques démonstrations sympas
  +
** Fireworks http://www.openprocessing.org/visuals/?visualID=10201
  +
** 3D anaglyph shapes http://www.openprocessing.org/visuals/?visualID=10227
  +
 
* Processing.js avec [http://jashkenas.github.com/coffee-script/ CoffeeScript] : http://dry.ly/2011/02/21/coffeescript--processingjs--crazy-delicious/ . '''Note pour le debug:''' sous Google-Chrome utiliser Tools/Developper Tools, sous FireFox utiliser l'extension Firebug.
 
* Processing.js avec [http://jashkenas.github.com/coffee-script/ CoffeeScript] : http://dry.ly/2011/02/21/coffeescript--processingjs--crazy-delicious/ . '''Note pour le debug:''' sous Google-Chrome utiliser Tools/Developper Tools, sous FireFox utiliser l'extension Firebug.
   
Line 84: Line 91:
 
* Ben Fry, [http://oreilly.com/catalog/9780596514556 Visualizing Data : Exploring and Explaining Data with the Processing Environment], O'Reilly Media, December 2007, Print ISBN: 978-0-596-51455-6
 
* Ben Fry, [http://oreilly.com/catalog/9780596514556 Visualizing Data : Exploring and Explaining Data with the Processing Environment], O'Reilly Media, December 2007, Print ISBN: 978-0-596-51455-6
 
* Matt Pearson, [http://zenbullets.com/book.php Generative Art: a practical guide using Processing], Manning 2011. ([http://www.manning.com/pearson/GenArt_source_code.zip source code] et [http://abandonedart.org/ exemples en ligne])
 
* Matt Pearson, [http://zenbullets.com/book.php Generative Art: a practical guide using Processing], Manning 2011. ([http://www.manning.com/pearson/GenArt_source_code.zip source code] et [http://abandonedart.org/ exemples en ligne])
  +
* Daniel Shiffman, [[The Nature of Code]], eBook http://natureofcode.com : ''How can we capture the unpredictable evolutionary and emergent properties of nature in software? ...''

Latest revision as of 09:42, 27 March 2014

Processing est un environnement de développement d'animation en Java simple à mettre en oeuvre. Processing est très populaire en Art génératif et interactif ou pour de la visualisation interactive de données.

La version 2.0 produit

  • des applications standalones (incluant des screensavers),
  • des apps Android (requiert le SDK Android)
  • et des applications Web en JavaScript (requiert WebGL).

Processing.JS est l'adaptation en Javascript de Processing.

PyProcessing est un portage de l'API Processing pour Python.

Processing :: Example :: Sphere
Processing :: Example :: Bouncing Bubbles
Processing :: Example :: Menger Sponge
Processing :: Example :: Cubes in Cube



API

De nombreuses bibliotheques ont été adaptés pour Processing : OpenCV, OpenNI, ...

Serial

La communication entre un programme Processing et une carte Arduino s'effectue par l'intermédiaire la liaison série au-dessus de l'USB et s'effectue simplement au travers de l'utilisation de function série (voir les programmes Processing dans File/Examples/Libraries/Serial).

Ci-dessous le programme SerialDuplex qui permet de tester l'envoi et la reception simple de caractère. A complete par un programme correspondant sur l'Arduino

// Programme SerialDuplex 
import processing.serial.*;

Serial myPort;      // The serial port
int whichKey = -1;  // Variable to hold keystoke values
int inByte = -1;    // Incoming serial data

void setup() {
  size(400, 300);
  // create a font with the third font available to the system:
  PFont myFont = createFont(PFont.list()[2], 14);
  textFont(myFont);

  // List all the available serial ports:
  println(Serial.list());

  // I know that the first port in the serial list on my mac
  // is always my  FTDI adaptor, so I open Serial.list()[0].
  // In Windows, this usually opens COM1.
  // Open whatever port is the one you're using.
  String portName = Serial.list()[0];
  myPort = new Serial(this, portName, 9600);
}

void draw() {
  background(0);
  text("Last Received: " + inByte, 10, 130);
  text("Last Sent: " + whichKey, 10, 100);
}

void serialEvent(Serial myPort) {
  inByte = myPort.read();
}

void keyPressed() {
  // Send the keystroke out:
  myPort.write(key);
  whichKey = key;
}


Face tracking

voir Face Tracking with a Pan/Tilt Servo Bracket

avec une webcam, OpenCV et Arduino


Liens

Quelques démonstrations sympas

Livres