-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I think it can be simplified into
vec3 cos_a = cos(a);
vec3 sin_a = sin(a);
and then not recompute them in the mat3 my, mx, mz code.
Also I think we can optimize with a symbolic matrix computation.
I tried to put it through wolfram alpha:
{
{Cos[a x] Cos[a z] + Sin[a x] Sin[a y] Sin[a z], Cos[a z] Sin[a x] Sin[a y] - Cos[a x] Sin[a z], Cos[a y] Sin[a x]}
, {Cos[a y] Sin[a z], Cos[a y] Cos[a z], -Sin[a y]}
, {-(Cos[a z] Sin[a x]) + Cos[a x] Sin[a y] Sin[a z], Cos[a x] Cos[a z] Sin[a y] + Sin[a x] Sin[a z], Cos[a x] Cos[a y]}
}
Originally posted by @jcelerier in #15 (comment)
Metadata
Metadata
Assignees
Labels
No labels