function radonder(m)

%This was used to compute the Radon-Nikodym derivative of the derivative
%measures with respect to the Kusuoka measure. I basically copied the code
%from "plotder".

A0=[1 2/9 2/9 ; 0 2/9 -1/9; 0 -1/9 2/9];
A1=[2/9 0 -1/9; 2/9 1 2/9; -1/9 0 2/9];
A2=[2/9 -1/9 0 ; -1/9 2/9 0; 2/9 2/9 1];
A=[A0 A1 A2];


x=[1 0 0 ; 0 1 0; 0 0 1];
for k=1:1:m
    x1=[];
    for n=1:1:max(size(x))/3
        x1=[x1 ; A0*x(3*n-2:3*n,:)];
    end
    x2=[];
    for n=1:1:max(size(x))/3
        x2=[x2 ; A1*x(3*n-2:3*n,:)];
    end
    x3=[];
    for n=1:1:max(size(x))/3
        x3=[x3 ; A2*x(3*n-2:3*n,:)];
    end
    x=[x1 ; x2 ; x3];
end

y1=[];
y2=[];
for n=1:1:max(size(x))/3
    y1=[y1 ; [1 0 0]*x(3*n-2:3*n,:)*[1 ; 1 ; 1]];
    y2=[y2 ; [0 1 0]*x(3*n-2:3*n,:)*[1 ; 1 ; 1]];
end
y1=(3/5)^m*y1;
y2=(3/5)^m*y2;


z=[];
for n=1:1:max(size(y1))
    z=[z ; y1(n,1)/y2(n,1)];
end
max(z(2:max(size(y1))))

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

size(v);

%gaskplot(v,m-1)

hold off
plot3(v(2:max(size(y1)),1),v(2:max(size(y1)),2),z(2:max(size(y1))),'.')