Wool Thread

Wool Thread 1 from Armando Rodriguez on Vimeo.

Jose Armando Rodriguez, Mexico City 2016
Software used: Processing (Punktiert library)and After Effects
This work was inspired on Frei Otto’s research and Daniel Köhler’s implementations.
armyrdz.wordpress.com/

import punktiert.math.Vec;
import punktiert.physics.*;

// world object
VPhysics physics;
ArrayList<VParticleString> strings = new ArrayList<VParticleString>();
int numStrings=150;
int radio = 450;
public void setup() {
smooth();
size(1200, 750,P3D);
// create world object with bouncing behavior
physics = new VPhysics();
physics.setfriction(.0001f);
for (int i=0; i<numStrings; i++) {
float anguloA = random(0, 2*PI);
float anguloB = random(-PI/2, PI/2);
VParticle particleA = new VParticle((cos(anguloB)*cos(anguloA)*radio), (cos(anguloB)*sin(anguloA)*radio), radio*sin(anguloB));
// particleA.isLocked();
VParticle particleB = new VParticle(((-cos(anguloB)*cos(anguloA))*radio), (-cos(anguloB)*sin(anguloA)*radio), -radio*sin(anguloB));
particleB.isLocked();
//create a ParticleString: input: VPhysics, particleA, particleB, resolution, strength
strings.add(new VParticleString(physics, particleB, particleA, .1f, .02f));
physics.addGroup(strings.get(i));
}

for(int i=0; i<numStrings; i++){
float anguloA1 = random(0,2*PI);
float anguloA2 = random(0,2*PI);
float anguloB1 = random(0,2*PI);
float anguloB2 = random(0,2*PI);
float radioR = random(radio/2,radio);
VParticle particleA = new VParticle((cos(anguloB1)*cos(anguloA1)*radioR), (cos(anguloB1)*sin(anguloA1)*radioR), radioR*sin(anguloB1));
//particleA.isLocked();
VParticle particleB = new VParticle(((-cos(anguloB2)*cos(anguloA2))*radioR), (-cos(anguloB2)*sin(anguloA2)*radioR), -radioR*sin(anguloB2));
//particleB.isLocked();
//create a ParticleString: input: VPhysics, particleA, particleB, resolution, strength
strings.add(new VParticleString(physics, particleB, particleA, .1f, .02f));
physics.addGroup(strings.get(i));
}

//BAttractionLocal(float radius, float strength)
physics.addBehavior(new BAttractionLocal(30, 180));
physics.addBehavior(new BCollision());
physics.addBehavior(new BCohesion(30, 1.5f, .9f));
}

public void draw() {
//rectMode(CORNER);
//fill(255,30);
//noStroke();
//rect(0,0,width,height);
background(255);
float sp = 0.002 * frameCount;
camera( 500 *cos(sp), 500 *sin(sp), 500, 0, 0, 0, 0, 0, -1);
stroke(0);
strokeWeight(1);
physics.update();
for (VSpring s : physics.springs) {
line(s.a.x, s.a.y,s.a.z, s.b.x, s.b.y,s.b.z);
}
saveFrame(«screen-####.jpg»);
}

Deja una respuesta

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Salir /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Salir /  Cambiar )

Conectando a %s