Implementing XY instead of Polar Coordinates for Vbap Query.
This post was updated on .
I'm trying to use an XYpad as a crude control to position sound within a 2d space using and 8 channel Vbap setup. As Vbap works in angles ranging from 0 to 360 degrees (as in below image) in a scenario that does not correspond at all to the way trigonometric angles are usually set up, I'm having lots of trouble working this out.
As this is a math issue, I posted the query in a maths forum and these are the instructions I got back:
θ=arctan(xy) for 0<θ<90∘ ... i.e. both x & y positive
θ=180∘+arctan(xy) for 90∘<θ<270∘ ... i.e. y negative
θ=360∘+arctan(xy) for 270∘<θ<360∘ ... i.e. x negative, y positive
I'm currently trying to implement these equations, but the results do not correspond to what they should be (Also I get crashes if the XY coordinates are at 0).
My current code can be found in the next post. Would anyone care to offer some advice, please and thank you?