Re: how to calculate the 3D centre point of rotation given the angle of
- To: mathgroup at smc.vnet.net
- Subject: [mg132128] Re: how to calculate the 3D centre point of rotation given the angle of
- From: carlson at wolfram.com
- Date: Fri, 20 Dec 2013 05:33:42 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <20131217094251.02F2869E7@smc.vnet.net>
On Dec 17, 2013, at 3:42 AM, parr.will at googlemail.com wrote: > Hi, > > I've been looking at the Mathematica function: RotationTransform. > > in the mathematica help it says: =09 > > RotationTransform[Theta,w,p] > gives a 3D rotation (Theta in radians/degrees) around the axis w anchored at the point p. > > I have a problem where I have some 4 points in 3D space before and after a rotation is applied to them. I have the 3D rotation in radians/degrees and the axis (w), but want to find the point (p) around which the rotation occurs. > > eg: > (*points before rotation*) > pts1{{-21.365, -1.61273, 2.41973}, {-41.0366, -4.33682, > 4.78811}, {-18.1104, -20.673, 7.53}, {-19.804, 3.79904, 21.6102}}; > (*points after rotation*) > pts2={{-17.9409, -3.2446, -7.46078}, {-35.9907, -7.76684, = -14.7927},{-14.3971, -22.658, -4.21113}, {-25.7926, -1.61099, 10.8609}}; > > theta(*in degrees*)=29.3405 > > axis of rotation(*normalised*)={0.347494, -0.904472, 0.247341} > > (*axis of rotation not normalised={19.9099, -51.8224, 14.1716}*) > > can anyone help me find the centre point of rotation (p) please? > > best wishes, > > Will FindGeometricTransform will give you the transformation: t = FindGeometricTransform[pts2, pts1][[2]] t /@ pts1 Then Solve will give you the fixed point, ie, the center of rotation: {x, y, z} /. Solve[t[{x, y, z}] == {x, y, z}, {x, y, z}][[1]] Chris
- References:
- how to calculate the 3D centre point of rotation given the angle of
- From: parr.will@googlemail.com
- how to calculate the 3D centre point of rotation given the angle of