Open source JSXGraphs - better than GeoGebra and AsciiSVG?

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Alfred Wassermann -
Number of replies: 23
You are so fast! Now I saw, that you already have detected our Moodle plugins. By the way, I just renamed the folder from moodle to jsxgraphmoodle.
Our project is hosted by sourceforge: http://sourceforge.net/projects/jsxgraph/

In the above discussion GeoGebra import has been mentioned. We are working - together with Markus Hohenwarter from GeoGebra - on the support of GeoGebra files. But this feature still needs a lot of work. Since GeoGebra has a huge user base we have to be careful with promoting such a tool as long as it is not mature. That means, in the current JSXGraph release GeoGebra is not yet included.

At the moment, JSXGraph is able to import GEONExT files (see http://geonext.de) and the evolving European Intergeo file format i2geo (see http://i2geo.net).
GeoGebra will support i2geo, too. Of course, only a subset of the available elements of GeoGebra or GEONExT will be available in i2geo. But you can expect that Euclidean geometry will be supported quite well.

We are aware of the problem of the IE8 in standard mode with XHTML files:
http://jsxgraph.uni-bayreuth.de/wp/2009/03/20/jsxgraph-and-ie8/
Meanwhile, we also know how to solve it. Hopefully, one of the next releases will resolve this issue. (By the way, also google maps falls back to the compatibility mode of the IE8).

As I said, in the next release 0.78 (next week) of JSXGraph the dependency from jQuery and/or prototype.js has been completely removed. That means, the $-sign is not used in JSXGraph any more.

Alfred


In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

Thank You, Alfred!

JSXGraphs are in my opinion the best available open source tool for adding quality vector graphs to web pages. You have a great team and have done a super good job with these scripts. I believe we can help you in integration of code to moodle, additional plugins and testing. At least I am eager to use a lot of my time and energy for these excellent tools.

Please keep us informed about your future plans and changes in code.

Regards,

Mauno

In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
Mauno's like the proverbial kid in the candy store, lol, and not only fast but gracious

The update that resolves the token issue will mean that I can roll it out in moodle 1.9, though my predilection is to do it by theme, though I will gave to look at plugin (do we need to add the plugin to moodle database and if so shall I go ahead with that and set you-Alfred-up as maintainer?)

But, as SEE becomes more sophisticated (lol) we still need long term solution. Paulo Soares in asciimath group has argued against spans. I think his proposal represents a practical approach to what I was arguing, but potentially prsents more issues in trying to address multiple browsers transparently.

Re assignment, need array of primitives student can select which are then fed like XML cgi appp I wrote for java sketchpad, creating page on fly with parameters or creating and uploading gxt file. Be fun to have java based constructor like dragmath to build constructs....
In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
So there is already the geonext java application http://geonext.uni-bayreuth.de/index.php?id=2453 (there was one mention of inserting applet into Moodle here: http://moodle.org/mod/forum/discuss.php?d=83000) which can be used to create geonext constructions. And we have now the JSXGraph for displaying same without having to invoke applet. We also have access to hundreds of existing geonext files (such as those available via JEM http://www.jem-thematic.net/en/search/node/Geonext and those offered as examples in the jsxgraph wiki) for use both as examplars and as instructional tools. We can embed the applet in an assignment and have a student save the construction and then upload and we can can create demonstrative expository materials and implement appropriate drill by integrating those resources with existing Moodle lesson and quiz.

Mmmmmmmm

So, I guess what I need to do next would be to create a modest Moodle lesson that pops up the applet as a work space and presents various questions employing JSXGraph ..... lol

Question back to you, Mauno, is whether we should add the applet to the editor dragmath style as I was pondering earlier.... I think the integration would be very similar..... the big diff being on insert the integration would have to write the jsxgraph tags and the either a file name or file attributes, and first/easiest shot would be attributes as that would not require and Moodle hassles vis-a-vis saving and referencing the file (I suppose I need to double check and make sure that the applet will write file attriubutes as well as save the file...... mmmm .... the applet does not appear on first blush to offer that..... perhaps that is something that our friends at bayreuth could help with??)


In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -
I was also testing (for a short time) yesterday that online version of Geonext and it probably does not save at all but the idea of using the applet online is good - if it's possible.

For teachers it is almost the same to create material offline as online but for schools an online version might be better (no need to install extra software to PC:s)
In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
I placed the app as we might present it from dragmath and the app as the teacher might present it in your plugindemo Moodle. The applet as the teacher might use it is redundant now to jsxgraph. But the constructor is not. I have mailed the folks at Beyreuth about having applet dump string.... but in fact the gxt file content is the string, so at worst we export to a tmp file, dump the contents to the editor and delete the tmp file... kind of hoaky, but we will see what Alfred et al say..... of course the student can save the file as gxt locally, close the constructor and then upload the file.... which is a good way to have students practice taking care of their own stuff, but not consistent with what we do with dragmath and less convenient.

So, what do you think about adding a geonext icon in the now exploding tinyMCE toolbar to invoke geonext just like we invoke dragmath, with the integration providing the tags etc and accepting the geonext string from the applet?

This is very exciting....
In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

We will have a new row of icons in that "advanced maths editor" in moodle 2.0 - big grin

If we use a common administration (either with filter settings or if Petr finds a nice way to add custom editor settings) users will be able to choose which tools they want to use and we can offer 20 different optional tools if we want.

In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Ramon Eixarch -
Hi everybody,

as the usual readers may know I am part of Maths for More, company responsible for WIRIS math tools (www.wiris.com/moodle/ )

I would like to remark to importance of InterGEO project just mentioned by Alfred. It is a project where different Dynamic Geometry projects are cooperating to allow an easy file exchange between Dynamic Geomatry software packages:
  • Cabri
  • Cinderella
  • GeoGebra
  • GEONExT
  • Geoplane/Geospace
  • TracenPoche
  • WIRIS

InterGEO is a EU funded project ( eContentPlus ).

Ramon
In reply to Ramon Eixarch

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

Thank you for the link, Ramon,

they are all great projects and cooperation between open source and commercial projects is always a good thing - and it's really good to see a large team of universities solving the same task... bringing maths and graphs alive, easy-to-use and available in our world wide web.

In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

Setting back

var translateLaTeX = true;

in Asciimathml files seems to work ok with version 0.80 files

Thank You Alfred!

In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
Alfred,
have not seen notice re 0.78. R u going to release 0.78 or look at going straight to 0.80?
In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Alfred Wassermann -
the JSXGraph version numbers are slightly misleading: In the sourceforge subversion server we are developing now in the 0.80 branch. That means we are working towards the release 0.80 and we have nearly reached 0.78 by now. At the moment we are testing a version called 0.78.1 in our wiki. This number could be interpreted as 0.78 release candidate 1. We just want to resolve one more problem then 0.78 will be released.

In reply to Alfred Wassermann

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -
Can't wait to see it...big grin

I made quite heavy cleaning of "double and triple code" in my AM.js and current "work version" is in http://korpelainen.net/js/AM.js

It is doing all the same things (with some bug fixes) as previous script but is about 1/3 lighter than before. More changes will come during the next week...particularly to plugins.


In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

"It is doing all the same things (with some bug fixes) as previous script..."

Well not quite - different fallback renderers use different syntax and in this case I used several hours to figure out that google chart Api fails to render classic asciimathml matrices like `((1,2),(3,4))`using the same code that MathTex successfully renders - so the smartest thing to do is to use different files for different renderers and not even try to put all that code to one file...

In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

I started to split previous code to smaller "subscripts" and should modify next the input/output variables for each subscript.

AsciiMathML and AsciiSVG are separated to different scripts (like they originally were) and I will probably split all IE stuff to different scripts soon too.

Attached an input/output example about the reason for different scripts:

1) \left(\begin{array}{ccc} 1 & 2\\3 & 4\end{array}\right) (Google Chart API png image)
2) \left(\matrix{1&2\cr3&4}\right) (MathTran png image)
3) $\left(\begin{array}{cc} 1 & 2\\3 & 4\end{array}\right)$ (LatexMathML / MathML)
4) GeM\left(\begin{array}{cc}1&2\\3&4\end{array}\right)GeM (Forced fallback to TeX Live with cgi MathTex)
5) $$ \left(\begin{array}{cc}1&2\\3&4\end{array}\right) $$ (Same code and doubledollars / TeX filter with MiKTeX and on the left side here in moodle.org with TeTeX)
6) `((1,2),(3,4))` (AsciiMathML / MathML)
7) Plugin graph (AsciiSVG plugin)
8) Script Graph (JSXGraph)
...

