WebMathematics Interactive 2 bug tracking system.
FS#32 - Support for multivariable functions and 3D plots in gnuplot with zooming in and rotation
Attached to Project:
wmi2
Opened by Kovacs Zoltan (kovzol) - Wednesday, 18 July 2007, 23:14 GMT+2
Last edited by Kovacs Zoltan (kovzol) - Sunday, 28 February 2010, 12:16 GMT+2
Opened by Kovacs Zoltan (kovzol) - Wednesday, 18 July 2007, 23:14 GMT+2
Last edited by Kovacs Zoltan (kovzol) - Sunday, 28 February 2010, 12:16 GMT+2
|
Details1. The "," character should be allowed and WMI2 should allow function plotting inputs like "sin(x),cos(x)".
2. Probably he same gnuplot button type should allow the 3D function displaying. 3. Zooming in and rotation could be taken from WMI1. |
This task depends upon
Closed by Kovacs Zoltan (kovzol)
Sunday, 28 February 2010, 12:16 GMT+2
Reason for closing: Implemented
Sunday, 28 February 2010, 12:16 GMT+2
Reason for closing: Implemented
- image flickers when I load it. ...I think I can do it with Ajax.
- imagemap boundaries are not perfect, I think. (There is space at the top of the image)
...I can try to solve it.
- there is no zooming out now. We talked about this with Zoltán, and we talked about the following
possibilities:
* zooming out button as a part of the image map
* zooming out with the calculator back button
* separate icon(s) for zooming
I think now that calculator back button is not a good idea, because someone probably want to see the graph
from a bigger distance, and this can't be reached by undo.
If zooming link is a part of the image map, I think the best place of it is at the bottom left corner,
but with a custom cursor on mouseover, or custom icon over the image. But it might overlay something important.
I think we should do it with a separate icon next to the image, I think.
But we should hide it when the user wants to save the page...
Only those buttons should have the gnuplot button type which actually use gnuplot for evaluation.
If complex plot doesn't use gnuplot, then the type of that button should be something other, I think.
Or the name of the gnuplot button type should be plotting instead.
Flickering should be fixed, yes.
I can also see another problem: the numbers on the axes can be of variable width. This results that the graph part of the image hasn't got a fix part on the screen. Probably the axes should be hidden? Another possible solution can be that we write a simple function plotter using the libformconv library with our own texts printed on the image. (I'm not sure if the alternative solution, i.e. putting the text without gnuplot --- as in complex plotting in WMI1 --- would solve this problem.)
OK, the "undo" button is unacceptable for zooming out.
I'm looking forward to discuss other questions, if any.
So is it good to make a separate icon for undo?
I found a new problem: what is it when a user enters a problem fast, and he presses the gnuplot button?
Then the Ajax begins to load for a long time.
We should not allow pressing the gnuplot button, if the formula is not yet entered...
I think this is my next task.
In Opera, it's OK. (But in Opera, the mouse cursor didn't change.)
* Sometimes an axis is out of image. (This bug also appeared in WMI1.)
* Unzoom icon and IMG link remains in printable/savable version.
- make them disappear in the document, make the saveable version, and the make them reappear in the document.
(now formula hints are made disappear this way) But I think it is too difficult to save the disappearing contents.
- the other way is to make the saveable version, and after it loaded, make some elements of it disappear.
There are two problems with this: 1. view source shows too much;
2. there should be put something to wait the loading of the page, I am going to do this by putting the alert in that place.
I hope this second way will be good, even on Internet Explorer.
- save the innerHTML contents of the whole worksheet in a javascript variable
- make the disappearings
- pop-up the printable/saveable worksheet
- reload the contents of the whole worksheet from the javascript variable
I am going to try it next.
the axis are in the graph now always, but PHP didn't compute the values properly,
so the axis are sometimes not exactly at 0. :-(
I am going to fix it tomorrow.
Or we can put the arrows always at the bottom and the left...
0: it is very interesting. I have never understood why this can happen... anyone has any clue?
0: axis are defined using coordinates, many types of coordinates are there.
In the "first" coordinate system (the default, which was in WMI1) the coordinates are $xmin, 0, $xmax (x-axis)
I tried to use the "graph" coordinate system. The coordinates are 0, placeof0, 1 (x-axis)
And if placeof0 is not between 0 and 1, then let it be on the border.
But it don't display the placeof0 correctly.
Now I'm going to find out that it is (and was) a PHP number precision bug, or an internal gnuplot bug.
I have written some if statements in PHP to check if the axis are out of the graph, and if so,
then let the coordinates of the axis be at the border of the graph.
I tested it, and it worked.
This don't support coordinate geometry equations in an easy way, as I see.
But it is more than nothing.
http://t16web.lanl.gov/Kawano/gnuplot/plot2-e.html
Better late than never...
I have studied this, and I have found nothing very good. Setting rmargin to 0, for example, don't clip the area on the right. It should work, but don't work!
Perhaps a newer gnuplot version?
Perhaps very nasty hacks could help, for example:
- rotate the text with 90 degrees (to the bad 90 direction) and then set rmargin to 1 characters, and compute the imagemap coordinates according to the fix top right coordinates, and we should not crop and trim our image.
- display coordinates not with gnuplot, only in php.
- set numberformat (as in printf) to short, and set a fix short margin. (and don't crop our image)
...
Should I try any of these?
process it, and from the margins, compute the imagemap boundaries.
* complex plots,
* rotating, zooming in/out for 3D,
* probably a little bit bigger 3D would be better.
Whose task is the rotating, zooming in 3D and the bigger 3D?
complex plot shall be Kornél's task.
Perhaps this could be done by someone.