Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: gnuplot running in your browser (compiled with emscripten) Followup-To: comp.graphics.apps.gnuplot Date: Tue, 01 Jan 2013 17:00:31 -0800 Organization: gnuplot development team Lines: 65 Message-ID: References: Reply-To: sfeam@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Wed, 2 Jan 2013 01:00:34 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="de68407e1e0278021e2f738a9cf7b10c"; logging-data="17086"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lj+0vBj2wWXAoLOgLx5hJ" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:u0H9Nk5ZAxjm3AHvZtgO+Aa670g= Xref: csiph.com comp.graphics.apps.gnuplot:1568 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