Proyecto1imagen
De Casiopea
Título | Proyecto 1 Imagen Escrita |
---|---|
Del Curso | Imagen Escrita 2020 |
Alumno(s) | Antonia Pino Salinas |
URL | https://antoniapinosalinas.github.io/Imagen-Escrita-2020/ |
Repositorio
Página Web
Auto - Retrato
Espiral
Function Draw
Recursión
Ciclo For
Particles
p = []; var nParticles = 10; var slider;
function setup() {
createCanvas(windowWidth, 400); background(100); ellipseMode(CENTER); slider = createSlider(2, 50, 0); slider.position(10, 10); slider.style('width', '200px'); for(var i = 0; i < nParticles; i++) { p[i] = new Particle(); }
}
function draw() {
background(51); noFill(); stroke(255); rect(2, 2, width-4, height-4); for(var i = 0; i < p.length; i++) { for(var j = i + 1; j < p.length; j++) { if(i != j) { p[i].sound(p[j]); } } p[i].update(); p[i].show(); } if(p.length < slider.value()) { p.push(new Particle());
} else if(p.length > slider.value()) { p[p.length - 1].stop(); p.pop(); }
}
Attraction
|url = https://editor.p5js.org/antoniapinosalinas/present/-2cbpvaYv |width = 600 |height = 600 }}