LydiaMACHINA TripleJungle Con Fusión de Flujo


EL PODER DE LA DESIGN MACHINA

En este experimento he intentado mezclar todos los elementos de una de las Design Machinas (o maquinas de diseño) mas potentes que he diseñado hasta el momento: la LydiaMACHINA.

4000 partículas divididas en cuatro campos de flujo de diferentes algoritmos cada uno y obedeciendo a gamas de colores diferentes.

Creo que eso ha sido suficiente para poner a prueba las posibilidades de la maquina de diseño. 

Nota: Puede darse el caso de que su dispositivo móvil no posea fuerza de microprocesador suficiente como para poder mover toda esta “mole” de creatividad. No se preocupe. Es lo mas normal. 

CÓDIGO

//(C)Sergio Salazar Latorre

//LydiaMachinaCFcl TripleJungleV3.0

//La primera DesignMachina con Fusion de Flujo


let nE=1000//numero de elementos

let nS=.9 //escalado de ruido

let nA=1000 //angulo del ruido

let nV=999 //velocidad del ruido

let aMax=500  //edad maxima

let p = Array(nE) //array de particulas

let p2 = Array(nE) //array de particulas

let p3 = Array(nE) //array de particulas

let p4 = Array(nE) //array de particulas


let l=600; //lado 

let n

let L,L2,L3


class LydiaMachina{

  constructor(){

    this.n = "LydiaMACHINA TripleJungle "

  }

  plumas(){

    nE=1000 //numero de elementos

    nS=0.003 //escalado de ruido

    nA=2000 //angulo del ruido

    nV=0.9 //velocidad del ruido

    aMax=500  //edad maxima

    this.n+="Plumas"

  }

  craquelado(){

    nE=1000 //numero de elementos

    nS=0.09 //escalado de ruido

    nA=900 //angulo del ruido

    nV=999999 //velocidad del ruido

    aMax=2000  //edad maxima

    this.n+="Craquelado"

  }

  soulEssence(){

    nE=1000 //numero de elementos

    nS=0.01 //escalado de ruido

    nA=370 //angulo del ruido

    nV=1 //velocidad del ruido

    aMax=2000  //edad maxima

    this.n+="SoulEssence"

  }

  topographic(){

    nE=1000 //numero de elementos

    nS=0.01 //escalado de ruido

    nA=9000 //angulo del ruido

    nV=100 //velocidad del ruido

    aMax=2000

    this.n+="Topographic"

  }

  jungle(){

    nE=1000 //numero de elementos

    nS=0.01 //escalado de ruido

    nA=4000 //angulo del ruido

    nV=100 //velocidad del ruido

    aMax=100  //edad maxima

    this.n+="Jungle"

  }

  jungle2(){

    nE=1000 //numero de elementos

    nS=0.04 //escalado de ruido

    nA=4050 //angulo del ruido

    nV=100 //velocidad del ruido

    aMax=100  //edad maxima

    this.n+="Jungle"

  }

  jungle3(){

    nE=1000 //numero de elementos

    nS=0.5 //escalado de ruido

    nA=3000 //angulo del ruido

    nV=100 //velocidad del ruido

    aMax=200  //edad maxima

    this.n+="Jungle"

  }

}


function setup() {

  L = new LydiaMachina()

  L2 = new LydiaMachina()

  L3 = new LydiaMachina()

  L4 = new LydiaMachina()

  //L.craquelado()

  //L.topographic()

  L.jungle()

  //L.soulEssence()

  createCanvas(l, l); // canvas de lxl

  background(0); //fondo negro

  angleMode(DEGREES) //angulos en grados

  cargar()

  

  L2.jungle2()

  

  cargar2()

  L3.jungle3()

  cargar3()

  L.plumas()

  cargar4()

  firma()

}

function firma(){

   n = L.n +

    int(random(0,12021966)) + 

    "    Dedicado a mi madre con todo mi amor"

}

