Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16350
| From | carlson@wolfram.com |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: how to calculate the 3D centre point of rotation given the angle of |
| Date | 2013-12-20 09:20 +0000 |
| Message-ID | <l9125a$nlk$1@smc.vnet.net> (permalink) |
| References | <20131217094251.02F2869E7@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On Dec 17, 2013, at 3:42 AM, parr.will@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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: how to calculate the 3D centre point of rotation given the angle of carlson@wolfram.com - 2013-12-20 09:20 +0000
csiph-web