function testnurbs

%line = nrbmak([0.0 1.5; 0.0 3.0],[0.0 0.0 1.0 1.0]); 
%nrbplot(line, 2)

%   Construct a surface in the x-y plane i.e 
%      
%     ^  (0.0,1.0) ------------ (1.0,1.0) 
%     |      |                      | 
%     | V    |                      | 
%     |      |      Surface         | 
%     |      |                      | 
%     |      |                      | 
%     |  (0.0,0.0) ------------ (1.0,0.0) 
%     | 
%     |------------------------------------> 
%                                       U  
% 
%coefs = cat(3,[0 0; 0 1],[1 1; 0 1]); 
%knots = {[0 0 1 1]  [0 0 1 1]};
%plane = nrbmak(coefs,knots); 
%nrbplot(plane, [2 2])


%Anzahl Knoten (Knotenvektor=knots) = Anzahl Kontrollpunkte + Grad der Kurve - 1
%Kontrollpunkte: cntrl=coefs


% input Punktewolke gesamt (Spaltenvektoren)
x=xlsread('ModelleXLS',5,'A5:A18'); %Punkte x-Achse aus Datei ModelleXLS, Blatt 5, Zellen... eingelesen
y=xlsread('ModelleXLS',5,'B5:B18'); %Punkte y-Achse aus Datei ModelleXLS, Blatt 5, Zellen... eingelesen
z=xlsread('ModelleXLS',5,'C5:C18'); %Punkte z-Achse aus Datei ModelleXLS, Blatt 5, Zellen... eingelesen (Funktion f(x,y))
x=x';
y=y';
z=z';

coefs=[x; y; z]; %2D array mit 3 Zeilen und ... Spalten
knots=xlsread('ModelleXLS', 5, 'H5:H20'); % 3. Grad
knots=knots';
headsurface=nrbmak(coefs, knots);
nrbplot(headsurface, [14])


%nurbs2IGES