<br><br><div class="gmail_quote">On Tue, Jun 30, 2009 at 10:56 AM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Jun 30, 2009 at 10:40 AM, Nils Wagner <span dir="ltr"><<a href="mailto:nwagner@iam.uni-stuttgart.de" target="_blank">nwagner@iam.uni-stuttgart.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Tue, 30 Jun 2009 10:27:05 -0600<br>
  Charles R Harris <<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>> wrote:<br>
> On Tue, Jun 30, 2009 at 5:11 AM, Nils Wagner<br>
> <<a href="mailto:nwagner@iam.uni-stuttgart.de" target="_blank">nwagner@iam.uni-stuttgart.de</a>>wrote:<br>
><br>
>> On Tue, 30 Jun 2009 11:22:34 +0200<br>
>>  "Nils Wagner" <<a href="mailto:nwagner@iam.uni-stuttgart.de" target="_blank">nwagner@iam.uni-stuttgart.de</a>> wrote:<br>
>><br>
>>>  Hi all,<br>
>>><br>
>>> How can I build the following product with numpy<br>
>>><br>
>>> q_i = \varepsilon_{ijk} q_{kj}<br>
>>><br>
>>> where  \varepsilon_{ijk} denotes the permutation symbol.<br>
>>><br>
>>> Nils<br>
>>><br>
>>  Sorry for replying to myself.<br>
>> The permutation symbol is also known as the Levi-Civita<br>
>>symbol.<br>
>> I found an explicit expression at<br>
>> <a href="http://en.wikipedia.org/wiki/Levi-Civita_symbol" target="_blank">http://en.wikipedia.org/wiki/Levi-Civita_symbol</a><br>
>><br>
>> How do I build the product of the Levi-Civita symbol<br>
>>\varepsilon_{ijk} and<br>
>> the two dimensional array<br>
>> q_{kj}, i,j,k = 1,2,3 ?<br>
>><br>
><br>
> Write it out explicitly. It essentially antisymmetrizes<br>
>q and the three off<br>
> diagonal elements can then be treated as a vector.<br>
>Depending on how q is<br>
> formed and the resulting vector is used there may be<br>
>other things you can do<br>
> when you use it in a more general expression. If this is<br>
>part of a general<br>
> calculation there might be other ways of expressing it.<br>
><br>
> Chuck<br>
<br>
</div></div>Hi Chuck,<br>
<br>
Thank you for your response.<br>
The problem at hand is described in a paper by Angeles<br>
namely equation (17c) in<br>
"Automatic computation of the screw parameters of<br>
rigid-body motions.<br>
Part I: Finitely-separated positions"<br>
Journal of Dynamic systems, Measurement and Control, Vol.<br>
108 (1986) pp. 32-38<br>
</blockquote></div></div><div><br>You can solve this problem using quaternions also, in which case it reduces to an eigenvalue problem. You will note that such things as PCA are used in the papers that reference the cited work so you can't really get around that bit of inefficiency.<br>

</div></div></blockquote><div><br>Here's a reference to the quaternion approach: <a href="http://people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf">http://people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf</a>. You can get the translation part from the motion of the centroid.<br>
 <br>If you are into abstractions you will note that the problem reduces to minimising a quadratic form in the quaternion components. The rest is just algebra ;)<br><br>Chuck<br></div></div><br>