Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Rotating a list of 3D point coordinates in one shot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100031] Re: [mg100016] Rotating a list of 3D point coordinates in one shot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 22 May 2009 01:44:40 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Look at RotationTransform

list = {
   {1., 0., 0.}, {0.987688, 0.156434, 0.},
   {0.951057, 0.309017, 0.}, {0.891007, 0.45399, 0.},
   {0.809017, 0.587785, 0.}, {0.707107, 0.707107, 0.},
   {0.587785, 0.809017, 0.}, {0.45399, 0.891007, 0.},
   {0.309017, 0.951057, 0.}, {0.156434, 0.987688, 0.},
   {0., 1., 0.}, {-0.156434, 0.987688, 0.},
   {-0.309017, 0.951057, 0.}, {-0.45399, 0.891007, 0.},
   {-0.587785, 0.809017, 0.}, {-0.707107, 0.707107, 0.}, {-0.809017, 
    0.587785, 0.}, {-0.891007, 0.45399, 0.},
   {-0.951057, 0.309017, 0.}, {-0.987688, 0.156434, 0.},
   {-1., 0., 0.}};

list2 = RotationTransform[180 Degree, {-1, -2, -1}][#] & /@ list;

ListPlot3D[{list, list2}]


Bob Hanlon

---- Bill <WDWNORWALK at aol.com> wrote: 

=============
Hi:

I have a list of 3D coordinates:

list={{1., 0., 0.}, {0.987688, 0.156434, 0.}, 
{0.951057, 0.309017, 0.}, {0.891007, 0.45399, 0.}, {0.809017, 0.587785, 0.}, {0.707107, 0.707107, 0.}, 
{0.587785,0.809017, 0.}, {0.45399, 0.891007, 0.}, {0.309017, 0.951057, 0.}, {0.156434, 0.987688, 0.}, 
{0., 1., 0.}, {-0.156434, 0.987688, 0.}, 
{-0.309017, 0.951057, 0.}, {-0.45399, 0.891007, 0.}, 
{-0.587785, 0.809017, 0.}, {-0.707107, 0.707107, 0.}, 
{-0.809017, 0.587785, 0.}, {-0.891007, 0.45399, 0.}, 
{-0.951057, 0.309017, 0.}, {-0.987688, 0.156434, 0.}, 
{-1., 0., 0.}}.
  
I'd like to rotate all the coordinates in the list in one shot, using something like this:
  
Rotate[list, 180 Degree, {-1, -2, -1}]}} (*Axis angle rotation.*)
  
I haven't gotten this to work though. I can rotate a single point at a time using a similiar method, but 
that is very time consuming.
  
 Question: Is there a way to rotate a list of numerous 3D coordinates such as in my example above, and if so, how do I code that using Mathematica 6.0.1? 
  
  
Thanks in advance,
  
Bill



  • Prev by Date: Re: Rotating a list of 3D point coordinates in one shot
  • Next by Date: Re: Solving integral equations numerically
  • Previous by thread: Re: Rotating a list of 3D point coordinates in one shot
  • Next by thread: Re: Rotating a list of 3D point coordinates in one shot