geometry
geometry copied to clipboard
Generalize `cart2sph()` to higher dimensions
Hi,
I am interested in the generalization of cart2sph()
to an arbitrary number of dimensions. Since geometry already provides this conversion for 2 (cart2pol()
) and 3 (cart2sph()
) dimensions and since other functions from the same family (cart2bary()
) already support an arbitrary number of dimensions, I believe this feature could belong here. I would understand if you believe this is out of scope but if you believe this is in scope, I can try and submit a PR for this!
Thanks for your thought on this. I think this could well be scope. Annoyingly, I only realised after putting the cart2sph and sph2cart functions in that they were already included in the pracma package. I have contacted the pracma maintainer, thinking that maybe we should rationalise, by having pracma as the home of these functions, but he doesn't seem too bothered. I think the aim of pracma is to be Matlab-compatible, so it might be that they wouldn't want the extra functionality. Perhaps you could check wtih the pracma maintainer? If they are not interested, I'd be very happy to consider a PR.