Tuesday, July 12, 2016

initialization

World Initialization occurs when an empty world (new world name) is assigned to a canvas.

Procedure:
Define a canvas
Assign a world name

The world name references a file, that is, a string, which contains a record of the world state. When returning to the world, this string will be given to a canvas, where the last view will be displayed.

The canvas is a region of screen space, for simplicity's sake defined as being rectangular. By implication the canvas is associated with controls.

By definition when initializing a world several points related to the canvas are assigned locations in the world. For example, and for the sake of simplicity, we could define the point in the world with the coordinates (0,0,0) to the bottom left corner of the canvas. The top left of the canvas can then be assigned to the point (0,1,0). The number 1 must then be assigned a unit. Let us say we choose inches. For the moment, then, the height of the canvas is mapped to one inch in the world.

The left edge of the canvas is now aligned with and on the world's y axis. We conclude these initial steps by asserting that the bottom edge of the canvas is on the world's x axis. The lower right corner of the canvas defines the positive x direction.

In the future, we can return to this view by placing the lower left corner of a canvas on the world point (0,0,0) and aligning the canvas's left and bottom edges with the world's y and x axes with the top left corner on the positive part of the y axis and the bottom right corner on the positive part of the x axis.

Rendering a view of the world means mapping objects in the world to the canvas. There is nothing in the world to map to the canvas, at this point, so we will proceed by adding something, and, once that is done, we will discuss the problem of mapping to the canvas. Once we have established some procedures for mapping to the canvas we will need to investigate the concept of World Cubes.