1 <?xml version="1.0" encoding="UTF-8"?>
3 * Add some comments about XML file
5 <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" xml:lang="en_US" xml:id="comet3d">
7 <refname>comet3d</refname>
8 <refpurpose>3D comet animated plot. </refpurpose>
18 comet3d(...,"colors", c)
22 <title>Parameters</title>
28 a real vector or matrix. If omitted, it is assumed to be the vector
29 <literal>1:nz</literal> where <literal>nz</literal> is the
30 number of curve points given by the <literal>z</literal>
39 a real vector or matrix. If omitted, it is assumed to be the vector
40 <literal>1:nz</literal> where <literal>nz</literal> is the
41 number of curve points given by the <literal>z</literal>
50 a real vector of length <literal>nz</literal> or a matrix with <literal>nz</literal> rows.
58 a real scalar in the interval<literal>[0 1[</literal>. Default value is 0.1.
66 a scilab function with syntax <literal>z=fun(x,y)</literal>.
74 a vector of <literal>ny</literal> color index.
81 <title>Description</title>
83 If <literal>(x,y,z)</literal> are three vectors with the same number of elements, this function draws a 3D comet
84 animated plot. The plot is made of three parts:
88 mark that shows the current <literal>(x(i),y(i),z(i))</literal> position.
94 <term>abody</term> that shows the trailing curve that
96 <literal>(x(i-k:i),y(i-k:i),z(i-k:i))</literal>) part of the curve.
103 that shows the <literal>(x(1:i-k),y(1:i-k),z(1:i-k))</literal> part of the curve.
110 if <literal>z</literal> is a matrix and
111 <literal>(x,y)</literal> are vectors then animated curves
112 are drawn for each triple <literal>(x,y,z(:,l))</literal>.
113 in this case <literal>nz</literal> is the number of rows of
114 <literal>z</literal>.
117 if <literal>x,y,z</literal> are matrices with the same dimensions then animated curves
118 are drawn for each triple <literal>(x(:,l),y(:,l),z(:,l))</literal>.
122 <literal>comet3d(x,y,fun,...)</literal> computes the
123 <literal>z</literal> vector as
124 <literal>z(i)=fun(x(i),y(i))</literal>
127 <literal>comet3d(...,p)</literal> can be used to set the
128 relative length of the body. <literal>k</literal> is defined
129 as <literal>k = round(p*nz)</literal>.
135 <title>Examples</title>
136 <programlisting role="example"><![CDATA[
137 t = linspace(-%pi,%pi,500);
139 comet3d(sin(5*t), sin(t), t.^2)
141 <programlisting role="example"><![CDATA[
142 t = linspace(-%pi,%pi,500)';
144 comet3d(sin(5*t), sin(t), [t.^2,ones(t)])
146 <programlisting role="example"><![CDATA[
147 t = linspace(-%pi,%pi,500)';
148 function z=traj(x,y),z=1.5*sin(x^2)*cos(y),endfunction
150 comet3d(cos(t), sin(t), traj)
153 <refsection role="see also">
154 <title>See also</title>
155 <simplelist type="inline">
157 <link linkend="comet">comet</link>
162 <title>History</title>
165 <revnumber>5.3.2</revnumber>
166 <revremark>Function comet3d introduced</revremark>