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

axesLabels  none 
equalAspect  false

equalLimits  false

includeOrigin  false

includeVerticals  false

ticks  automatic 
axesLabels
is an array of two strings. 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 
equalAspect  false

frame  true

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

clippingPlane
is an array consisting of a threedimensional normal vector and a distance from the origin. viewpoint
is a vector with respect to the center of the visible scene, not absolute world coordinates, that is automatically preserved between renderings upon manipulation of inputs.
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

saveAsXML  false

viewer  'x3dom' 
Setting saveAsXML
to true
triggers a download to file. Available viewers are x3dom and x_ite, but threejs
is a superior choice at this time: this option looks forward to future threedimensional rendering standards.