Hi Nikhil, On Fri, Aug 4, 2017 at 8:12 AM, Nikhil Pappu <nkhlpa...@gmail.com> wrote: > I was able to find some support for Quaternion Rotation in the Vector module > but I did not come across a general submodule on Quaternions which allows > users to define them and work with them. > I would like to implement a submodule which can support Quaternion > Arithmetic, Functions, Quaternion Calculus, Rotation conversions etc. > It can then be extended to support more advanced Quaternion Algebra. > > Would it be a good idea for me to start working on this?
I think that would be useful. I was just looking for such a module few days ago. You should look into how Julia does it: https://github.com/JuliaGeometry/Quaternions.jl Looks like they represent a quaternion a+bi+cj+dk as a tuple of of coefficients (a, b, c, d) and they also store a flag if the norm can be computed (it seems). Here I wrote code to multiply quaternions: https://gitlab.com/certik/ijk/blob/df5f961d1f0432449fd7f16d21fa14840eef8c72/mul.py I used complex 2x2 matrices. But Julia simply computes the new coefficients (a, b, c, d) directly: https://github.com/JuliaGeometry/Quaternions.jl/blob/62200f0ac5efd6d4d042f5d778d0cf2856c38c50/src/Quaternion.jl#L88 That's probably the way to go. Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CADDwiVD8jLG6UAhdHnchkvN-71or%2BSfiyJEqGEoF-3PRJsRX-w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.