1 function surf = nrbcylind(height,radius,center,sang,eang)
3 % NRBCYLIND: Construct a cylinder or cylindrical patch.
8 % srf = nrbcylind(height)
9 % srf = nrbcylind(height,radius)
10 % srf = nrbcylind(height,radius,center)
11 % srf = nrbcylind(height,radius,center,sang,eang)
15 % height : Height of the cylinder along the axis, default 1.0
17 % radius : Radius of the cylinder, default 1.0
19 % center : Center of the cylinder, default (0,0,0)
21 % sang : Start angle relative to the origin, default 0.
23 % eang : End angle relative to the origin, default 2*pi.
27 % srf : cylindrical surface patch
31 % Construct a cylinder or cylindrical patch by extruding a circular arc.
33 % Copyright (C) 2000 Mark Spink
35 % This program is free software: you can redistribute it and/or modify
36 % it under the terms of the GNU General Public License as published by
37 % the Free Software Foundation, either version 2 of the License, or
38 % (at your option) any later version.
40 % This program is distributed in the hope that it will be useful,
41 % but WITHOUT ANY WARRANTY; without even the implied warranty of
42 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 % GNU General Public License for more details.
45 % You should have received a copy of the GNU General Public License
46 % along with this program. If not, see <http://www.gnu.org/licenses/>.
65 surf = nrbextrude(nrbcirc(radius,center,sang,eang),[0.0 0.0 height]);
70 %! srf = nrbcylind(3,1,[],deg2rad(270),deg2rad(180));
71 %! nrbplot(srf,[20,20]);
73 %! title('Cylinderical section by extrusion of a circular arc.');