Sunday, July 31, 2016

framework

We could say that an uninitialized Universe does not include a framework, that it only includes a View and controls, or even that it only includes controls.

The user's first steps would then be, using the controls, to create a View, and a Framework.

<input id="viewwidth">
<input id="viewheight">
<input id="viewleft">
<input id="viewtop">

The above creates a View in the browser window.

<input id="framework_sidelength">

We began by describing a framework sidelength of 1 inch.

Framework Sidelength is the only Framework information needed to initialize a Universe.

<input id="viewwidth_inmodel">
<input id="alignment">
<input id="focus">

These inputs define the camera. A logical default for viewwidth_inmodel would be 1 framework sidelength. A logical default for alignment would be "onface".

Having initialized our framework, the model consists of a cube, the framework, whose sidelength we have specified. OnFace alignment of the camera places an image of our View on a face of the framework. Note that we cannot specify a face. The framework is simply six faces. It says nothing about which is which. OnFace initialization adds to the definition of the framework one view model on one face. It is this which now identifies the faces of the framework. One is the face on which the ViewModel is place, one is the face opposite to that face, one is to the left of it, this when viewing the ViewModelFace from outside the framework, and one is to the right of it, one is below it, and one is above it. Furthermore, left, right, up, and down are ultimately defined by the Window and the Screen, and, for example, the table on which the screen sits. They are defined by the User, who is looking at the Screen, and knows which edge of the screen is up, and which is down, and which is left and which is right.

A logical default focus for an OnFace Camera Initialization would be "out, 1 ViewModel width", where "out" is the Focus Direction. Focus is a point, with a logical default location "off the center of the ViewModel". The ViewModel is a rectangular plane segment. The concept of the center of a rectangular plane segment is familiar to everyone, but noting that it is a point on the plane defined by the rectangle. "Off the center" means a certain distance from the center on a line through the center and perpendicular to the Segment Plane. There are two points a given distance from an OnFace View Model Center. One is inside the framework (framework cube), and the other is outside the framework. FocusDirection = "out" specifies the one outside the framework.


Another way to think about this would be to name the faces of the framework something like East, West, North, South, and Up and Down. We could then align the ViewModel "on East face". This is actually more correct, because now we can align the camera, or anything else, relative to a fully defined framework. Note that an initial onFace alignment could be helpful because it makes defining focus direction easy.

For completeness we need to add a position term to an onface alignment. For example, position = "center" would align the center of the viewmodel with the center of the framework face. Now I see we also need a "rotation term". An Centered On East Face Vertical alignment would be quite definite.