private void addPointToPolygon(Polygon p, int x, int y) {
		if (p.npoints > 0) {
			int dx, dy;
			boolean tooClose = false;
			int min = (int) (model.getElement(MolecularObject.getElement()).getSigma());
			min *= min;
			for (int i = 0; i < p.npoints; i++) {
				dx = x - p.xpoints[i];
				dy = y - p.ypoints[i];
				if (dx * dx + dy * dy < min) {
					tooClose = true;
					break;
				}
			}
			if (!tooClose)
				p.addPoint(x, y);
		} else {
			p.addPoint(x, y);
		}
	}