-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial derivatives, Rotor/Curl of a field, Normal of a surface #207
Comments
Yes, that's definitely an issue. I've always found working with partial derivatives a pain on Math3d. I haven't thought of a good, unambiguous syntax for partial derivatives, though. I'll start thinking about that again, though. A curl function would be very easy to implement and I agree definitely a good idea. Probably it should accept syntax:
Also happy to do a surface normal function, though I'm not quite sure what to call it. Surface normal function would also be less crucial if better partial derivative support. Question: Do you have any interest in making a PR for |
While that is tempting and I would love to try and tackle it myself, I am currently in the start of exam period and probably can't afford to do this. Possible syntax for partial diff: If you don't like to overload As for surface normal - I agree is not as crucial if partial derivatives are more accessible, but it also wouldn't hurt. You can call it something like Edit: discoverability will always be an issue, which is why I like the included examples and I think you (we?) should definitely make more of them. |
I understand that Edit: I can't tell you how many failed attempts this took me: https://www.math3d.org/UdFijsnH Apparently I was using subset/index wrong. To get the partial derivative of R(u,v) in regards to u, apparently we use:
I was stuck for hours trying to figure out why This is related to the "see something's type" topic discussed here: #193 (comment), but for variables (that aren't functions) we might as well be able to see the actual output value - preferably as a nicely formatted matrix/table. I know I'm making a lot of requests, some of which are big, but it's only because I like this software so much and want to see it improve. :) (I will try to make some PRs eventually, but for the next ~month it will definitely not be possible) Edit: Curl still requires partial derivatives as intermediate functions, but at least it can be made generic: https://www.math3d.org/bNLU7FfY - |
I've just realized that the divergence of a field (Px + Qy + Rz, where F = P(x,y,z)i + Q(x,y,z)j + R(x,y,z)k) is also missing. |
Note to self: This is implemented but still needs documented examples. |
Two separate-but-related differential operators that seem pretty important/essential to me for 3D math:
I've managed to get the rotor of a given field at the point [X,Y,Z] in the following example:
https://www.math3d.org/MrIboI6x
Notice that I had to define 9 intermediate functions in order to accomplish this... not great fun. I also wasn't able to use this method to create a generic rotor function, because I had to use the constants X,Y,Z in the intermediate functions.
(note that I mean the un-normalized vector Ru×Rv)
Again, I was able to do this for a single point using two intermediate functions: https://www.math3d.org/3Iqv6XXf
I've looked through
math
in the console and math.js, and wasn't able to find a ready-made way to calculate these at given coordinates. Please add one, and/or make an example of it so it's more discoverable!What these two things have in common: they involve partial derivatives. I've tried using diff with functions of multiple variables, but I just can't find a way to work with them! If you can expose them a little better to the end-used, that might help.
The text was updated successfully, but these errors were encountered: