13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="rotate">
15
<refname>rotate</refname>
16
<refpurpose> rotation of a set of points</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>xy1=rotate(xy,[theta,orig])</synopsis>
23
<title>Arguments</title>
28
<para>matrix of size (2,.).</para>
34
<para>matrix of size (2,.).</para>
40
<para>real, angle in radians; default value is 0.</para>
46
<para>center of the rotation [xc;yc]; default value is [0;0].</para>
52
<title>Description</title>
54
<literal>rotate</literal> performs a rotation with angle <literal>theta</literal>:
57
<literal>xy1(:,i) = M(theta) *(xy(:,i) - orig) + orig</literal>
60
where <literal>M</literal> stands for the corresponding rotation matrix.
66
xsetech([0,0,1,1],[-1,-1,1,1])
67
xy=[(0:0.1:10);sin(0:0.1:10)]/10;
68
for i=2*%pi*(0:10)/10,
70
xpoly(xy1(1,:),xy1(2,:),"lines")
75
<title>Examples</title>
76
<programlisting role="example"><![CDATA[
15
<refname>rotate</refname>
16
<refpurpose> rotation of a set of points</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>xy1=rotate(xy,[theta,orig])</synopsis>
23
<title>Arguments</title>
28
<para>matrix of size (2,.).</para>
34
<para>matrix of size (2,.).</para>
40
<para>real, angle in radians; default value is 0.</para>
46
<para>center of the rotation [xc;yc]; default value is [0;0].</para>
52
<title>Description</title>
54
<literal>rotate</literal> performs a rotation with angle <literal>theta</literal>:
57
<literal>xy1(:,i) = M(theta) *(xy(:,i) - orig) + orig</literal>
60
where <literal>M</literal> stands for the corresponding rotation matrix.
66
xsetech([0,0,1,1],[-1,-1,1,1])
67
xy=[(0:0.1:10);sin(0:0.1:10)]/10;
68
for i=2*%pi*(0:10)/10,
70
xpoly(xy1(1,:),xy1(2,:),"lines")
75
<title>Examples</title>
76
<programlisting role="example"><![CDATA[
77
77
xsetech([0,0,1,1],[-1,-1,1,1])
78
78
xy=[(0:0.1:10);sin(0:0.1:10)]/10;
79
79
for i=2*%pi*(0:10)/10,