debugged clampMagnitude. Added noise. Added boxCountX, boxCountY, boxCountZ. Tweaked parameters in test setup.