|
@@ -83,8 +83,8 @@ public class HolonCanvas extends JPanel implements ActionListener {
|
|
|
|
|
|
bodies.add(0, new HolonBody(center.width, center.height, 0, 0, 1e6 * solarmass, new Color(0, 0, 0)));
|
|
|
for (int i = 0; i < N - 1; i++) {
|
|
|
- int px = (int) (Math.random() * 201);
|
|
|
- int py = (int) (Math.random() * 201);
|
|
|
+ int px = (int) (Math.random() * this.getWidth());
|
|
|
+ int py = (int) (Math.random() * this.getHeight());
|
|
|
|
|
|
double mass = (subnets.get(i).getObjects().size()) / 10 * solarmass * 10 + 1e20;
|
|
|
Color color = model.getSubNetColors().get(i);
|