import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; import netscape.javascript.*; import javax.comm.*; import javax.sound.midi.*; import javax.sound.midi.spi.*; import javax.sound.sampled.*; import javax.sound.sampled.spi.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.sax.*; import javax.xml.transform.stream.*; import org.xml.sax.*; import org.xml.sax.ext.*; import org.xml.sax.helpers.*; public class example3 extends BApplet {PSystem ps;

void setup() {
  size(500,500);
  ps = (PSystem)loadPlugin("PSystem");
  
  Particle p1 = new Particle();
  p1.setPos(width / 2 - 10, height/2, 0);
  p1.fix();
  
  Particle p2 = new Particle();
  p2.setPos(width / 2 + 10, height/2, 0);
  
  ps.addParticle(p1);
  ps.addParticle(p2);
  ps.setGravity(0.5f);

}

void loop() {
  background(0xff99CCCC);
  ps.draw();
}}