Home > src > plotBezier.m

plotBezier

PURPOSE ^

% Plot Bezier Curves

SYNOPSIS ^

function plotBezier( M, subM)

DESCRIPTION ^

% Plot Bezier Curves
 @author Mazurek/Bartalsky

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Plot Bezier Curves
0002 % @author Mazurek/Bartalsky
0003 
0004 %% plotBezier.m parameters
0005 % * *Description:*
0006 % * Plots beziercurves from subcoordinates, this function computes
0007 % * all dimensions and returns a plot which is used by the axes in the GUI.
0008 % * *Input:*
0009 % * _M_ ... matrix of the multidimensional observations, rows are
0010 % dimensions, collumns are observations
0011 % * _subM_ ... matrix shaped like M, contains subcoordinates of the M matrix
0012 function plotBezier( M, subM)
0013 
0014 hold on
0015 axis off
0016 plot([0 0],[0 1], 'black');
0017 for b=1:size(M,2)-1
0018 sub=subM(b).subs;
0019 m = size(sub,2);
0020 n = size(sub,1);
0021 
0022 t=(b-1:1/(m+1):b)';
0023 plot([b b],[0 1], 'black');
0024 x=[M(:,b) sub(:,:) M(:,b+1)]';
0025     for a=1 : n
0026     x1=x(:,a);    
0027     points=[t x1];   
0028     bc=bezier_(points, 30, []);
0029     plot(bc(:,1),bc(:,2),'r');
0030     end
0031 end
0032 
0033 end

Generated on Tue 31-May-2016 19:24:56 by m2html © 2005