So I have plane. I need to traslate this plane to a few different points, taking 10 steps to get to the next point. My problem is that my trasnformation matrix is not the same size as the plane matrix. I am wondering how I can make this work.
Any help is appreciated.
here is my code.
clear all; close all;
x0 = 2; % defining the starting point in the coordinate system
y0 = -3;
x_plane = [0,1,1.5, 2,2.5,2.5,1.5,3,4,4,0]+x0; % building plane at the starting point
y_plane = [0,1,1.0,-1,-1.,1.0,1.0,1,2,0,0]+y0;
plane = [x_plane;y_plane;ones(size(x_plane))]; % creating array of x,y positions
%h = plot_polygon(plane); % pushing vector of positions into function
axis equal; grid on; % setting axis parameters
%set(h(1),'Marker','x','MarkerEdgeColor','k') % Setting markers to show specified points
% x and y traslations
x = [linspace(0,10,10),linspace(10,10,10),linspace(10,0,10)];
y = [linspace(0,0,10),linspace(0,10,10),linspace(10,0,10)];
for i = 1:1:length(x)
T = [1,0,x(i); 0,1,y(i); 0,0,1] %trasnformation matrix
planeNEW = plane * T
plot_polygon(planeNEW); % pushing vector of positions into function
axis equal; grid on; % setting axis parameters
clf
pause(0.5)
end