return Math.exp( -(x*x+y*y) / sigma ) * Math.abs( Math.cos( 2 * Math.PI * ( x*x + y*y ) ) );
}
};
// Define range and precision for the function to plot
Range range = new Range(-.5, .5);
int steps = 50;
// Create the object to represent the function over the given range.
final Shape surface = (Shape)Builder.buildOrthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);
surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(), surface.getBounds().getZmax()));