Please refer to the Surface projection page for information on why to use this method and a practical example output.
 VMP::CreateSMP  - sample SMPs from the maps in a VMP
 
 FORMAT:       smp = vmp.CreateSMP(srf, opts)
 
 Input fields:
 
       srf         required surface file
       opts        1x1 struct with optional fields
        .interp    method ('nearest', {'linear'}, 'cubic')
        .ipfrom    interpolate from P + n * normal vector, default: -3
        .ipstep    interpolation stepsize, default: 1 (in normal vectors)
        .ipto      interpolate to P + n * normal vector, default: 1
        .mapsel    map selection, default: all maps in VMP
        .method    method to get value ('max', {'mean'}, 'median', 'min')
        .recalcn   boolean, recalc normals before sampling, default: false
 
 Output fields:
 
       smp         SMP object with as many maps as selected
 
 Note: results slightly differ from BV's results (sampling method)
% load VMP and SRF vmp = xff('*.vmp', 'Please select a VMP for SMP creation...'); srf = xff('*.srf', 'Please select a surface to sample VMP at...'); % convert to SMP smp = vmp.CreateSMP(srf); % save as and clear all VMP/SRF objects smp.SaveAs; vmp.ClearObject; srf.ClearObject;
smpcreateopts = struct( ... 'interp', 'cubic', ... 'ipfrom', 0, ... 'ipto', 0, ... 'mapsel', 1); smp = vmp.CreateSMP(srf, smpcreateopts);
smp = vmp.CreateSMP(srf, struct('recalcn', true));