private String[] evaluateWithinFunction(final String clause) {
		if (clause == null || clause.equals(""))
			return null;
		int i = clause.indexOf("(");
		int j = clause.lastIndexOf(")");
		if (i == -1 || j == -1) {
			out(ScriptEvent.FAILED, "function must be enclosed within parenthesis: " + clause);
			return null;
		}
		String s = clause.substring(i + 1, j);
		String[] t = s.split(",");
		int n = t.length;
		if (n != 4) {
			out(ScriptEvent.FAILED, "argument error: " + clause);
			return null;
		}
		double z = 0;
		float[] x = new float[3];
		for (i = 1; i < 4; i++) {
			z = parseMathExpression(t[i]);
			if (Double.isNaN(z)) {
				out(ScriptEvent.FAILED, "Cannot parse : " + t[i]);
				return null;
			}
			x[i - 1] = (float) z;
		}
		t[0] = t[0].trim();
		List<Integer> result = null;
		if (t[0].equalsIgnoreCase("PARTICLE") || t[0].equalsIgnoreCase("ATOM")) {
			result = getParticlesWithin(x[0] * IR_CONVERTER, x[1] * IR_CONVERTER, x[2] * IR_CONVERTER);
		} else if (t[0].equalsIgnoreCase("RECTANGLE")) {
			result = getRectanglesWithin(x[0], x[1], x[2]);
		} else if (t[0].equalsIgnoreCase("TRIANGLE")) {
			result = getTrianglesWithin(x[0], x[1], x[2]);
		} else if (t[0].equalsIgnoreCase("TEXTBOX")) {
			result = getTextBoxesWithin(x[0], x[1], x[2]);
		}
		if (result == null || result.isEmpty())
			return null;
		t = new String[result.size()];
		for (i = 0; i < t.length; i++)
			t[i] = "" + result.get(i);
		return t;
	}