Hey, I'm having trouble with my rotation sketch. It's part of an audio reactive one I'm making but I've just attached the basic one for now. When it rotates, it moves round the top left corner rather than them all rotating round the centre.
You may need to move your mouse around to find the points at first.
Any ideas on how to fix this?
PFont font;
final static byte FPS = 30;
final static int maxDots = 700;
final static ArrayList<PVector> dotList = new ArrayList<PVector>();
final static ArrayList<PVector> targetPosList = new ArrayList<PVector>();
final static ArrayList<PVector> currentPos = new ArrayList<PVector>();
float distance;
PVector center;
void setup() {
size(displayWidth, displayHeight, OPENGL);
smooth(6);
noCursor();
background(255);
frameRate(FPS);
strokeWeight(1);
font = createFont("Arial Bold",48);
center = new PVector(displayWidth/2, displayHeight/2);
stroke(0);
}
boolean sketchFullScreen() {
return true;
}
void draw() {
background(-1);
textFont(font, 36);
fill(200);
// text(int(frameRate),20,60);
for (int i = dotList.size()-1; i > 0; i--) {
float a = atan2(mouseY - center.y, mouseX - center.x);
Hi, I was trying to create a sketch where a point moves over to another random point. I've used lerp and a for loop but this is all done instantly. How do I make the movement gradual whilst still using a for loop. I'm stumped, especially working out a way of doing this to all the points simultaneously.
I've been playing around with Minim, and used it to create a visualiser however I'd like it to look a lot more interesting.
I found this:
https://vimeo.com/24133373 Although I've found tutorials on creating small 3D objects, but how would I go about creating something like this that would still be reactive to the FFT from minim.