Hmm, interesting. While two angles can define any 3D direction, they can’t directly represent any rotation applied to any vector (for the reasons above). Given a start vector orthogonal to the first axis of rotation, any rotation can be represented though. So if we assume that a rotation about two predefined axes start with a predefined orthogonal vector to the first axis of rotation, then we can convert the rotation applied to another format which can be applied regardless of the starting vector. Does that count as defining a 3D rotation? xD
What’s a way to get 3 components to represent the orientation of a cframe that avoids trig functions?
If you know vector calculus, you could look at the Jacobian matrix of the system of equations. Where the Jacobian has full rank, the equations are independent.
My bad, I didn’t realize Idiomic was talking about Euler angles.
I think you mean to say that Euler angles are surjective, not injective.
I’m not sure what you mean by lerping the components independently, but the fact that Euler angles aren’t bijective implies that the derivative is degenerate at certain points (to be more clear, they are not injective), which gives you gimbal lock.
You can assume B is orthogonal, but that doesn’t prove B^t is orthogonal, which would be necessary for A^t * A = I to apply for A=B^t.
nope xd
i’m trying to say that for every 3x3 orthogonal matrix with the property that right:Cross(up)==back
, there needs to be at least one 3 component euler angle. If that is true, then using using your proof that there exists a matrix to transform one 3x3 orthogonal matrix to any arbritrary 3x3 orthogonal matrix, it is safe to say that there 3 component euler angles can represent all 3d rotations
don’t we want the injectivity and not care about the surjectivity as illustrated in the 2x2 image matrix here
local function lerp(r1,r2,t)
return v3(r1.X*(1-t)+r2.X*t,r1.Y*(1-t)+r2.Y*t,r1.Z*(1-t)+r2.Z*t)
end
I don’t understand, even if it were bijective (or injective) it could be a crazy mapping that is discontinuous at many points (this is not saying I am convinced that it is not bijective/injective though)
We are in agreement. I’m saying that for Euler angles to be injective, the Euler angle representation has to be unique when it exists. Surjectivity means that there is always an Euler angle representation (possibly several).
Yeah, but the Euler angles representation is continuous and differentiable. Not sure what you’re getting at here.
ok, my bad that makes sense
I just don’t understand the relation between gimbal lock and bijections
(i now understand why rotation matrix → euler angles isnt a bijection though)
Erm, my bad. Actually, gimbal lock isn’t really related to bijections, although it is related to the notion of a local bijection (more precisely, a local homeomorphism) which is a more elusive concept.
So, I didn’t take the time to read all the posts in here so some of this may have been answered already, but a lot of the answers to your questions can be found here. Specifically, the quaternions stuff, the Rodrigues rotation stuff, and the CFrame stuff.