Draw a line with a moving 3D vector
in
Programming Questions
•
1 year ago
I've made a flocking sketch in processing, where particles fly around in space.
To make it more interesting I want to draw fading lines out of each particle, but can't seem to figure it out.
The particles looks like this, its a function from the class Particle:
void display() {
stroke(255,0,0);
noFill();
ellipse(loc.x, loc.y, 5, 5);
}
}
stroke(255,0,0);
noFill();
ellipse(loc.x, loc.y, 5, 5);
}
}
Now i want it to draw a line where the ellipse has been, how do i do this?
Is there another way besides making a previousVariable, like pLoc.x and pLoc.y and than with a boolean, that checks if its changed position?
1