I have a square with dimension of 50×50 with four nodes, each node will vary in range of (-10,10) which means each corner of the square has 3 nodes along x axis (Fig below)
I want to connect each node per corner to nodes in other corners in order to make different quadrilateral with different shape. For this special case It would be 3^4=81 different shapes and I need to plot them as subplot (8,8,n), I have written intial part of the code but I dont know how to connect all coressponding nodes to each other to make 64 different quadrilateral. Could you please tell me how to do this? Thanks
clc;clear;close all;x = [-25; 25; 25; -25];y = [-25; -25; 25; 25];for i=1:4 for j=-10:10:10 x(i,:)=x(i,:)+j; Y(:,:)=y; subplot(2,2,i); plot(x,y,'.');xlim([-50 50])ylim([-50 50])k = boundary(x,y);hold on;plot(x(k),y(k)); end end
Best Answer