[SciPy-user] quaternion and slerp interpolator, and all that

killian koepsell koepsell at gmail.com
Wed Jun 3 17:39:56 EDT 2009


Hi,

I have a related question. I have programmed a couple of
quaternion-valued functions and used arrays with a customized numpy
dtype for it. Something like

  dtype = [('r',np.double),('i',np.double),('j',np.double),('k',np.double)]

Now, I am wondering if there is an easy way (e.g. using cython) to
define a custom quaternion scalar type and make numpy aware of it. I
found some information in the numpy book about this topic but couldn't
find any example code.

If anyone has working example code, that would be great -- as I said,
ideally using cython, but c code would be fine too.

Thanks,
  Kilian

On Tue, Jun 2, 2009 at 6:09 AM, Johann Cohen-Tanugi
<Johann.COHEN-TANUGI at lpta.in2p3.fr> wrote:
> well, I found
> https://scicompforge.org/tracker/scicompforge/file/trunk/crystallography/usage/test/output/python/Quaternion.py?rev=2139
>
> and
> http://cgkit.sourceforge.net/doc2/quat.html
>
> I hope that helps others in the list..... it would be nice to have this
> in scipy though....
> best,
> JCT
>
> Robert Kern wrote:
>> On Tue, Jun 2, 2009 at 01:13, Cohen-Tanugi Johann <cohen at lpta.in2p3.fr> wrote:
>>
>>> is there an interest in them?
>>>
>>
>> Sure!
>>
>>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list