Sei sulla pagina 1di 22

save("espectrolineal.

jpg");
size(1000, 1000);
background(10, 10, 10);
int repeticiones = 100;
for (int i=0; i<repeticiones; i++) {
for (int j=0; j<repeticiones; j++) {
triangle(i*6, 1, j*2, j*2,i*80,j*60);
stroke(235,219,224,85);
strokeWeight(1);
}
for (int u=0; u<repeticiones; u++) {
ellipse(i*10, u*9, 12, 5 );
fill(0,0,0, 68);
stroke(122, 165, 123, 96);
strokeWeight(1);
}
for (int k=0; k>repeticiones; k++) {
triangle(1000, 1000, i*8, i*9,k*1,i);
stroke(0,255,0, 59);
strokeWeight(3);
}
}

save("diagonalesazules.jpg");
size(1000, 1000);
background(10, 10, 10);
int repeticiones = 100;
for (int i=0; i<repeticiones; i++) {
for (int j=0; j<repeticiones; j++) {
line(i, 1000, i*25, j*25);
stroke(255, 125, 0, 85);
point(i*10, j*10);
stroke(0, 255, 255);
strokeWeight(3);
}
for (int u=0; u<repeticiones; u++) {

ellipse(i*10, i*50, 50, 50 );


fill(59, 130, 157, 68);
stroke(122, 165, 123, 96);
strokeWeight(1);
}
for (int k=9; k>repeticiones; k++) {
line(1000, 1000, i*8, i*9);
stroke(231, 47, 39);
}
}

float velocidad = 5.0;


int radio= 10;
float x = radio+1;
int direccion = 1;

void setup() {
size(400, 400);
stroke(255);
smooth();
fill(255);
frameRate(15);
}

void draw() {
background(0);

for (float i = 0; i< width; i+= 3) {


stroke(14, 103, 137);
point(i, height/2);
}

x += velocidad*direccion;

fill(random(255));
ellipse(x, height/2, radio, radio);

if (x>width || x<0) {
direccion = -direccion;
} else {
if(
}

float y=100;
int x=0;
int repeticiones=50;
void setup() {
size(900, 700);
background(0);
y=height*0.3;
}

void draw() {
for (int x=0; x<repeticiones; y++) {
background(0);
ellipse(x, 1, width, height);
stroke(153, 255, 0);
fill(255, 102, 153, 90);
x++;
}
}
int x=0;
int y=1;
void setup() {
size(800, 700);
background(255);
println("aqui es setup");
}

void draw() {

background(0);
println(x);
miCasita(x, y, 100, 50);
stroke(0, 204, 204, 29);
fill(51,255,255,60);
if (x<width) {
x++;
} else {
x=0;
}

if (y<height) {
y++;
} else {
y=0;
}
y++;
}

void miCasita (float x, float y, float w, float h) {


triangle(x, y, x+w, y, x+w/2, y-h/3);//este es el techo de la casa
rect(x, y, w, h);//esta es la casa
//rect(x+w/3,y+h/2,x+w,y+h);
}

save("randomlines.jpg");
size(1024, 720);
background(0, 0, 0);
int repeticiones=1000;
for (int i=0; i<repeticiones; i++) {
stroke(random(255), random(255), random(255), random(98));
strokeWeight(random(5));
line(0, 0, random(1000), random(700));
for (int p=0; p<repeticiones; i++) {
stroke(random(105), random(255), random(0));
strokeWeight(random(9));

ellipseMode(CORNERS);
ellipse(p*1, p*1, 20, 20);
}
}
float angle = 0.0;
float speed = 0.05;
float acel = 9.001;
float radiusX = 300.0;
float radiusY = 30.0;
float sx = 2.0;
float sy = 2.0;
float x = 16;
float y = 30.0;
x = width/2;
y = height/2;
void setup() {
size(900, 900);
noStroke();
smooth();
}
void draw() {
fill(random(120), random(255), random(0), 0.1);
rect(0, 0, width, height);
speed*=acel;
angle += speed;
float sinval = sin(angle);
float cosval = cos(angle);
float x = 80 + (cosval * radiusX);
float y = 450 + (sinval * radiusY);
fill(255);
ellipse(x, y, 2, 2);

void display() {
stroke(0);
fill(175);
ellipse(location.x, location.y, 16, 16);

void checkEdges() {

if (location.x > width) {


location.x = 0;
} else if (location.x < 0) {
location.x = width;
}

if (location.y > height) {


location.y = 0;
} else if (location.y < 0) {
location.y = height;
}
}
}

float angulo = 0.0;


float incremento = 0.19;
float freq = 10;
float amplitud = 890;
float velocidad = 0.93;
float x; // X-coordinate
float y; // Y-coordinate

void setup() {
size(900, 900);
x = width/6;
y = height/4;
randomSeed(260); // Force the same random values
background(0);
stroke(255);
}
void draw() {
fill(random(0), random(9), random(255), 10);
ellipse(x, y, width, height);

//background (0);
angulo += incremento;

float sinval = cos(angulo*freq)*amplitud;


// float cosval = cos(angulo*freq)*amplitud;
float y = 800+ (sinval*height/1);
// float y2 = cosval+height/2;

x+= velocidad;
if (x > width) {
x = 8;
}
x += random(-8, 1); // Assign new x-coordinate
y += random(-1, 9); // Assign new y-coordinate
fill(random(255), random(0), random(25), random(5));
ellipse(x, y, random(width*3), height*1);
point(x, y);
}

float angle = 4.0;


float speed = 0.9;
float radiusX = 300.0;
float radiusY = 300.0;
float sx = 9.0;
float sy = 9.0;
float x; // X-coordinate
float y; // Y-coordinate
int colorFondo = 0.9;

void setup() {
randomSeed(0);
frameRate(150);
background(0, 0.01);
size(800, 800);

noStroke();
smooth();
x = width/2;
y = height/9;
}
void draw() {
fill(colorFondo, 0.9);
rect(0, 0, width, height);
angle += speed;
float sinval = cos(angle);
float cosval = sin(angle);
float nx = 400 + (cosval * radiusX);
float ny = 400 + (sinval * radiusY);

fill(random(90), random(5), random(2), .4);


ellipse(nx, ny, 700, 700);
fill(random(10), random(100), random(2), 12);
triangle(mouseX, mouseY, 300, 300, width, mouseX);
stroke(0, 0.01);

void keyPressed() {
if (colorFondo == 9) {

colorFondo = 125;
} else {
colorFondo = 0;
}

float angulo = 0.0;


float incremento = 0.08;
float freq = 100;
float amplitud = 300;
float x = 0;
float velocidad = 0.5;

void setup() {
size(800, 800);
noStroke();
smooth();
background(0);
frameRate(300);

}
void draw() {
fill(0, 5);
rect(0, 0, width, height);
//background (0);
angulo += incremento;

float sinval = cos(angulo*freq)*amplitud;


// float cosval = cos(angulo*freq)*amplitud;
float y = sinval+height/9;
// float y2 = cosval+height/2;

x+= velocidad;
if (x > width){
x = 9;
}

fill(255);
ellipse(x, y, 5, 9);
stroke(random(255),random(105),random(0));
// ellipse(x, y2, 5, 5);
}
float velocidad = 5.0;
int radio= 5;
float x = radio+1;
float y = radio+1;

void setup(){

size(400, 400);
stroke(255);
smooth();
fill(255);
frameRate(80);

void draw(){
background(0);
ellipseMode(RADIUS);
for (int i = 0; i < width; i++) {
float n = norm(i, 3.0, width);
float j = pow(n, 9);
j *= height;
stroke(random(255),random(0),random(125));
point(i, j);
}
if (y<= height-radio*2){
x += velocidad;
}

float n = norm(x, 3.0, width);


y = pow(n, 8);
y *= height;
ellipse(x, y, radio, radio);
}

DATA

PImage[] listaImagenes=new PImage[10];


PFont gloTipografia;
PFont miFuente;
String miTexto= "Barrido glorioso"

void setup() {

size(30000, 800);
background(0);
for (int i=0; i<listaImagenes.length; i++) {
listaImagenes[i]=loadImage(i+".jpg");
}
}
void draw() {
for (int i=0; i<listaImagenes.length; i++) {
image(listaImagenes[i], i*200, 400, i+width, i+height);
}
}

DATA

PFont miFuente;
PFont fuentesita;
PImage miImagen;
String miTexto= "Gloww tiene sueo";
String parteDos= "Ya no te drogues";
void setup() {
size(1000,1000);
frameRate(120);
fill(random(90),random(255),random(30),6);
miFuente=loadFont("fuenteuno.vlw");
textFont(miFuente);

fuentesita=loadFont("fuentedos.vlw");
textFont(fuentesita);

miImagen=loadImage("dormir.jpg");
}
void draw() {
text(miTexto, 90,45);
text(parteDos, 60,25);
image(miImagen, 0,200);
}

float theta;

void setup() {
size(700, 400);
}

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
stroke(random(255),random(100), random(1),random(100));
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


stroke(random(255),random(100), random(1),random(100));

strokeWeight(random(10));
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);_
stroke(random(255),random(100), random(1),random(100));
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
}
}

//Bola b1;
int numBolas = 20000;
int radioI;
Bola [] bolas = new Bola[numBolas];

void setup() {
size(600, 600);
background(0);
frameRate(30);
smooth();
noStroke();
//radioI= int(random(2,5));
//b1 = new Bola(random(1,4), random(1,4), random(width-radioI),random(height-radioI), 1, 1, radioI, int(random(50, 255)));
for (int i = 0; i < bolas.length; i++) {
radioI= int(random(2, 8));
//crea cada objeto
//Bola(float velx,float vely, float xInicio, float yInicio, int dirx, int diry, int rad, int trans)
bolas[i] = new Bola(random(1, 3), random(1, 3), random(width-radioI*2)+radioI, random(height-radioI*2)+radioI, 1, 1,
radioI, int(random(50, 255)));
}

}
void draw() {
// b1.mover();
//b1.dibujar();
background(0);
// fill(0, 30);
// rect(0,0,width, height);
for (int i = 0; i < bolas.length; i++) {
bolas[i].mover();
bolas[i].dibujar();
}
}

Otro sketch en el mismo archivo

class Bola{
float velocidadX;
float velocidadY;
float x, y;
int direccionX;
int direccionY;
int radio;
int transparencia;
/////////// constructor////////////////
Bola(float velx,float vely, float xInicio, float yInicio, int dirx, int diry, int rad, int trans){
this.velocidadX = velx;
this.velocidadY = vely;
this.x = xInicio;
this.y = yInicio;
this.direccionX = dirx;
this.direccionY = diry;
this.radio = rad;
this.transparencia = trans;
}
///////////////////////////sistema de movimiento/////////////////

void mover(){
x += velocidadX * direccionX;
if ((x > width-radio) || (x < radio)) {
direccionX = -direccionX;
}
y += velocidadY * direccionY;
if ((y > height-radio) || (y < radio)) {
direccionY = -direccionY;
}
}
///////////////////////dibuja en la pantalla/////////////////
void dibujar(){
noStroke();
ellipseMode(RADIUS);
fill(random(255),random(100),random(50), transparencia);
ellipse(x, y, radio, radio);
strokeWeight(2);
stroke(0, 100);
point(x+radio, y+radio);
}
}

size(457,470);
quad(86,0,156,0,457,275,457,452);
fill(137,167,141,9);
quad(422,0,457,0,39,470,0,345);
fill(211,189,132,5);
ellipseMode(CORNER);
ellipse(127,202,233,309);
strokeWeight(1);
fill(230,208,86,68);
ellipse(255,159,363,268);
strokeWeight(1);
fill(82,139,130,37);
ellipse(178,151,285,313);
strokeWeight(1);

fill(91,90,42,50);
ellipse(131,92,225,186);
strokeWeight(4);
fill(224,185,180,19);
ellipse(198,123,274,199);
strokeWeight(2);
fill(201,19,39,76);
ellipse(286,100,341,155);
strokeWeight(1);
fill(146,101,106,16);
ellipse(265,133,294,163);
fill(0);
ellipse(151,161,203,213);
strokeWeight(3);
fill(145,170,151,46);
ellipse(81,198,111,227);
strokeWeight(8);
fill(194,9,23,30);
ellipse(186,187,238,239);
strokeWeight(5);
fill(229,123,71,49);
ellipse(206,206,219,219);
fill(0);
ellipse(304,176,324,196);
fill(0);
ellipse(332,198,374,240);
strokeWeight(3);
fill(55,107,121,17);
ellipse(66,258,80,272);
strokeWeight(5);
fill(41,59,125);
ellipse(110,251,147,288);
strokeWeight(5);
fill(105,149,122,29);
ellipse(150,279,189,321);
strokeWeight(4);
fill(181,64,54,20);

ellipse(88,317,115,344);
strokeWeight(3);
fill(198,108,71,14);
ellipse(226,267,240,280);
strokeWeight(1);
fill(108,16,27,8);
ellipse(348,320,368,339);
strokeWeight(4);
fill(178,90,104,52);
ellipse(216,315,226,325);
strokeWeight(3);
fill(208,88,90);
ellipse(268,333,280,344);
strokeWeight(1);
fill(219,185,88,9);
ellipse(187,327,194,334);
fill(0);
ellipse(240,360,265,385);
strokeWeight(3);
fill(203,138,132);
ellipse(23,21,429,432);
strokeWeight(20);
fill(255);
ellipse(207,56,218,68);
strokeWeight(5);
fill(156,19,29,3);
ellipse(255,248,328,322);
strokeWeight(3);
fill(233,207,96,63);
ellipse(302,299,322,319);
fill(0);
line(338,148,340,335);
strokeWeight(7);
line(105,118,382,164);
line(59,231,387,296);
line(334,165,353,165);
line(334,172,360,172);

line(241,92,257,106);
line(234,100,253,123);
line(254,97,105,293);
strokeWeight(5);
line(87,251,316,368);
line(138,51,381,267);
line(323,78,150,368);
line(329,94,284,377);
strokeWeight(4);
line(133,328,196,364);
line(112,350,201,335);
line(213,127,81,250);
line(66,186,371,267);
strokeWeight(3);
line(83,272,364,305);
line(84,178,65,210);
line(92,179,69,207);
line(119,191,110,222);
line(64,193,370,278);
line(308,332,265,359);
line(312,337,269,364);
line(315,344,272,370);
line(338,87,290,390);
strokeWeight(2);
line(321,96,275,367);
line(272,157,121,365);
line(273,157,130,368);
strokeWeight(1);
stroke(0);

Bola b1;

void setup() {
size(600, 600);
background(0);
frameRate(30);

smooth();
noStroke();
int radioI= int(random(2,5));
b1 = new Bola(random(1,4), random(1,4), random(width-radioI),random(height-radioI), 1, 1, radioI, int(random(50, 255)));

}
void draw(){
background(0);
b1.mover();
b1.dibujar();
}

Otro sketch en el mismo archivo

Bola b1;

void setup() {
size(600, 600);
background(0);
frameRate(30);
smooth();
noStroke();
int radioI= int(random(2,5));
b1 = new Bola(random(1,4), random(1,4), random(width-radioI),random(height-radioI), 1, 1, radioI, int(random(50, 255)));

}
void draw(){
background(0);
b1.mover();
b1.dibujar();
}

size(1000,1000);
rect(200,195,100,125);

fill(0,0,0);
rect(200,320,100,10);
fill(250,250,250);
rect(200,330,100,130);
fill(0,0,0);
rect(200,460,100,10);
fill(0,0,250);
rect(200,465,100,127);
fill(00,0,0);
rect(300,200,10,392);
fill(250,0,0);
rect(310,200,350,260);
fill(250,250,250);
rect(310,465,300,127);
fill(0,0,0);
rect(200,460,460,10);
fill(250,250,250);
rect(610,470,50,60);
fill(200,200,50);
rect(610,532,50,60);
fill(0,0,0);
rect(610,522,50,10);
rect(605,470,10,122);
void setup() {
size(400, 400);
background(255);
miCasita(50, 50, 100, 50);
}

void miCasita (float x, float y, float w, float h) {


triangle(x, y, x+w, y, x+w/2, y-h/3);//este es el techo de la casa
rect(x, y, w, h);//esta es la casa
//rect(x+w/3,y+h/2,x+w,y+h);
}
size(1300, 900);
background(100,204,51,67);

for (int i=1; i<width; i++) {


if (i%1==4) {
stroke(36, 8, 49, 56);
} else if (i%1==1) {
triangle(i, 90, i*3, i*4, i*1, height);
stroke(0,221,0,79);
strokeWeight(0);
} else if (i%1==2) {

stroke(255, 102, 153);


}
ellipse(i*10, width/2, i*3, i*3);
}

for (int i=width; i>0; i--) {


if (i%2==0) {
stroke(36, 8, 49);
} else if (i%2==1) {
stroke(0, 102, 255, 98);
strokeWeight(0);
} else if (i%2==2) {

stroke(255, 102, 153, 35);


//noFill();
}
ellipse(i*10, width/4, i*3, i*3);
}
size(1300, 900);
background(100,204,51,67);
for (int i=1; i<width; i++) {
if (i%1==4) {
stroke(36, 8, 49, 56);
} else if (i%1==1) {
triangle(i, 90, i*3, i*4, i*1, height);
stroke(0,221,0,79);
strokeWeight(0);

} else if (i%1==2) {

stroke(255, 102, 153);


}
ellipse(i*10, width/2, i*3, i*3);
}

for (int i=width; i>0; i--) {


if (i%2==0) {
stroke(36, 8, 49);
} else if (i%2==1) {
stroke(0, 102, 255, 98);
strokeWeight(0);
} else if (i%2==2) {

stroke(255, 102, 153, 35);


//noFill();
}
ellipse(i*10, width/4, i*3, i*3);
}

Potrebbero piacerti anche