function [cs,Ps] = randGenerateCameras(nrOfCameras,f,Sx,Sy,Ox,Oy,xRange,yRange,zRange,sC)
    
    cx = xRange(1)+rand(nrOfCameras,1)*(xRange(2)-xRange(1));
    cy = yRange(1)+rand(nrOfCameras,1)*(yRange(2)-yRange(1));
    cz = zRange(1)+rand(nrOfCameras,1)*(zRange(2)-zRange(1));
    
    cs = [cx,cy,cz];
    
    for i = 1:nrOfCameras
        d = sC([1,3])-cs(i,[1,3]);
        d = d/norm(d,2);
        theta = acos(d(2));
        if(cs(i,1)<0)
            theta = -theta;
        end
        R = build3DYRotation(theta);
        Ps{i} = buildCameraMatrix(R,cs(i,:),f,Sx,Sy,Ox,Oy);
    end
    