Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Reposition 3D plane slice
Replies: 16   Last Post: Jun 15, 2012 5:22 PM

 Messages: [ Previous | Next ]
 Myles Posts: 11 Registered: 6/14/12
Reposition 3D plane slice
Posted: Jun 15, 2012 12:57 PM

"Matt J" wrote in message <jrfctv\$krf\$1@newscl01ah.mathworks.com>...
> "Myles" wrote in message <jrdnpb\$m0j\$1@newscl01ah.mathworks.com>...
> >
> > >
> > > Try this formula for deg instead
> > >
> > > deg=atan2(norm(u),Ztilt(3))*180/pi

> >
> > Unfortunately that didn't work either.

> =============
>
> If that's the case, I'm starting to wonder whether you're using the correct normal Ztilt. As a recap, here is the code we're using
>
> Ztilt = [0.1682 0.3477 -0.9224];
> u = cross(Ztilt, [0 0 1]);
> deg=atan2(norm(u),Ztilt(3))*180/pi;
>
> NewPoint = AxelRot(Ztilt', deg, u, [0 0 0])
>
>
> When I run this, I obtain
>
> NewPoint =
>
> -0.0000
> -0.0000
> 1.0000
>
> In other words, the normal to your original plane Ztilt is being correctly rotated so as to be parallel to the z-axis. Your points have to remain in a plane perpendicular to Ztilt after rotation, so they have to end up in a plane parallel to the xy-plane, if Ztilt is indeed the correct normal.
>
> It may help if you list some of the points in your data set so that we can test whether they indeed lie in a plane normal to the Ztilt you've given.

I've just checked a few points - they're not EXACTLY on the plane, but their distance from the plane is within 0.1 accurate - will this make a large difference?
Here's the points which generated the plane:

p1 = [21.4137 35.4495 25.3937]
p2 = [20.9058 23.6485 20.8531]
p3 = [13.2902 27.3318 20.8531]

And here are a few test points:
[22.3129 34.3892 25.2255] ~ 0.0624 'units' away from the plane
[22.6382 34.4658 25.2255]

I can't define units that well since I'm dealing with 3D ultrasound images, but I still think this is a relatively small number, and if it gives me reasonably close x/y coordinates I can just delete the z after and lose a little precision.

Date Subject Author
6/14/12 Myles
6/14/12 Matt J
6/14/12 Matt J
6/14/12 Myles
6/14/12 Matt J
6/14/12 Myles
6/14/12 Matt J
6/14/12 Myles
6/14/12 Matt J
6/14/12 Myles
6/15/12 Matt J
6/15/12 Matt J
6/15/12 Myles
6/15/12 Matt J
6/15/12 Myles
6/15/12 Matt J
6/14/12 Myles