refactoring; generation of a random function
antialiasing enabled