There are four kinds of output: svg
, threejs
, matrix
and text
. An experimental x3d
output is also available. The config
dictionary in the update
function should have its type
set equal to one of these string values.
Multiple outputs are available by including a configuration dictionary containing a multipleOutputs
entry as the third argument of the MathCell()
command. The value for this key is then an array of arbitrary numerical values indicating the layout of the outputs. The data for the evaluate()
function should then be an array of the usual data arrays. The configuration supplied to this function can either be a single dictionary for identical formatting of all outputs or an array of individual dictionaries.
An svg
output displays a twodimensional plot of the data. The input data should be an array of arrays of data points, i.e. a threedimensional array. The output has the options and default values
xMin  calculated 
xMax  calculated 
yMin  calculated 
yMax  calculated 
axes  true

ticks  auto

axesLabels  none 
includeOrigin  false

includeVerticals  false

equalAspect  false

equalLimits  false

ticks
can be set to an array with two numbers determining distances between ticks, a value of 'auto'
for either axis in this array or simply the string 'auto'
, as well as 'none'
or false
to disable ticks.
A threejs
output displays a threedimensional plot of the input data with the options and default values
xMin  calculated 
xMax  calculated 
yMin  calculated 
yMax  calculated 
zMin  calculated 
zMax  calculated 
aspectRatio  [1,1,1] 
axes  false

axesLabels  ['x','y','z'] 
clippingPlane  none 
decimals  2 
frame  true

viewpoint  auto

ambientLight  rgb(127,127,127) 
clearColor  'white' 
animate  false

viewpoint
is a vector with respect to the center of the visible scene, not absolute world coordinates. It is automatically preserved between renderings upon manipulation of inputs. clippingPlane
is an array consisting of a threedimensional normal vector and a distance from the origin.
animate
can be used in conjuction with an option rotationAxisAngle
on surfaces, where the latter option is an array with a threedimensional normal vector and an angle. More animations will be coming.
A matrix
output displays the contents of a twodimensional array in matrix form. You may need to adjust the width and height of the MathCell to show the entire array properly.
A text
output displays the result of a calculation in raw form. The data for this output can be a number, a string or an array as desired. The output has one option and default
center  false

An x3d
output displays a threedimensional plot of the input data with the options and default values
xMin  calculated 
xMax  calculated 
yMin  calculated 
yMax  calculated 
zMin  calculated 
zMax  calculated 
frame  true

This output uses x3dom code, which is not under active development, so threejs
is a superior choice at this time. This option looks forward to future threedimensional rendering standards.