Skip to content

SceneSettings

Mithi Sevilla edited this page Sep 1, 2020 · 6 revisions
interface SceneSettings {
    cubeRange: number
    cubeZoffset: number
    dataZoffset: number
    paperXrange: number
    paperYrange: number
}

PaperXrange and PaperYrange are the range of BareMinimum2d plot, where we project the 3d plot. (see documentation of BareMinimum2d for details.

                  yRange/2
                     |
                     |
  -xRange/2 -------(0,0)--------- xRange/2
                     |
                     |
                   -yRange/2

The coordinate frame where the origin is yellow is the world coordinate frame. The coordinate from where the origin is green is the cube scene coordinate frame, the green point is the center of the cube. The edgeAxes coordinate frame is the one with a magenta origin point. The yellow axis is the z axis for all three coordinate frames, while the red axis is the x axis, and the blue axis is the y axis. You cannot see the y axis of the world coordinate frame because it is pointing towards you.

In the left, the cubeZoffset=0.5, in the right cubeZoffset=-0.5. The cubeZoffset is the offset of the center of the cube wrt to the world coordinate frame in the Z axis. The pyramid data in both occasions is offset by dataZoffset=1. cubeZoffset and dataZoffset should be ideally between -1 and 1

left right
Screen Shot 2020-08-31 at 3 31 02 PM Screen Shot 2020-08-31 at 3 31 34 PM

In the picture below, dataZoffset=-1 while cubeZoffset=-0.5. The offset of in the zAxis is of both dataZoffset and cubeZoffset is always with respect to the world coordinate frame origin (yellow origin point). Screen Shot 2020-08-31 at 3 46 55 PM

By default, edge of the cube has a length of 2, which is a range of from -1 to +1 (see UnitCube of this file) If cubeRange=600 then the range would be changed to -600 to 600. If you set the cubeRange to be smaller, then your data (in this case the pyramid) will appear bigger with respect to the cube. If you set the cubeRange to be bigger, then your data will look smaller with respect to the cube.

Clone this wiki locally