protected final double filterGlow( double glow, double filter, double filterExpDistance, double distance ) {
		if( glow == 0 ) return 0;
		if( filter == 1 ) return glow * distance;
		
		assert glow >= 0;
		double add = glow * (filterExpDistance - 1) / Math.log(filter);
		if( add < 0 || Double.isNaN(add) || Double.isInfinite(add) ) {
			System.err.println("glow="+glow);
			System.err.println("filter="+filter);
			System.err.println("distance="+distance);
			System.err.println("filter**dist="+filterExpDistance);
			System.err.println("ln(filter)="+Math.log(filter));
			throw new RuntimeException("Bad value for filterGlow result: "+add);
		}
		return add;
	}