function draw() {

  stroke(255, map(frameCount, 1, aMax, 0,100))

  push()

  push()

  L = new LydiaMachina()

  for(let i=0; i<nE; i++){

    p[i].dibujarParticula()

  }

  

  L2 = new LydiaMachina()

  L2.plumas()

  for(let i=0; i<nE; i++){

    p2[i].dibujarParticula2()

  }

  

  L3 = new LydiaMachina()

  L3.topographic()

  for(let i=0; i<nE; i++){

    p3[i].dibujarParticula3()

  }

  L4 = new LydiaMachina()

  L4.jungle2()

  for(let i=0; i<nE; i++){

    p4[i].dibujarParticula4()

  }

  pop()


  fill(0,0,255)

  strokeWeight(4)

  stroke(0,255,255)

  text(n,10, l-10)

  pop()

}

class Particula{


  constructor(x,y){

    this.x=x //x

    this.y=y //y

    this.vx=random(-2,3) //velocidad x

    this.vy=random(-3,2) //velocidad y

  }

  color1(){

    return color(0,

                random(200,255),

                0)

  }

  color2(){

    return color(random(0,10),

                random(0,255),

                random(0,255))

  }

  color3(){

    return color(random(200,255),

                random(200),

                random(100))

  }

  color4(){

    return color(200,0,255)

  }

  dibujarParticula(){

    

    strokeWeight(1)

    stroke(this.color1())

    let n=nA*noise(nS*this.x, 

                  nS*this.y)


    this.vy = -cos(n)

    this.vx = sin(n)


    this.x += this.vx

    this.y += this.vy


    if(this.x<0 || this.x>l ||

      this.y<0 || this.y>l){

      this.x=random(0,l)

      this.y=random(0,l)

    }

    point(this.x, this.y)

    

    strokeWeight(0.1)

  }

  dibujarParticula2(){

    

    strokeWeight(1)

    stroke(this.color2())

    let n=nA*noise(nS*this.x, 

                  nS*this.y)


    this.vy = -cos(n)

    this.vx = sin(n)


    this.x += this.vx

    this.y += this.vy


    if(this.x<0 || this.x>l ||

      this.y<0 || this.y>l){

      this.x=random(0,l)

      this.y=random(0,l)

    }

    point(this.x, this.y)

    

    strokeWeight(0.1)

  }

  dibujarParticula3(){

    strokeWeight(1)

    stroke(this.color3())

    let n=nA*noise(nS*this.x, 

                  nS*this.y)


    this.vy = -cos(n)

    this.vx = sin(n)


    this.x += this.vx

    this.y += this.vy


    if(this.x<0 || this.x>l ||

      this.y<0 || this.y>l){

      this.x=random(0,l)

      this.y=random(0,l)

    }

    point(this.x, this.y)

    

    strokeWeight(0.1)

  }

  dibujarParticula4(){

    strokeWeight(1)

    stroke(this.color4())

    let n=nA*noise(nS*this.x, 

                  nS*this.y)


    this.vy = -cos(n)

    this.vx = sin(n)


    this.x += this.vx

    this.y += this.vy


    if(this.x<0 || this.x>l ||

      this.y<0 || this.y>l){

      this.x=random(0,l)

      this.y=random(0,l)

    }

    point(this.x, this.y)

    

    strokeWeight(0.1)

  }


}

function ver(){

  for(let i=0; i<nE; i++){

    p[i].verParticula()

  }

}

function ver2(){

  for(let i=0; i<nE; i++){

    p2[i].verParticula()

  }

}

function ver3(){

  for(let i=0; i<nE; i++){

    p3[i].verParticula()

  }

}


function ver4(){

  for(let i=0; i<nE; i++){

    p4[i].verParticula4()

  }

}

function cargar(){

  for(let i=0; i<nE; i++){

    p[i] = new Particula(random(0,l),

                        random(0,l))

  }

}

function cargar2(){

  for(let i=0; i<nE; i++){

    p2[i] = new Particula(random(0,l),

                        random(0,l))

  }

}function cargar3(){

  for(let i=0; i<nE; i++){

    p3[i] = new Particula(random(0,l),

                        random(0,l))

  }

}



function cargar4(){

  for(let i=0; i<nE; i++){

    p4[i] = new Particula(random(0,l),

                        random(0,l))

  }

}


 


Comentarios

Entradas populares