microMathematics icon indicating copy to clipboard operation
microMathematics copied to clipboard

3D plot fails whenever one interval is used twice

Open novellus opened this issue 3 years ago • 6 comments

Reproduction steps

  • create two identical intervals, c and d
  • define arbitrary function f of two variables
  • try to plot function f(d,d) → does not plot
  • plot function f(c,d) → works correctly

See attached save file for reference test_error.zip

novellus avatar Sep 22 '22 19:09 novellus

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

mkulesh avatar Sep 22 '22 20:09 mkulesh

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

novellus avatar Sep 24 '22 19:09 novellus

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

mkulesh avatar Sep 24 '22 20:09 mkulesh

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.

mkulesh avatar Sep 29 '22 20:09 mkulesh

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.

novellus avatar Sep 30 '22 04:09 novellus

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.

mkulesh avatar Oct 22 '22 10:10 mkulesh