Attachment comparison.gif
In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
As devils advocate- is it worth breaking up lib if we are not going to be able to use jsxgraph without including JavaScript tag (as opposed to tags parsed by AM)?
In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

Well...in most cases you won't need both AsciiMathML and AsciiSVg - you will need either maths or graphs. If you want to use only asciimath with JSXGraphs you may not want to load AsciiSVG - or you may want to use 2 different versions of AsciiSVG (old style and plugin style) with different variables but want to use only TeX with TeX filter...

It is possible to collect all options to one mega script or split scripts to smaller tasks and move some tasks for example to php scripts. If we want to use configurable settings it is easier to use php for settings and remove most variables from javascript:

AM1.php - settings for AM
AM1.js - javascript functions for AM
AS1.php - settings for AS
AS1.js - javascript functions for AS

If we want we can split AM1.js to 2 smaller scripts - MathML and fallback parts - and load only MathML script for FF and fallback script without MathML parts for other browsers.

If we want we can split AsciiSVG to 2 smaller scripts - fallback parts for IE only and SVG parts of other browsers.

Then we can use browser detection and set IE directly to load only settings and IE functions without 100 tests if (isIE) {...} ... or if (ASnoSVG) {...} and do the same for FF and other browsers which means probably 3 scripts:

IE.php (all fallback & png or VML)
FF.php (MathML & SVG)
Webkit.php (fallback & SVG)

