mathjs icon indicating copy to clipboard operation
mathjs copied to clipboard

Implement geometry functions to calculate area and volume of various 2D/3D shapes

Open pedparbas opened this issue 5 years ago • 12 comments

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.

pedparbas avatar Apr 11 '21 15:04 pedparbas

Thanks for your suggestion @pedparbas , that would be nice indeed!

Anyone interested in picking this up?

josdejong avatar Apr 14 '21 07:04 josdejong

Hey, it sounds interesting, May I work on it?

Priyaraj17 avatar May 22 '21 10:05 Priyaraj17

Yes, thanks @priidikvaikla . Maybe good to start working on one thing at a time?

josdejong avatar May 22 '21 14:05 josdejong

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.

Priyaraj17 avatar May 22 '21 15:05 Priyaraj17

@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?

Priyaraj17 avatar Jul 03 '21 12:07 Priyaraj17

Are you talking to me? I think you might have tagged the wrong person.

ow, sorry Priyaraj, wrong auto-completion...

josdejong avatar Jul 07 '21 08:07 josdejong

@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 avatar Jul 07 '21 08:07 josdejong

@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?

Priyaraj17 avatar Jul 07 '21 17:07 Priyaraj17

@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.

Priyaraj17 avatar Aug 09 '21 08:08 Priyaraj17

@josdejong is there any update?

Priyaraj17 avatar Aug 22 '21 05:08 Priyaraj17

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

josdejong avatar Sep 15 '21 09:09 josdejong

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.

Priyaraj17 avatar Sep 28 '21 15:09 Priyaraj17

As this is a somewhat vague general idea, moving to a Discussion.

gwhitney avatar Oct 03 '23 05:10 gwhitney