gap> file:=HapFile("data500.png");;
gap> M:=ReadImageAsPureCubicalComplex(file,400);;
gap> A:=M!.binaryArray;;
gap> data:=[];;
gap> for i in [1..Length(A)] do
> for j in [1..Length(A[1])] do
> if A[i][j]=1 then Add(data,[i,j]); fi;
> od;
> od;
gap> sample:=List([1..200],i->Random(data));;
gap> S:=VectorsToSymmetricMatrix(sample,EuclideanApproximatedMetric);;
