function pbeDefinition = growthDensitySampleNormalHighRes

%% call common definition
pbeDefinition = growthDensityCommon;


%% Initial distribution
rng(1);
% discrete sampling
%! ToDo: I need to understand cov to lay out the normal distribution
%        properly.
% Design code:
% stdX=1e-1;stdY=5e-1;corr=1/sqrt(2);
% disD = obtainDistributionDiscrete('normal', 'mean', [3 3], 'cov', [stdX^2 corr*stdX*stdY; corr*stdX*stdY stdY^2], 'nSample', 1e3)
% plot(disD.positionMatrix(1,:), disD.positionMatrix(2,:), 'r.')
%%
% xlim([0 2]),ylim([0 2])
std = max([pbeDefinition.seeding.std1(:); ...
           pbeDefinition.seeding.std2(:)])*1.75;
dist = norm(pbeDefinition.seeding.mean1 - ...
            pbeDefinition.seeding.mean2)*0.75;
corr = 1/sqrt(2);
disD = obtainDistributionDiscrete('normal', ...
    'nSample', pbeDefinition.seeding.nSample*10, ...
    'mean', 0.5*pbeDefinition.seeding.mean1 + ...
            0.5*pbeDefinition.seeding.mean2, ...  %m
    'cov', [std^2 std*dist*corr; std*dist*corr dist^2]);
%%
% application to pbeDefinition
pbeDefinition.seeding.positionMatrix = disD.positionMatrix;       % m
pbeDefinition.seeding.numberVector = ...
    pbeDefinition.seeding.fhandle(disD.positionMatrix) ./ ...
    disD.probabilityVector; % #
pbeDefinition.seeding.probabilityVector = disD.probabilityVector;    

% close all
% plot3(disD.positionMatrix(1,:), disD.positionMatrix(2,:), ...
%     pbeDefinition.seeding.fhandle(disD.positionMatrix), 'r.')