Christ H wrote:
> Hi,
> just as an xmas project I tried to compile gnuplot with emscripten and
> it worked amazingly well. Had to patch some little things, nothing
> dramatic. Only issue: hidden surface removal is broken (crashes),
> which might be due to int64 usage. Appreciate feedback. Feel free to
> have fun with this, no install required, just a modern browser.
>
>
http://gnuplot.respawned.com
What a great holiday project!
Some thoughts after a quick trial run:
2.5MB is pretty small already, but I think you could cut that down
further by trimming the number of terminal drivers in the build.
I can't see much point in context/corel/mif/pslatex/tektronix support.
Aside from the problem with hidden3d, I notice that NaN and infinities
are not handled correctly. You can see this by running imageNAN.dem or
by typing "print NaN".
I get an error page saying
"error on line 80 at column 36: Encoding error"
if there are UTF-8 characters in the input script.
It's not clear what level of the processing stack is involved;
this is not an error from gnuplot per se.
I would have thought that modifying the script to use
set term svg enhanced size 1000,700 mouse \
jsdir "
http://gnuplot.sourceforge.net/demo_svg_4.6/"
would be sufficient to enable mousing, but it isn't. This
could be due to sandboxing by the browser (chrome), but I didn't
pursue it further. Clearly it should work to include the mousing
support scripts with the rest of the downloaded code, however
in order to play with the mousing script it would be easier if it
lived in a separate editable location. Which brings me to...
The obvious next step is to extend the mousing code so that you
get true 3D interactive rotation and zoom.
That would be spectacular!
3D mouse support would be easier to do using the canvas terminal
instead of svg because that way there needn't be an intermediate
file (svg.out) in local storage.
Either way the amount of new code required would be small;
so far as I can see, the only thing required is to add hooks so
that mouse events trigger a call back into the existing
gp_exec_event() routine. It could well be that no change is
needed to the core gnuplot code at all, only to the separate
mousing scripts and the wrapping HTML on the web page.
Please send me, or upload to the SourceForge site, whatever
code changes you needed to "patch some little things".
I'd be happy to shepherd them into the current CVS version.
Happy New Year,
Ethan
>
> Cheers,
> Christian
>
>
http://gnuplot.respawned.com