One of the most important first steps in coding a simulation is to define the simulation space, which can be thought of as your simulation's playground - the size, properties, and coordinate system of the area that your VisualBots objects live in.
The simulation space is defined through the use of the Screen object. The Screen object can be used to set the size, background color, and scale of the visible display window and coordinate system. It is also used to define the way objects interact with the display edges.
Programmatically resizing the display is accomplished through the use of the Resize method of the Screen object. Screen display size is specified in screen pixels and so the absolute size of the screen display will be dependent on the screen resolution of the computer. An important point to realize is that the screen size does not affect the simulation coordinate system or the way a simulation evolves through time - it simply defines a window for viewing the simulation. An important consideration when specifying the screen size is its impact on simulation performance. The larger the screen size, the slower the simulation because it takes more work to update the graphics on a larger screen.
There are three modes for defining the way Bot objects interact with the edges of the Screen display area. The desired mode is selected through the Bounds property of the Screen object and affects object movement and object-to-object distance calculations. The three modes are:
The coordinate system scale defines vertical and horizontal simulation distances. The distances are unitless and independent of the pixel dimensions of the screen display. The definition of the coordinate system scale is specified through the SetScale method of the Screen object. The default scale is 100 units wide by 100 units high, with the origin (0,0) in the center. It is important to note that all distances and object dimensions are relative to the coordinate system that you define through the SetScale method, including text and shape sizes. The coordinate system axes can be displayed using the Show method of the Axes object.

Working with Directions and Angles
Many VisualBots properties values and method parameters are specified in terms of directions and angles. In VisualBots, the terms "direction" and "angle" have different meanings. Directions are absolute in the sense that they are measured from a fixed coordinate system. Directions are measured clockwise relative to North (positive Y direction). Angles, on the other hand, are relative in the sense that they are measured clockwise relative to the heading of the Bot object. For example, the Dir property is used to change the orientation of a Bot object relative to north while the Turn method is used to change the orientation relative to a Bot's current heading. Directions and angles can be specified in either degrees or radians (degrees is the default) through the use of the AngleUnits property of the Math object. The diagrams below illustrate the use and differences between directions and angles.

It is important to note that when the Screen object's Bounds mode is set to Wrapped, then the angle from one Bot object to another is determined by considering the shortest path between the Bot objects, after allowing for the wrapped edges.