Skip to content
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

Polar to Cartesian and vice-versa conversion #25

Open
lzwicker opened this issue Sep 29, 2023 · 6 comments
Open

Polar to Cartesian and vice-versa conversion #25

lzwicker opened this issue Sep 29, 2023 · 6 comments

Comments

@lzwicker
Copy link

We probably cannot settle on an aligned approach on how to convert Polar to Cartesian systems and vice-versa. However can we at least propose something everybody can stand behind so that when someone uses ADM-OSC, the same results are achieved?

@GuillaumeLeNost
Copy link
Collaborator

GuillaumeLeNost commented Sep 29, 2023 via email

@mzed
Copy link
Contributor

mzed commented Oct 2, 2023

More detail in section 10.1 of this: https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.2127-0-201906-I!!PDF-E.pdf

These maths are part of the EBU renderer here: https://github.com/ebu/ebu_adm_renderer/blob/master/ear/core/objectbased/conversion.py

@mzed
Copy link
Contributor

mzed commented Oct 2, 2023

That is the only official recommendation for conversion I'm aware of. That is what we should recommend if we want to be most compatible with ADM.

Note that this projects polar coordinates onto a 5.0.4 layout with corner speakers at (0º, +/-30ª, +/-110ª). Elevation is idiosyncratic, too.

@mzed
Copy link
Contributor

mzed commented Oct 2, 2023

Perhaps we should supply some boiler-plate code to help implementations? The EBU reference is Python. Should we add C/C++ too?

@madees
Copy link

madees commented Oct 25, 2023

This is good for implicit listener position at x=0, y=0, z=0 and straight to the front (Y axis) head orientation.
Maybe worth to follow EBU work on AR, VR, head tracking and game engine compatibility to be able to define a more general approach to the transition from the physical world to individual perception and vis versa ?

@Daniel-Higgott
Copy link

I have created an open source project, written in Swift, that performs the conversion between polar and cartesian coordinate systems. You can find a link to the source code here.

I have attempted to keep the implementation as simple as possible, with the conversion happening within two small functions. The project comes with a demo app that allows the user to view the conversion. I hope that this approach will allow people to easily convert the maths to other languages, or use directly within their application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants