mkulesh / microMathematics

microMathematics Plus - Extended visual calculator
GNU General Public License v3.0
561 stars 68 forks source link

3D plot fails whenever one interval is used twice #124

Open novellus opened 1 year ago

novellus commented 1 year ago

Reproduction steps

See attached save file for reference test_error.zip

mkulesh commented 1 year ago

Hi @novellus, thank you for problem reporting! In which context do you need to plot f(d, d) as a surface? From my point of view, the behavior is as desired, since mathematically f(d, d) is an one-dimensional function and one-dimensional plot shall be used for it: test_plot

novellus commented 1 year ago

I would like to plot a parameterized one-dimensional function in 3-space.

mkulesh commented 1 year ago

OK, thank you, I will take a look on this.

mkulesh commented 1 year ago

Hi @novellus, I implemented a fix for this problem. Now it looks like this: Screenshot_20220929-222944 The debug build is stored here: https://1drv.ms/u/s!At2sh2-YDyGFgSNGS--UoDA7P499?e=C3hry5 Could you please download, manually install and test this fix? Please note that I am not able to change the algorithm how the 3D surface is drawing. This algorithm draws the surface using triangles. In means, if you take less points for the function calculation, you will see these triangles instead of the line in 3D view.

novellus commented 1 year ago

Thank you for taking a look at that. That isn't quite what I was looking for.

Here is a plot created in the debug build you provided.

And here is an example of the parameterized 3D plot I was looking for: I set the three axes to x(r(d), d) (x-axis), y(r(d), d) (y-axis), r(d)/3 (z-axis).

I think specifying only one function in the 3D plot will be unable to produce this result. One way to enable this kind of plot would be to specify each axis independently, like how the 2D plot works.

mkulesh commented 1 year ago

Hi @novellus I see that you mean... Mathematically it is clear, but currently I have no idea how to add such a plot into the uMath. It is not easy since I possible need a new type of plot view. I keep the issue open until I will found a solution how to integrate this parametrized plot into the existing code.