Particle p[]; PImage img; PGraphics pg; int X, Y; void setup() { size(500, 660); smooth(); img = loadImage("http://i.imgur.com/Z7HQk5O.png"); smooth(); pg = createGraphics(width, height, P2D); pg.beginDraw(); pg.background(#111111); pg.endDraw(); X = int(random(50, width-50)); Y = int(random(50, height-50)); p = new Particle[2000]; for (int i=0; i<p.length; i++) p[i] = new Particle(i/5000.0, random(width), random(height)); } void draw() { if (frameCount % 200 == 0) { X = int(random(50, width-50)); Y = int(random(50, height-50)); } pg.beginDraw(); pg.fill(0, 15); pg.noStroke(); pg.rect(0, 0, width, height);//fade background pg.stroke(#f012be); for (int i=0; i<p.length; i++) p[i].update(); pg.endDraw(); if(pg.width>0) image(pg, 0, 0,width,height); if(img.width>0) image(img, 0, 0); } void mouseMoved() { X = mouseX; Y = mouseY; frameCount = 1; } void keyPressed() { saveFrame("####.png"); } class Particle { float id, x, y, px, py, speed, n; Particle(float _id, float _x, float _y) { id = _id; x = px = _x; y = py = _y; speed = random(2, 7); } void update() { id += 0.01; n = (noise(id, x / Y, y / Y) - 0.5) * X; x += cos(radians(n)) * speed; y += sin(radians(n)) * speed; if (x < -1) x = px = width + 1; else if (x > width + 1) x = px = -1; if (y < -1) y = py = height + 1; else if (y > height + 1) y = py = -1; pg.line(px, py, x, y); px = x; py = y; } }
PROCESSING LYON #05 NIVEAU INITIATION QUOI? Processing est un langage de programmation simple permettant de faire du graphisme génératif, du motion design, de la visualisation de données, de la conception 3D, du prototypage d’objet, de l’architecture, des simulations physiques, du HTML5, des applications mobiles, des installations interactives et bien plus encore. POUR QUI? Graphistes, designers, architectes, artistes numérique, bidouilleurs en informatique… Pour cet atelier, aucune base en programmation n’est nécessaire. AU PROGRAMME: - Géométries de base - Variables - Boucles et conditions - Méthodes - Tableaux - Interaction - Graphisme génératif - Visualisation de données QUAND? Samedi 24 Janvier 2015 De 10H00 à 17H30 OÙ? Atelier des Médias 9 Quai André Lassagne, Lyon 1er TARIF: 30€ (règlement sur place par chèque ou espèces) REQUIS: Votre ordinateur. Merci de télécharger Processing pour ne pas perdre trop de temps en début de journée. RENSEIGNEMENT: [email protected] INSCRIPTIONS: http://p5lyon.tumblr.com/p5lyon05


















