Cannot find a class or type names "Particle"


#1

Hi there,

I’m following Daniel’s tutorials on Youtube for motion capture but I can’t get this right. I’ve read it and compared my code to his several times but keep getting the error that there’s no class or type named “Particle”.

Is there something wrong with my code? Why is it doing this? How can I make it run?
Here’s the code:
import processing.video.*;
Particle[] particles;

//PImage frog;
Capture frog;
void setup() {
size(640, 480);
frog = new Capture(this,640,480);
frog.start();
particles = new Particle [100];
for(int i = 0; i < particles.length; i++);
particles[i] = new Particle();

}

void captureEvent(Capture video) {
video.read();
}

Thanks for any help!

Edit: Even when I copy and paste the example code he gave, it still comes up with the same error. Do I need to install something? Is it a bug?


#2

the particle class is a longer piece of code defined by Daniel

Maybe it occurs earlier in the video?

it’s probably similar to the particle class (not particle system) here

https://www.processing.org/examples/simpleparticlesystem.html