Replies: 2 comments 1 reply
-
I do see the |
Beta Was this translation helpful? Give feedback.
-
Hi @jffaust - the implementation of new Map([[1,0,0], [0,1,0], [0,0,1], [-1,0,0], [0,-1,0], [0,0,-1], [1,1,0], [1,0,1], [0,1,1]].map(x => [x, polar3([], x)]))
// (manually replaced floats w/ multiples of π and sqrt2 for better legibility)
// Map(9) {
// [ 1, 0, 0 ] => [ 1, 0, 0 ],
// [ 0, 1, 0 ] => [ 1, 0, π/2 ],
// [ 0, 0, 1 ] => [ 1, π/2, 0 ],
// [ -1, 0, 0 ] => [ 1, 0, π ],
// [ 0, -1, 0 ] => [ 1, 0, -π/2 ],
// [ 0, 0, -1 ] => [ 1, -π/2, 0 ],
// [ 1, 1, 0 ] => [ sqrt2, 0, π/4 ],
// [ 1, 0, 1 ] => [ sqrt2, π/4, 0 ],
// [ 0, 1, 1 ] => [ sqrt2, π/4, π/2 ]
// } Ps. I do know the roundtrip conversion between the both functions works and that has usually been enough for me. I only just found (and fixed) a bug in |
Beta Was this translation helpful? Give feedback.
-
Hello. I am using the cartersian3 function from https://github.com/thi-ng/umbrella/blob/develop/packages/vectors/src/cartesian.ts and I would like some help understanding its output. Based on the code, the provided polar vector should in the format of
[r,θ,ϕ]
. Trying it out, if I pass the following vector[1,0,0]
(radius of 1 without any rotations), I receive a the following output:[1,0,0]
. When I look online for spherical/polar coordinates system, the vector is aligned on the Z axis before the rotations are applied, like here on Wikipedia:https://en.wikipedia.org/wiki/Spherical_coordinate_system#/media/File:3D_Spherical.svg
So I would expect the resulting vector to be
[0,0,1]
. Am I missing something where the result is not in the format of[x,y,z]
?Beta Was this translation helpful? Give feedback.
All reactions