Bugs and implementation issues of WITM

There are a several differences between how Mathematica behaves with the web interface when compared to the command line and notebook interfaces. These are not bugs, since they were programmed to happen this way. But they are not ideal, but there is no simple solution which is better. These issues are:
  1. Since each time 'Evaluate' is pressed a new Mathematica kernel is started, the state of a Mathematica session is never preserved. So typing

    a=1 (then pressing Evaluate)
    b=3 (then pressing Evaluate)
    a+b (then pressing Evaluate)

    will return a+b, and not 4.
  2. Because of how WITM works, everything must be entered on one line. But multi-line statements can be run by using a semi-colon to separate lines and enclosing the lines in parentheses. e.g.

    (a=1; b=3; a+b) (then press Evaluate)

    will return 4
  3. Animations are more complex to produce than need be. WITM determines if an expression is a graphics object by testing the head with Head[expr]. For example, if we type Plot[x,{x,0,12}] then WITM actually computes expr=Plot[x,{x,0,12}]; head=ToString[expr] ; If [ head == ToString[Graphics] || head == ToString[ xxx], Export["graph.gif",expr] (there is also code that checks for excessive memory of CPU usage, but this can be ignored for the purpose of discussion).

    This method of testing the head to see if its a graphics object which would be written to a GIF file works for 99% of cases. However, if the expression is a list of graphics (i.e. an animation), then Head[expr] returns 'List' and not 'Surface Graphics' which is what is wanted. So WITM will not export this to a animated GIF file, since it does not realise it is an animation. The following command will not work properly.

    Table[ Plot3D[ BesselJ[0, Sqrt[x^2 + y^2] + t], {x, -10, 10}, {y, -10, 10}, PlotPoints->100 , Mesh->False, PlotRange -> {-0.5, 1.0}, DisplayFunction -> Identity ], {t, 0, 6} ]

    However, it is possible to circumvent this problem, by explicitly forcing an export to the file graph.gif, by instead entering this as:

    Export["graph.gif",Table[ Plot3D[ BesselJ[0, Sqrt[x^2 + y^2] + t], {x, -10, 10}, {y, -10, 10}, PlotPoints->100 , Mesh->False, PlotRange -> {-0.5, 1.0}, DisplayFunction -> Identity ], {t, 0, 6} ]]



SourceForge.net Logo Valid HTML 4.01 Valid CSS!