Top Banner
Processing 3D Printing Barcelona Ateneu de Fabricació - Barcelona 15/01/2014
62
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Processing

Processing3D Printing BarcelonaAteneu de Fabricació - Barcelona

15/01/2014

Page 2: Processing

Processing is a programming language, development environment, and online community. Since 2001,

Processing has promoted software literacy within the visual arts and visual literacy within technology.

Page 3: Processing

Processing showcase http://www.processing.org/exhibition/

Page 4: Processing

Data VisualizationGenerative Art

Visual PerformancesInteractive Artworks

App Prototyping

Page 5: Processing

Arduino Video GamesVideo Mapping

3D PrintingLearn Programming

Page 6: Processing
Page 7: Processing

http://abandonedart.org

Page 8: Processing
Page 10: Processing

ModelbuilderMk2, a geometry library for Processinghttp://workshop.evolutionzone.com/modelbuilder/

Page 11: Processing
Page 12: Processing

Primeros pasos

Page 13: Processing
Page 14: Processing

Linea - Recta - Rectángulo - Elipse

Page 15: Processing

Centro de origen de la forma

Page 16: Processing

First Challenge - Easy

size(200, 200);rectMode(CENTER);rect(100,100,20,100);ellipse(100,70,60,60);ellipse(81,70,16,32); ellipse(119,70,16,32); line(90,150,80,160);line(110,150,120,160);

Page 17: Processing
Page 18: Processing

Reference

http://processing.org/reference/

Page 19: Processing

size()

Page 20: Processing
Page 21: Processing

Color

Page 22: Processing

Trazo (stroke)

RELLENO (FILL)

stroke( );fill( );rect(250, 200, 100, 75);

QUé valoresponemos de COLOR?

Page 23: Processing

ESCALA DE GRISES

Page 24: Processing

Si dibujamos dos formas, processing siempre usará la última especificación de relleno y trazo, leyendo el código de arriba a

abajo

Page 25: Processing

COLOR RGB

Page 26: Processing
Page 27: Processing

COLOR SELECTOR

Page 28: Processing
Page 29: Processing
Page 30: Processing

TRANSPARENCIAValor Alpha contempla un valor que va desde el 0 al 255, donde 0

es igual a una transparencia total y 255 corresponde a una opacidad completa.

Page 31: Processing

Second Challenge - Easy

Page 32: Processing

Interacción

Animación

Page 33: Processing

fill(#D10D51);ellipse(292, 58, 20, 20);fill(#E8CC2A);ellipse(250, 130, 20, 20);fill(#934A2F);ellipse(364, 120, 25, 25);fill(#ADFFCD);quad(124, 168, 40, 256, 64, 172, 148, 88);quad(124, 168, 40, 256, 160, 336, 244, 248);quad(124, 168, 244, 248, 264, 164, 148, 88);fill(#2E1479);ellipse(95, 170, 20, 20);fill(#25AD33);ellipse(190, 165, 20, 20);fill(#892537);ellipse(124, 276, 20, 20);fill(#0E208E);ellipse(164, 232, 20, 20);fill(#FFFFB4);quad(260, 220, 196, 196, 316, 156, 392, 176);quad(260, 220, 196, 196, 216, 328, 284, 356);quad(260, 220, 284, 356, 416, 316, 392, 176);fill(#D10D51);ellipse(292, 58, 20, 20);fill(#E8CC2A);ellipse(250, 130, 20, 20);fill(#934A2F);ellipse(364, 120, 25, 25);fill(#ADFFCD);quad(124, 168, 40, 256, 64, 172, 148, 88);quad(124, 168, 40, 256, 160, 336, 244, 248);quad(124, 168, 244, 248, 264, 164, 148, 88);fill(#2E1479);ellipse(95, 170, 20, 20);fill(#25AD33);ellipse(190, 165, 20, 20);fill(#892537);ellipse(124, 276, 20, 20);fill(#0E208E);ellipse(164, 232, 20, 20);fill(#FFFFB4);quad(260, 220, 196, 196, 316, 156, 392, 176);quad(260, 220, 196, 196, 216, 328, 284, 356);quad(260, 220, 284, 356, 416, 316, 392, 176);

Page 34: Processing

Ponemos aquella parte del código que sólo se ejecutará una vez al principio

SETUP

DRAWPonemos aquella parte del código que se ejecutará en bucle, una y otra vez, hasta la finalización del programa

* Le asistentes asombrados por la verdad finalmente revelada

Page 35: Processing

SETUP

DRAW

void setup ( ) {

}

void draw ( ) {

}

size(width, height);

background(0);

fill( );

stroke( );

rect( );

...

Page 36: Processing

SETUP

DRAW

Page 37: Processing

¿Dónde está la animación? ¿Los efectos especiales? ¿La interacción?

Page 38: Processing

SETUP

DRAW

En cada iteración, la elipse y el rectángulo tienen la misma posición, el mismo color de relleno y de contorno

¿Qué oCURRE?

¿Alguna solución?Processing se reserva para él algunos nombres, por ejemplo mouseX, mouseY, que indican la posición del cursor

ellipse(mouseX, mouseY, 300, 300);

Page 39: Processing
Page 40: Processing

LEt’s DO AN EXPERIMENT

Definimos el fondo del “canvas” dentro del bloque setup()

Comentamos la función background();

Cambiamos el ancho y alto de la figura ellipse();

Page 41: Processing

LEt’s DO A BOUNCING BALL

Page 42: Processing

ellipse( , ,16,16);

float x = 100;float y = 100;

ellipse(x,y,32,32);

float xspeed = 1;float yspeed = 3.3;

xspeed

yspeed

Page 43: Processing

xspeed

yspeed

Page 44: Processing

Decisiones

Page 45: Processing

CONDITIONAL STATEMENT

if(_________) {

}

MY Question

TRUE

Page 46: Processing

if(_________) {

}

x>width or x <0

xspeed = xSPEED * -1

if(_________) {

}

Y>HEIGHT or Y<0

Yspeed = YSPEED * -1

Page 47: Processing

if(_________) {

}

mousepressedx = mouseXY = MOUSEY

Page 48: Processing

CONDITIONAL STATEMENT (II)if(_________) {

} else {

}

TRUE

FALSE

MY Question

Page 50: Processing

Azar e indeterminación(/r)

Page 51: Processing
Page 52: Processing

RANDOM ELLIPSeS

¿Por qué no funcionaría dentro del draw();?

Page 54: Processing
Page 55: Processing
Page 56: Processing

Fourth Challenge - Medium

Page 57: Processing

Publicar/compartir

Page 58: Processing
Page 59: Processing

Tweak mode depends on "oscP5" library and will complain if you don't have it installed. Go ahead and install this library by going to the "Sketch" menu. click on "Import Library..." --> "Add Library..." and select "oscP5" from the list.

Built with Processing and Processing.js

Page 60: Processing
Page 61: Processing

Processing - 3D Printing