<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258</link>
    <title>MATLAB Central Newsreader - Find instant axis of rotation</title>
    <description>Feed for thread: Find instant axis of rotation</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 27 Oct 2009 20:52:03 -0400</pubDate>
      <title>Find instant axis of rotation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258#690129</link>
      <author>Henning Olsson</author>
      <description>I need to estimate/calculate the location of a rotation axis for a number of points in space. I have the position of the all of points (x,y,z) at all of the different times. The relative location of all the points remain the same as they are all part of a rigid body.&lt;br&gt;
&lt;br&gt;
I started out by creating a rotation matrix around the origin (by using 3 points in step n and step n+1 and then solving for the rotation matrix). I then used an Axis-Angle approach to calculate the axis around which they rotate.&lt;br&gt;
&lt;br&gt;
The problem is that I am pretty sure that for the actual motion the axis doesn't go through the origin but is translated somehow in space. But I'm not sure how to find this translation. Anyone have any ideas?&lt;br&gt;
&lt;br&gt;
Another idea I had was to to &quot;fit&quot; a cylinder to the points. If the points from two steps are all on the surface on the cylinder, the cylinder axis must be the instant axis of rotation. Any ideas on how to do such a calculation (preferably analytically).</description>
    </item>
    <item>
      <pubDate>Tue, 27 Oct 2009 22:17:04 -0400</pubDate>
      <title>Re: Find instant axis of rotation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258#690153</link>
      <author>Jan Simon</author>
      <description>Dear Henning!&lt;br&gt;
&lt;br&gt;
&amp;gt; I need to estimate/calculate the location of a rotation axis for a number of points in space. I have the position of the all of points (x,y,z) at all of the different times. The relative location of all the points remain the same as they are all part of a rigid body.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I started out by creating a rotation matrix around the origin (by using 3 points in step n and step n+1 and then solving for the rotation matrix). I then used an Axis-Angle approach to calculate the axis around which they rotate.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The problem is that I am pretty sure that for the actual motion the axis doesn't go through the origin but is translated somehow in space. But I'm not sure how to find this translation. Anyone have any ideas?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Another idea I had was to to &quot;fit&quot; a cylinder to the points. If the points from two steps are all on the surface on the cylinder, the cylinder axis must be the instant axis of rotation. Any ideas on how to do such a calculation (preferably analytically).&lt;br&gt;
&lt;br&gt;
Ask Google for &quot;helical axis&quot; or &quot;screw parameters&quot;.&lt;br&gt;
On the KWON3D site, the orientation of the axis is not clearly defined: If you assume a positive angle, the anti-symmetrical H-H' defines the orientation of the axes.&lt;br&gt;
A simple method is shown in:&lt;br&gt;
&lt;a href=&quot;http://robotics.caltech.edu/~jwb/courses/ME115/handouts/rodriguez.pdf&quot;&gt;http://robotics.caltech.edu/~jwb/courses/ME115/handouts/rodriguez.pdf&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Be aware that there are some numerical problems, e.g. if the coordinates are noisy or the rotational angle is tiny...&lt;br&gt;
&lt;br&gt;
Good luck, Jan</description>
    </item>
    <item>
      <pubDate>Wed, 28 Oct 2009 07:18:00 -0400</pubDate>
      <title>Re: Find instant axis of rotation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258#690219</link>
      <author>Bruno Luong</author>
      <description>&quot;Henning Olsson&quot; &amp;lt;asd@prutcom.com&amp;gt; wrote in message &amp;lt;hc7mhj$69k$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I need to estimate/calculate the location of a rotation axis for a number of points in space. I have the position of the all of points (x,y,z) at all of the different times. The relative location of all the points remain the same as they are all part of a rigid body.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I started out by creating a rotation matrix around the origin (by using 3 points in step n and step n+1 and then solving for the rotation matrix). I then used an Axis-Angle approach to calculate the axis around which they rotate.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The problem is that I am pretty sure that for the actual motion the axis doesn't go through the origin but is translated somehow in space. But I'm not sure how to find this translation. Anyone have any ideas?&lt;br&gt;
