function x=plotkusuoka(m)

q0=[1/2 1]; q1=[0 0]; q2=[1 0];
v=[1/2 1/2];
for i=1:1:m
    v=[qcontract(v,q0); qcontract(v,q1); qcontract(v,q2)];
end

M=wordmatrix(m);
x=[];
for j=1:1:3^m
    x=[x ; kusuoka(M(j,:))];
end


%hold off
plot3(v(:,1),v(:,2),x,'.g')
hold on
y=SG(m);
for n=1:1:3^(m)
    hold on
    
    plot3([y(3*n-2:3*n,1); y(3*n-2,1)],[y(3*n-2:3*n,2) ;y(3*n-2,2)], [0 0 0 0], 'y')
end