What do you mean, Marc, by "...if we are not going to be able to use jsxgraph without including JavaScript tag..." ?

I suppose we might be able to use GeoNext applets for addings tags, we might be able to use filters to replace applet strings with graphs, we might be able to create a filter for addings jsxgraph (script) tags, we might be able to create an editor plugin for adding jsxgraphs just like in AsciiSVG plugin...?

Or we might be able to combine best features of AsciiSVG and JSXGraphs and some math renderer (Google Chart API?) together with Dragmath to one simple plugin or two simple plugins that output graphs and maths as vector graphics and MathML/fallback images that are editable and visible in editor, more accessible for screen readers and have the most common functions for school use - but not all the features of different renderers.

Or we might be able to select default renderer from administration menu ($CFG->... given by math filter settings ) and let script select different input and output values according to this setting - or we might be able to do the same with some classes or class names without tokens and delimiters or with tags like

math/ AM ...tags here... /math
graph/ JSX ...tags here... /graph

( or why not as well math/ JSX ...tags here... /math for graphs too if we had just one mega filter for all kinds of maths and graphs - no more worries about dollars etc ... but dollars, backticks and other old stuff could still be used like before)

In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

If we think about original javascripts by Peter and David and other environments (CMS) it may be good to keep all features in one javascript. I think we can use both splitted scripts and a collection script.

We might also be able to create some new activity (module or blocks) to use maths without script tags, theme meta tags etc - it has been the direct route for testing things but we have most likely not yet tested all possible features of moodle. My main interest is in moodle 2.0... but to be honest we may need some more people interested in testing things, giving feedback and writing that code.

I am above all a teacher - not a developer - so any people working in universities and funded projects are wellcome to help. And yet - even if nobody else had any use for these scripts - it has been really nice - a pleasure and privilege - to study things, think up ideas and work with you, Marc, to produce something that might be useful for schools and other math teachers and students (from all levels of education)  smile

In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
Mauno
sent you a couple of extensive email about two tag option. Let me know if you did not get those.
Marc
In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -
I will check my email - and reply as usual... wink
In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
Great! Just quit saying nice stuff about me in the forums; people will get the wrong impression ;=}

Sent email because I thought issues addressed were still a bit convoluted for forum (we make terrible messes of threads.....)

I am baby sitting marinara sauce (been cooking for several hours so we are at critical stage for converting sugars) but will peek at iPhone from time to time. LoL
In reply to Marc Grober

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Mauno Korpelainen -

I have been cooking apple jam recently... check your gmail, Marc...

Of course we will continue with this but my capablity to create new code means that stable version of plugins might be out after 10 years - without help from people like Alfred, Matthias and particularly you and your feedback. wink

In reply to Mauno Korpelainen

Re: Open source JSXGraphs - better than GeoGebra and AsciiSVG?

by Marc Grober -
Northern Latitudes .......
We are on same page. Proposed solution in your inbox.
Alfred? Matthias? Are you hearing us?