Implement geometry functions to calculate area and volume of various 2D/3D shapes
Just to enhance math.js pool of geometry functions to have a greater cover over all mathematics fields of study, it would be useful to have geometry related functions such as area and volume formulas of many 2D or 3D figures.
Thanks for your suggestion @pedparbas , that would be nice indeed!
Anyone interested in picking this up?
Hey, it sounds interesting, May I work on it?
Yes, thanks @priidikvaikla . Maybe good to start working on one thing at a time?
Yes, thanks @priidikvaikla . Maybe good to start working on one thing at a time?
Are you talking to me? I think you might have tagged the wrong person.
@josdejong Hey, sorry I was inactive for a while, My laptop got broken and there was a lockdown scenario in India. Can I have some more information related to this issue?
Are you talking to me? I think you might have tagged the wrong person.
ow, sorry Priyaraj, wrong auto-completion...
@josdejong Hey, sorry I was inactive for a while, My laptop got broken and there was a lockdown scenario in India. Can I have some more information related to this issue?
Thanks for getting back @Priyaraj17. I hope you and your family are ok.
The feature is currently still vague indeed, first step is to come up with a set of functions that we do want to implement here: we can think of calculation of area of 2d shapes like square, rectangle, circle, etc, and area/volume of 3d shapes like cube, sphere, cylinder, etc. We can investigate what kind of API other similar libraries offer, or maybe there even is a suitable JavaScript library that we can utilize. Can you do some investigation into this?
@josdejong Yes sir, things are fine here. Thank you for asking. I hope all's well with you as well.
Sure, sir, this seems very interesting to me. I will work on this feature and will get back to you soon. Thanks!
PS: Is there is any slack or gitter or any other communication channel?
@josdejong, Sorry for being late, it was difficult to work due to my internship and college. But, I have taken a look and found a few libraries that might help us solve the problems.
These are the libraries: https://github.com/HarryStevens/geometric https://alexbol99.github.io/flatten-js/index.html
Do let me know your take on this. I am looking forward to contributing here.
@josdejong is there any update?
I hope all's well with you as well.
have had better times, but will be alright 😅
The two libraries that you point to look solid! It would be nice if we could integrate them somehow in mathjs. Easiest would be if we could just math.import them, but I expect that will not work because both mathjs and those geometry libraries have their own data types. I guess we could either write small wrapper functions around every function converting data types, or add support for those data types in mathjs (but that could result in a messy mix of data types in mathjs.
Thinking aloud here: it maybe interesting to position this as a separate "plugin" or "extension" of mathjs, in a separate repo, like the following extensions: https://mathjs.org/download.html#extensions
Thanks a lot, I will see if I can work on it. It's a little new for me. So, I am gonna try my best. Thanks.
As this is a somewhat vague general idea, moving to a Discussion.