&lt;br&gt;
1. Rotation axis (direction only) R is perpendicular to the velocity field. So estimate R is easy, for example as following:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Minimize Sum | Projection R on V_i |^2 such that |R|=1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| Projection R on V |^2 = &amp;lt;R,V&amp;gt;^2 / | V |^2&lt;br&gt;
&lt;br&gt;
2. Project the velocity to the plane perpendicular to R, V projected is tangential to the circle centered about the axis center. The magnitude is proportional to the radius. Write this as equation than solve it for he axis center.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 28 Oct 2009 22:54:02 -0400</pubDate>
      <title>Re: Find instant axis of rotation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258#690478</link>
      <author>Henning Olsson</author>
      <description>Thank you both for your suggestions,&lt;br&gt;
&lt;br&gt;
I did some work with based on that pdf that was posted (mainly because I have very limited experience of vector fields).&lt;br&gt;
&lt;br&gt;
It seems like I can successfully calculate the direction of the axis (eq 8 in pdf). But I have problems getting the translation of the axis correct (eq 10). &lt;br&gt;
&lt;br&gt;
I've tried with many different motions/data points but always get more or less the same translation (but different directions).&lt;br&gt;
&lt;br&gt;
Here is my code with two example points (I've also have tried increased accuracy on the data points with out success).&lt;br&gt;
&lt;br&gt;
Once again, I would be very grateful for all comments/suggestions!&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
%points before&lt;br&gt;
p0=[-199.177	399.997	172.887]';&lt;br&gt;
q0 = [-199.177	-400.003	172.872]';&lt;br&gt;
r0 = [-2479.583	244.996	225.422]';&lt;br&gt;
%points after&lt;br&gt;
p1 = [-199.056	399.997	172.048]';&lt;br&gt;
q1 = [-199.056	-400.003	172.034]';&lt;br&gt;
r1 = [-2479.425	244.996	226.179]';&lt;br&gt;
% % &lt;br&gt;
&lt;br&gt;
w = cross(((q1-q0)-(r1-r0)),((p1-p0)-(r1-r0)))/dot(((q1-q0)-(r1-r0)),((p1+p0)-(r1+r0))); %Calculates rotation vector&lt;br&gt;
&lt;br&gt;
rot_angle = norm(w) %this is tan(theta/2) where theta is actuall rot angle (this &lt;br&gt;
angle matches really well with data output)&lt;br&gt;
&lt;br&gt;
w=w/norm(w); %normalizes rotation axis for further calculations&lt;br&gt;
&lt;br&gt;
p = 0.5*((cross(w,(p1-p0))/rot_angle)-(dot(w,p1+p0).*w+p0+p1)); %This is where something goes wrong</description>
    </item>
    <item>
      <pubDate>Thu, 29 Oct 2009 10:43:03 -0400</pubDate>
      <title>Re: Find instant axis of rotation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264258#690587</link>
      <author>Jan Simon</author>
      <description>Dear Henning Olsson!&lt;br&gt;
&lt;br&gt;
&amp;gt; p0=[-199.177	399.997	172.887]';&lt;br&gt;
&amp;gt; q0 = [-199.177	-400.003	172.872]';&lt;br&gt;
&amp;gt; r0 = [-2479.583	244.996	225.422]';&lt;br&gt;
&amp;gt; %points after&lt;br&gt;
&amp;gt; p1 = [-199.056	399.997	172.048]';&lt;br&gt;
&amp;gt; q1 = [-199.056	-400.003	172.034]';&lt;br&gt;
&amp;gt; r1 = [-2479.425	244.996	226.179]';&lt;br&gt;
&lt;br&gt;
What values do you expect?&lt;br&gt;
I get:&lt;br&gt;
&amp;nbsp;&amp;nbsp;Angle: 0.000699&lt;br&gt;
&amp;nbsp;&amp;nbsp;Translation: -0.000261&lt;br&gt;
&amp;nbsp;&amp;nbsp;Helical axis: [-0.00178, 0.999998, 2.792e-5]&lt;br&gt;
&amp;nbsp;&amp;nbsp;Origin of axis: [-1397.32, -2.4959, -04475]&lt;br&gt;
This set of values is not unique, e.g. all points on the axis can be used as origin. I've defined the point with the minimal distance to the global origin.&lt;br&gt;
&lt;br&gt;
Please be aware, that the rotational angle of your example is tiny and rounding errors can dominate the result! There is no difference between a rotation around a point far away and a pure translation...&lt;br&gt;
&lt;br&gt;
Jan</description>
    </item>
  </channel>
</rss>

