Matlab kullanarak baklava şekli yapmaya çalışıyorum. Bir sürü for döngüsü kullanınca işin içinden çıkamadım. Var mıdır bunun daha kolay bir yolu?

Sample Code:
%Points(x,y): (1,1), (2,2), (1,2), (0,1)
x = [1 2 1 0];
y = [1 2 2 1];
figure;
%Draw and fill polygon with green color
fill(x,y,'g');
%Set axis to a better size
axis([0 3 0 3]);
%Alternate method without fill
figure;
%Draw coordinates on graph, repeat first coordinate to connect with last
plot([x x(1)],[y y(1)],'r-');
%Set axis to a better size
axis([0 3 0 3]);
Bu örneği kullan. Noktalarını istediğin gibi girerek halledersin.
Vicy89

1