You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In context with #3960, coordinate transforms are needed.
In the particular case, Cartesian -> cylindrical with basis vectors and origin not identical.
To my understanding, the most general solution is to split this into
translation to align the origins
basis transform to align the basis vectors
convert Cartesian to cylindrical coordinates for matching basis vectors. I.e. theta=0 would refer to the x axis, theta=pi/2 to the y-axis and z =z.
is probably not worth a function, since it is vector subtraction.
The second part can be done most general (supporting also non-orthogonal coordinates)
using a transformation matrix containing the new basis vectors (as columns, i guess)
This only requires matrix vector product which is in the utils library. https://en.wikipedia.org/wiki/Change_of_basis
theta using atan2 (the one that can deal with four quadrants, r=sqrt(x^2+y^2), z=z
The reverse would look like:
x = r cos(theta), y = r sin(theta), z=z
To reverse 2., the caller has to use the original basis transform with the inverse transformation matrix.
Matrix inversion can be taken from boost::qvm
The text was updated successfully, but these errors were encountered:
In context with #3960, coordinate transforms are needed.
In the particular case, Cartesian -> cylindrical with basis vectors and origin not identical.
To my understanding, the most general solution is to split this into
is probably not worth a function, since it is vector subtraction.
The second part can be done most general (supporting also non-orthogonal coordinates)
using a transformation matrix containing the new basis vectors (as columns, i guess)
This only requires matrix vector product which is in the utils library.
https://en.wikipedia.org/wiki/Change_of_basis
theta using atan2 (the one that can deal with four quadrants, r=sqrt(x^2+y^2), z=z
The reverse would look like:
x = r cos(theta), y = r sin(theta), z=z
To reverse 2., the caller has to use the original basis transform with the inverse transformation matrix.
Matrix inversion can be taken from boost::qvm
The text was updated successfully, but these errors were encountered: