function PitNums = Visualise_Pit(XC,YC,ZC,Pit)
Visualise_pit brings up GUI showing slices of contours which allow visualisation of nested shell positions.
% Inputs
%---------------------
%Pit is an nxs array of binary decision variables equal to 1 if block n is
%in the optimal pit for shell s and 0 otherwise.
%XC,YC and ZC are nx1 arrays containing the x,y and z position (depth) of
%the centroid of each block.
%----------------------
% Outputs
%----------------------%PitNums is the interpolation of the incremental pit shells that each block
%belongs to onto an xyz grid for volume viewing. Where blocks belong to
%more than one pit the lower pit number (lower RF pit) is chosen so that
%nesting can be visualised.
Pit(Pit<1) = 0;Pit = Pit(1:size(XC),:);PitUnique = Pit;for i = 2:size(Pit,2) PitUnique(:,i) = Pit(:,i) - Pit(:,i-1); PitNumsScat = sum(PitUnique.* (repmat((1:size(Pit,2)),size(Pit,1),1)),2); endXC = XC + 9999;YC = YC + 9999;ZC = ZC + 9999;Z = nonzeros(ZC.*(sum(PitUnique,2)));X = nonzeros((sum(PitUnique,2)).*XC);Y = nonzeros((sum(PitUnique,2)).*YC);j = 1;XC = XC - 9999;YC = YC - 9999;ZC = ZC - 9999;X = X - 9999;Y = Y - 9999;Z = Z - 9999;if isempty (nonzeros((sum(PitUnique,2)))) ['Pit Shell number ' (num2str(PitNum)) ' is uneconomic']endPitNums = TriScatteredInterp(XC,YC,ZC,PitNumsScat,'natural');xgv = unique(XC);ygv = unique(YC);zgv = unique(ZC);[X,Y,Z] = meshgrid(xgv,ygv,zgv);pgv = PitNums(X,Y,Z);sliceomatic(pgv,xgv,ygv,zgv);
Best Answer