Message Boards Message Boards

0
|
8110 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Small angle rotation matrix

Posted 11 years ago
I'm trying to rotate a vector with negative coordinates by a rotation matrix with a small angle (0.030169414758875544 radians). Any idea why the X' value is so small after rotation (-5860.53)? Is it because of the influence of the much larger Y value (-159310)? If so, how can this be fixed?
 In[3]:= rotMat = RotationMatrix[0.030169414758875544]
 Out[3]= {{0.999545, -0.0301648}, {0.0301648, 0.999545}}
 
 In[2]:= point = ( {
    {-10680},
    {-159610}
   } )
 Out[2]= {{-10680}, {-159610}}
 
In[5]:= result = rotMat.point
Out[5]= {{-5860.53}, {-159860.}}
POSTED BY: David Waddell
3 Replies
Thanks Mark. I guess what confused me was the point was at one end of a line and the other end is at -9940, -400. Is there any way to rotate a complete 2D matrix (of arbitrary size) without having to do it on a point by point basis? I also need to skew it too, at some stage. For example:
{{ -2000,  -70}, {-2340, -140}, {-2640, -30940}, {-3860, -30960}, {-4160, -62830}, {-5460, -62850}, {-5790, -94980}, {-7160, -95030}, {-7470, -127330}, {-8850, -127400}, {-9190, -159540}, {-10680, -159610} {-9940,  -400},{-12940, -400}}
Thanks, Dave.
POSTED BY: David Waddell
Sorry, I missed a comma:
{{ -2000,  -70}, {-2340, -140}, {-2640, -30940}, {-3860, -30960}, {-4160, -62830}, {-5460, -62850}, {-5790, -94980}, {-7160, -95030}, {-7470, -127330}, {-8850, -127400}, {-9190, -159540}, {-10680, -159610} , {-9940,  -400}, {-12940, -400}}
POSTED BY: David Waddell
Posted 11 years ago
The solution is correct. Size relative to circle is small. For illustrative purposes see the following.The points are plotted at bottom of circle. There is a fixed line as a reference and then gauge 'moves' (rotates line): note second point is around 0.03-0.04 radians.
 pt1 = {-10680, -159610};
 
 pt2 = {-5860.536872000001`, -159859.537514`};
 
 Manipulate[Graphics[{Point[{pt1, pt2}], Circle[{0, 0},
 
     Norm[pt1]], Line[{{0, 0}, pt1}],
 
    Line[{{0, 0}, RotationMatrix[a].pt1}]}, AxesOrigin -> {0, 0},

  Axes -> True],

{{a, 0}, 0, Pi/2, AngularGauge[##, GaugeLabels -> Automatic] &},

ControlPlacement -> Bottom]

POSTED BY: Mark Dooris
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract