1 function ry = vecroty(angle)
3 % VECROTY: Transformation matrix for a rotation around the y axis.
11 % angle : rotation angle defined in radians
15 % ry : (4x4) Transformation matrix.
20 % Return the (4x4) Transformation matrix for a rotation about the y axis
21 % by the defined angle.
25 % [ cos(angle) 0 sin(angle) 0]
27 % [ -sin(angle) 0 cos(angle) 0]
32 % Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
35 % line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
36 % trans = vecroty(%pi/4);
37 % rline = nrbtform(line, trans);
43 % Copyright (C) 2000 Mark Spink
45 % This program is free software: you can redistribute it and/or modify
46 % it under the terms of the GNU General Public License as published by
47 % the Free Software Foundation, either version 2 of the License, or
48 % (at your option) any later version.
50 % This program is distributed in the hope that it will be useful,
51 % but WITHOUT ANY WARRANTY; without even the implied warranty of
52 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 % GNU General Public License for more details.
55 % You should have received a copy of the GNU General Public License
56 % along with this program. If not, see <http://www.gnu.org/licenses/>.
60 ry = [cn 0 sn 0; 0 1 0 0; -sn 0 cn 0; 0 0 0 1];