Okay, here is the driver class and I'm attaching ring1.png... it's invisible because it's white. But right click between the two brackets below and have faith. Combine this code with the code above and put the png in the data folder and it should work.
- ArrayList ps;
- PVector c;
- int k = 0;
- void setup() {
- size(800, 600, P3D);
- ps = new ArrayList();
- c = new PVector( width/2, height/2, -200 );
- }
- void draw() {
- background(0);
- if( k++ % 20 == 0 )
- ps.add(new Particle( c.x, c.y, c.z ));
-
- for( int i = 0 ; i < ps.size() ; ++i )
- {
- ((Particle)ps.get(i)).draw();
- if( !((Particle) ps.get(i)).update() )
- ps.remove(i);
-
- }
-
- }
[
![[click here]](https://forum.processing.org/viewImage.do?fileId=25080000001316141&forumGroupId=25080000000003001)
]