force directed layout parameters based on width and height of window