Cohen-Tanugi Johann | 2 Jun 2009 07:35
Picon
Picon

quaternion and slerp interpolator, and all that


Hello,
I would be interested in quaternions, spherical rotations, and 
interpolations thereof, a la slerp..... I quickly look at the online doc 
of scipy/numpy, and did not find any mention of these. Can someone point 
me to such functionalities in either package?

thanks,
Johann
Robert Kern | 2 Jun 2009 07:41
Picon
Gravatar

Re: quaternion and slerp interpolator, and all that

On Tue, Jun 2, 2009 at 00:35, Cohen-Tanugi Johann <cohen <at> lpta.in2p3.fr> wrote:
>
> Hello,
> I would be interested in quaternions, spherical rotations, and
> interpolations thereof, a la slerp..... I quickly look at the online doc
> of scipy/numpy, and did not find any mention of these. Can someone point
> me to such functionalities in either package?

We don't have them.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
Cohen-Tanugi Johann | 2 Jun 2009 08:13
Picon
Picon

Re: quaternion and slerp interpolator, and all that

is there an interest in them?
JCT

Robert Kern wrote:
> On Tue, Jun 2, 2009 at 00:35, Cohen-Tanugi Johann <cohen <at> lpta.in2p3.fr> wrote:
>   
>> Hello,
>> I would be interested in quaternions, spherical rotations, and
>> interpolations thereof, a la slerp..... I quickly look at the online doc
>> of scipy/numpy, and did not find any mention of these. Can someone point
>> me to such functionalities in either package?
>>     
>
> We don't have them.
>
>   
Robert Kern | 2 Jun 2009 08:25
Picon
Gravatar

Re: quaternion and slerp interpolator, and all that

On Tue, Jun 2, 2009 at 01:13, Cohen-Tanugi Johann <cohen <at> lpta.in2p3.fr> wrote:
> is there an interest in them?

Sure!

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
Johann Cohen-Tanugi | 2 Jun 2009 15:09
Picon
Picon

Re: quaternion and slerp interpolator, and all that

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!
>
>   
killian koepsell | 3 Jun 2009 23:39
Picon

Re: quaternion and slerp interpolator, and all that

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,
(Continue reading)

Robert Kern | 3 Jun 2009 23:56
Picon
Gravatar

Re: quaternion and slerp interpolator, and all that

On Wed, Jun 3, 2009 at 16:39, killian koepsell <koepsell <at> gmail.com> wrote:
> 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.

Look at the docs/newdtype_example/ directory.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
SciPy-user mailing list
SciPy-user <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
(Continue reading)


Gmane