ChristopherChudzicki / math3d-react

A user-friendly 3d graphing calculator for the web. Create, share, and animate 3d mathematical scenes.
https://www.math3d.org
Mozilla Public License 2.0
250 stars 34 forks source link

More user-friendly error messages #327

Open Zaq-Xander opened 2 years ago

Zaq-Xander commented 2 years ago

After coming back to visualise something else in Math3D, I kept getting a "Dimension mismatch (2>1)" error and could not figure out why. Turns out it was because I was using "i" (the vector) as opposed to "I" (the complex number). A little sentence along the lines of "Ensure you are using 'I' for complex numbers and 'i' for vectors." would be fantastic.

In general, error messages could be more user-friendly, but that's not too much of an issue. I found this error message particularly irritating, though.

Thanks, as always, for developing such a fantastic tool. Works perfectly when I use the right symbols!

nedisy commented 2 years ago

I also thought it will be better to name the unit vector in x-direction as x-hat, and imaginary as i instead of I

ChristopherChudzicki commented 2 years ago

@Zaq-Xander Do you have a link to the relevant graph? I know I've seen that error before, but I'm having trouble reproducing it right now. (I am getting "Dimension mismatch. Matrix A (2) must match Matrix B (3)" fairly easily—which also isn't the most transparent. But I forget how to get the 2>1 etc variants).

But... yes. This definitely an area that could use improvement.

@nedisy Eventually I'd like to move in that direction: hats on unit vectors, and xyz instead of ijk—or both, but somehow differentiate the unit vectors from imaginary unit. That typographical distinction is a bit complex for users to input at the moment: you'd have to type \hat{i} or \hat{x} (which works, but currently leads to a parsing error). There are a variety of related reasons that I'd like to switch the WYSIWYG math editing to something more modern, probably mathlive. I believe mathlive has a fairly customizable virtual keyboard, at which point more advanced typography like \hat{i} or \hat{x} becomes much easier for users to input (and more discoverable).