What level of symbolics would you expect from the module? Would you expect to be able to represent something like i*j unevaluated, or should every quaternion automatically simplify itself to normal form a*i + b*j + c*k + d?
Aaron Meurer On Fri, Aug 4, 2017 at 2:02 PM, Nikhil Pappu <nkhlpa...@gmail.com> wrote: > Thanks for the reply Ondřej. I will look into Julia's implementation. I > think that is a good place to start. I will eventually try to implement a > lot more though. I am looking towards a Quaternion Algebra submodule. > I found one such module in Sage so I guess that might be a good reference > as well. > > On Friday, August 4, 2017 at 12:23:38 PM UTC-5, Ondřej Čertík wrote: >> >> Hi Nikhil, >> >> On Fri, Aug 4, 2017 at 8:12 AM, Nikhil Pappu <nkhl...@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/df5f961d1f0432449fd7f16d2 >> 1fa14840eef8c72/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/62200f0 >> ac5efd6d4d042f5d778d0cf2856c38c50/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/f0b5dcbe-6a3c-4d36-8e0c-e6f7c9de2d1d%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/f0b5dcbe-6a3c-4d36-8e0c-e6f7c9de2d1d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAKgW%3D6LMrQpLi4q9UrYGodFZpGK1uVvGm%3DiXR5KxaJNW6%3DFRiQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.