light area algorithm