miércoles, 2 de noviembre de 2011

codigo



codigos con fotos.


PImage img;
float speed =2.5;
int diameter =20;
float x;
float y;

void setup(){
size(240,120);
img =loadImage("s.jpg");
smooth();
x=width/2;
y=height/2;

}
void draw(){
image(img,0,0,240,120);
//background(204);
x += random(-speed,speed);
y += random (-speed,speed);
translate(mouseX,mouseY);
ellipse (x,y,diameter,diameter);

}

martes, 1 de noviembre de 2011

modificaciones

principalmente quiero lograr modificar este código... integrándote alguna forma para que se cree una interactividad desde una cámara web o de sonido.

Lo principal es introducir a este código algo con sonido ya que tiene mas que ver con el tema al que me estoy refiriendo

código de examen


/**
* Recursive Tree
* by Daniel Shiffman.
*
* Renders a simple tree-like structure via recursion.
* The branching angle is calculated as a function of
* the horizontal mouse location. Move the mouse left
* and right to change the angle.
*/
float theta;

void setup() {
size(640, 360);
smooth();
}

void draw() {
background(0);
frameRate(30);
stroke(255);
// Let's pick an angle 0 to 90 degrees based on the mouse position
float a = (mouseX / (float) width) * 90f;
// Convert it to radians
theta = radians(a);
// Start the tree from the bottom of the screen
translate(width/2,height);
// Draw a line 120 pixels
line(0,0,0,-120);
// Move to the end of that line
translate(0,-120);
// Start the recursive branching!
branch(120);

}

void branch(float h) {
// Each branch will be 2/3rds the size of the previous one
h *= 0.66;
// All recursive functions must have an exit condition!!!!
// Here, ours is when the length of the branch is 2 pixels or less
if (h > 2) {
pushMatrix(); // Save the current state of transformation (i.e. where are we now)
rotate(theta); // Rotate by theta
line(0, 0, 0, -h); // Draw the branch
translate(0, -h); // Move to the end of the branch
branch(h); // Ok, now call myself to draw two new branches!!
popMatrix(); // Whenever we get back here, we "pop" in order to restore the previous matrix state
// Repeat the same thing, only branch off to the "left" this time!
pushMatrix();
rotate(-theta);
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
}
}

miércoles, 5 de octubre de 2011

Descripción ante-royecto


1.- Descripcion: (materiales, medidas, etc.)

Mi idea principal es crear la evolución que tiene los arboles, desde lo mas mínimo hasta llegar a la plenitud de éste, de mi árbol principalmente, el que crearé en processing.

El trasfondo principal es dar importancia a aquellas cosas simples de las que mas me rodeo, por el lugar donde vivo y así darle suma importancia a los arboles que observo y darme la motivación para crear un proyecto que me deje satisfecha.

Crear un registro fotográfico con arboles de mi vida cotidiana en el lugar donde vivo, los cuales tengan una forma interesante.

Crear diferentes cuadros del un mismo código, o sea hacer evidencia en papel de lo que haré en processing. Junto a un computador que este evidenciando el proceso que quiero llevar acabo.



2.- Fundamentacion: (referentes, citas, imágenes, autores, artistas, conceptos, etc.)
En openprocessing hay muchas ejemplo de esto, no exactamente de lo que quiero hacer pero si de la idea general.

http://www.openprocessing.org/visuals/?visualID=4162
http://www.openprocessing.org/visuals/?visualID=10318

http://www.openprocessing.org/collections/?collectionID=19


3.- Objetivos:

Sensibilizar al espectador, y evidenciar el proceso o el crecimiento de un arbol, la calma de éste, evidencia de un movimiento lento y delicado.


lunes, 26 de septiembre de 2011

Robot


size(500,500);
smooth();
strokeWeight(2);
background(6, 216, 70);
ellipseMode(RADIUS);

fill(245, 247, 40);
ellipse(426,263,45,45);
line(426,274,277,110);
fill(0);

fill(42, 250, 193);

ellipse(430,248,5,5);
ellipse(296,130,4,4);
ellipse(305,162,3,3);

stroke(0);
line(276,357,276,162);
line(286,357,286,162);

noStroke();
fill(0); //setea relleno a gris
ellipse(264,377,90,90);
fill(5,97,199);
ellipse(264,377,80,80);
fill(79,247);
ellipse(264,377,70,70);
fill(247, 40, 167);
rect(224,257,90,90);
fill(247, 176, 40);
rect(224,150,90,90);
fill(33, 162, 72);
rect(223,274,90,6);



miércoles, 31 de agosto de 2011

tarea 3*




void setup() {
size(900,600);

smooth();
}

void draw() {
line (pmouseX, pmouseY, mouseX, mouseY);

ellipse(18,30,20,30);
ellipse (60,70,90,100);
ellipse(50,50,20,60);

fill(10,40,24);
rectMode(CENTER);
fill(mouseY, 190, mouseX);
noStroke();
rect(mouseX, mouseY, 20, 20);

}