Tal Dotan & Martin G-Miro
“It's not where you take things from — it's where you take them to.” - Jean-Luc Godard
Using the PROCESSING software, the project is a visual sequence of code instruction records, exploring the relationship
between vector field and a group of particles. The drawings are created while observing a group of individual particles
traces immerging in to a pattern that acts as one organized system
The code creates a range of flow fields visuals (imitating fog or water flow) , and based on the
“perlin noise” rule
All of the drawings made out of the same code with some parameters modifications between each trail: the particles
variables are gravity, acceleration and speed. The field variables are: scale, degree of curviness amount of particles
and their starting position
Every time the code runs it reviles a different and un expected pattern and visual. The goal of the project is to
understand the behavior in a way that enables as much control as possible in the random process
“Nothing is original. Steal from anywhere that resonates with inspiration or fuels your imagination......
Select only things to steal from that speak directly to your soul. If you do this, your work (and theft)
will be authentic. Authenticity is invaluable; originality is non-existent. And don’t bother concealing
your thievery" -Jim Jarmusch.
—————————————————————————————————————————————————————————————————-
import processing.pdf.*;
float inc = 20;
int scl = 5;
float zoff = 0;
int cols;
int rows;
int nn = 0;
int noOfPoints = 50000;
Particle[] particles = new Particle[noOfPoints];
PVector[] flowField;
void setup() {
//size(1920, 1080, P2D);
fullScreen();
beginRecord(PDF, “everything22.pdf”);
orientation(LANDSCAPE);
background(255);
//hint(DISABLE_DEPTH_MASK);
cols = floor(width/scl);
rows = floor(height/scl);
flowField = new PVector[(cols*rows)];
for (int i = 0; i < noOfPoints; i += 1) {
particles[i] = new Particle(new PVector(random(400, 410), random(500, 510)));
}
for (int i = 1; i < noOfPoints; i += 2) {
particles[i] = new Particle(new PVector(random(600, 610), random(500, 510)));
}
for (int i = 1; i < noOfPoints; i += 3) {
particles[i] = new Particle(new PVector(random(800, 810), random(500, 510)));
}
}
void draw() {
//fill(0,7);
//rect(0,0,width,height);
//noFill();
float yoff = 0;
for (int y = 0; y < rows; y++) {
float xoff = 0;
for (int x = 0; x < cols; x++) {
int index = (x + y * cols);
float angle = noise(xoff, yoff, zoff)*random(10, 20);
// PVector v = PVector.fromAngle(angle);
// float angle = random(360);
PVector v = PVector.fromAngle(angle);
v.setMag(0.01);
flowField[index] = v;
/* stroke(0, 001);
pushMatrix();
translate(x*scl, y*scl);
rotate(v.heading());
line(0, 0, scl, 0);
popMatrix(); */
xoff = xoff + inc;
}
yoff = yoff + inc;
}
zoff = zoff + (inc / 50);
for (int i = 0; i < particles.length; i++) {
particles[i].follow(flowField);
particles[i].update();
particles[i].edges();
particles[i].show();
}
}
//void keyPressed()
//{
//save(“talcoke2” + str(nn) + “.jpg”);
//nn += 1;
//}
void keyPressed() {
if (key==’q’) {
endRecord();
exit();
}
}
class Particle {
PVector pos = new PVector(random(400,420),random(680,700));
//PVector pos = new PVector(random(width),height /2);
PVector vel = new PVector(0,0);
PVector acc = new PVector(0,0);
float maxSpeed = (001);
PVector prevPos = pos.copy();
Particle(PVector pos){
this.pos = pos;
}
public void update() {
vel.add(acc);
vel.limit(maxSpeed);
pos.add(vel);
acc.mult(1);
}
public void follow(PVector[] vectors) {
int x = floor(pos.x / scl);
int y = floor(pos.y / scl);
int index = (x-1) + ((y-1) * cols);
// Sometimes the index ends up out of range, typically by a value under 100.
// I have no idea why this happens, but I have to do some stupid if-checking
// to make sure the sketch doesn’t crash when it inevitably happens.
//
index = index – 1;
if(index > vectors.length || index < 0) {
//println(“Out of bounds!”);
//println(index);
//println(vectors.length);
index = vectors.length – 1;
}
PVector force = vectors[index];
applyForce(force);
}
void applyForce(PVector force) {
acc.add(force);
}
public void show() {
stroke(0);
strokeWeight(0.005);
point(pos.x, pos.y);
}
public void updatePrev() {
prevPos.x = pos.x;
prevPos.y = pos.y;
}
public void edges() {
if (pos.x > width) {
pos.x = width;
updatePrev();
}
if (pos.x < 0) {
pos.x = 0;
updatePrev();
}
if (pos.y > height) {
pos.y = height;
updatePrev();
}
if (pos.y < 0) {
pos.y = 0;
updatePrev();
}
}
}