
function [S1,S2,S] = testvarious

stoptest=0;
while(true)
    numpoint=10000;
    fprintf('===\n');
    S1=getS('2_rand');
    S2=getS('2_rand');
    S=multiplyS(S1,S2);
    if(rho(S{2}^(-1))>1); 
        continue; 
    end;
    while(true)
        flag1=tilearea(S1,'numpoint',numpoint);
        flag2=tilearea(S2,'numpoint',numpoint);
        flag =tilearea(S,'numpoint',numpoint);
        if(numpoint>=10000*3*3*3-1);
            stoptest=1;
            break;
        elseif( (flag1 && flag2 ) && ~flag);
            numpoint=numpoint*3;
        elseif( (flag1 && ~flag2) && flag );
            numpoint=numpoint*3;
        elseif( (~flag1 && flag2) && flag );
            numpoint=numpoint*3;
        else
            break;
        end
    end
    if(stoptest);
        break;
    end
    
end
figure;
tilearea(S1,'visual','numpoint',100000);

figure;
tilearea(S2,'visual','numpoint',100000);

figure;
tilearea(S,'visual','numpoint',100000);
end


function dummy; end %#ok<DEFNU> %Generates an error, if the 'end' of a function is missing. 
