function plotSet(trB, edg, D, Dx, Dy) % converting to decimal coordinates/data % trD trC % x y o r g b % 14 77.5 37 1 0 0 % 36.5 55. 101 0 0 1 % 14.5 36.5 43 0 1 0 % vertices and angles trD = [pow2(6:-1:-1)*trB(1:8,:) pow2(6:-1:-1)*trB((1:8)+8,:) (pow2(6:-1:0)*trB((1:7)+16,:))*pi/180 ]' ; %angles in radians % scaled RGB matrix trC = [[2 1]*trB((1:2)+23,:) [2 1]*trB((1:2)+25,:) [2 1]*trB((1:2)+27,:)]'/3 ; X1 = trD(1,1) + [0 edg(1)*[ sin(trD(1,3)) cos(trD(1,3)-pi/6)]]+Dx ; Y1 = trD(1,2) + [0 edg(1)*[-cos(trD(1,3)) sin(trD(1,3)-pi/6)]] ; X2 = trD(2,1) + [0 edg(2)*[ sin(trD(2,3)) cos(trD(2,3)-pi/6)]]+Dx ; Y2 = trD(2,2) + [0 edg(2)*[-cos(trD(2,3)) sin(trD(2,3)-pi/6)]] ; X3 = trD(3,1) + [0 edg(3)*[ sin(trD(3,3)) cos(trD(3,3)-pi/6)]]+Dx ; Y3 = trD(3,2) + [0 edg(3)*[-cos(trD(3,3)) sin(trD(3,3)-pi/6)]] ; fill(X1, Y1, trC(1,:), X2, Y2, trC(2,:), X3, Y3, trC(3,:)) hold on plot([Dx+D Dx+D], [0 Dy])