1

I have fit a plane through three-dimensional curve made up of 18 points (18 x 3, columns are the x,y,z data). I know need to project these 18 points onto the plane. I then need to rotate this plane and points onto x-y plane with z=0.

C = planefit(Data(1,:),Data(2,:),Data(3,:)); % fit a plane the dataset 

% plane parameters
x = -100:500;
y = -200:500;
[xx yy] = meshgrid(x,y);
zz = C(1)*xx+C(2)*yy + C(3) + 2*randn(size(xx));
plot3(Data(1,:),Data(2,:),Data(3,:),'b+:');
xlabel('x'); ylabel('y'); zlabel('z');
hold on;
zzft = C(1)*xx+C(2)*yy + C(3); 
surf(xx,yy,zzft,'edgecolor','none') % plane
grid on

This is what I have thus far. Any help is greatly appreciated!!

Solomon
  • 11
  • 1
  • 2
  • And what is your question? – Steffen Nov 11 '14 at 07:34
  • My questions are: 1) how do I project these points on the plane I have fit through them? 2) I then need to rotate these point so they are on the xy plane. I am sorry I wasnt clear earlier @Steffen – Solomon Nov 11 '14 at 17:08
  • For 1): http://stackoverflow.com/questions/9605556/how-to-project-a-3d-point-to-a-3d-plane – Steffen Nov 12 '14 at 07:34
  • Thanks for your reply @Steffen. All the solutions to question in the link you posted assume I know the projected point's co-ordinates. I have the 3D points and the plane. How can I work out the projected points on the plane? – Solomon Nov 12 '14 at 10:16

0 Answers0