PURBFInterpolant

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 classdef PURBFInterpolant < Interpolant
0002     %PURBFInterpolant Interpolant using Partition of Unity Radial Basis Functions
0003     
0004     properties
0005         coverCenters;
0006         coverRadius;
0007         weightFun; % Compactly-supported RBF used for interpolation weights (Sheppard's blending of individual RBF in the 2D cover)
0008     end
0009     
0010     methods
0011         function obj = PURBFInterpolant(x, y, z, varargin)
0012 
0013             % Superclass constructor
0014             obj@Interpolant(x, y, z);
0015             
0016             [centers, radius] = PURBFInterpolant.circleCover2D(x, y, 10, 0.75, 10);
0017             
0018             figure;
0019             plot(x, y, '.');
0020             for i = 1:size(centers, 1)
0021                 plotCircle(centers(i, 1), centers(i, 2), radius(i));
0022             end
0023                         
0024         end
0025         
0026         function z = interpolate(obj, x, y)
0027             z = [];
0028         end        
0029     end
0030     methods (Static)
0031         function [centers, radius] = circleCover2D(x, y, m, overlap, minSamples)
0032             % Covers a 2D region with, at most, m x m overlapping circles
0033             
0034             % Parameters' check
0035             if ~isvector(x) || ~isvector(y)
0036                 error('x and y inputs must be vectors');
0037             end            
0038             if numel(x) ~= numel(y)
0039                 error('x and y inputs must have the same number of elements');
0040             end
0041             
0042             % Compute the extends of the data
0043             minX = min(x); 
0044             minY = min(y);
0045             maxX = max(x); 
0046             maxY = max(y);
0047             
0048             % Compute the delta between regularly placed centers of the
0049             % circles
0050             delta = (maxX-minX)/m; 
0051             [cx, cy] = meshgrid(minX+0.5*delta:delta:maxX+0.5*delta, minY-0.5*delta:delta:maxY+0.5*delta);
0052             centers = [cx(:), cy(:)];
0053             radius = overlap*delta*ones(numel(cx), 1);
0054             
0055             % Check if each individual circle in the cover has at least
0056             
0057         end
0058     end
0059 end
0060

Generated on Thu 10-Dec-2020 17:34:27 by m2html © 2005