1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) Serge Steer
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2018 - Samuel GOUGEON
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
15 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
17 xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
18 xml:lang="ja" xml:id="comet3d">
20 <refname>comet3d</refname>
21 <refpurpose>3次元 comet アニメーションプロット</refpurpose>
30 comet3d(x, y, fun, Lf)
31 comet3d(...,"colors", c)
41 ベクトル <literal>1:np</literal> が指定されたと仮定されます.
42 ただし,<literal>np</literal> は曲線の点の数(下記参照)です.
43 行列として、各列は別々の彗星の軌跡の水平座標を定義します.
50 実数ベクトル(デフォルト値<literal>=1:np</literal>)または行列.
51 行列として、各列は、個々の彗星の痕跡のy座標を定義します.
58 長さがnpの実数ベクトル、またはnp個の行を持つ行列.
59 行列として、各列は個々の彗星のトレースのz座標を定義します. <literal>nc=size(z,"c")</literal>
67 範囲 <literal>[0 1[</literal> の実数スカラー. デフォルト値は 0.1です.
68 これは、彗星の痕跡のLeading fractionを定義します。最近の点は太い線でプロットされています
69 (<literal>k=Lf*np</literal>)。
76 呼び出し手順 <literal>z=fun(x,y)</literal> のScilab関数.
83 <literal>nc</literal> colors of the <literal>nc</literal> comets traces.
84 They may be specified as a vector of <literal>nc</literal> color indices or
85 <link linkend="color_list">color names</link> or "#RRGGBB" hexadecimal
86 color codes. Or by a matrix (ncx3) of <literal>[r,g,b]</literal> vectors of
87 Red-Green-Blue intensities in the [0,1] interval.
96 <literal>(x,y,z)</literal>が要素数が同じ3つのベクトルの場合,
97 この関数は3次元cometアニメーションプロットを描画します.
98 このプロットは以下の3つの部分から構成されます:
100 <tr><td><emphasis role="bold">ヘッド</emphasis></td>
101 <td>カレントの位置<literal>[x(i), y(i), z(i)]</literal>を示すマーカ.</td>
103 <tr><td><emphasis role="bold">ボディ</emphasis></td>
105 軌跡の最も最近の点である<literal>k=round(Lf*np)</literal>
106 で構成され、トレースのより厚い部分として表示されます。
109 <tr><td><emphasis role="bold">テール</emphasis></td>
111 曲線の一部<literal>[x(1:i-k), y(1:i-k), z(1:i-k)]</literal> を示す.
117 <literal>z</literal> が行列, <literal>(x, y)</literal> がベクトルの場合,
118 アニメーション表示される曲線は各<literal>(x, y, z(:,j))</literal> の組について描画されます.
121 <literal>x,y,z</literal> が同じ次元の行列の場合, アニメーション表示される曲線は, 各組
122 <literal>(x(:,j), y(:,j), z(:,j))</literal>について描画されます.
125 <literal>comet3d(x, y, fun,...)</literal> は, <literal>z</literal> ベクトルを
126 <literal>z(i)=fun(x(i),y(i))</literal>により 計算します.
129 <literal>comet3d(..., "colors", c)</literal> は 各曲線の色を設定する際に使用できます.
134 <programlisting role="example"><![CDATA[
135 t = linspace(-%pi,%pi,500);
137 comet3d(sin(5*t), sin(t), t.^2)
139 <programlisting role="example"><![CDATA[
140 t = linspace(-%pi,%pi,500)';
142 comet3d(sin(5*t), sin(t), [t.^2,ones(t)])
144 <programlisting role="example"><![CDATA[
146 t = linspace(0, 10*%pi, 500)';
147 clf, gca().rotation_angles = [26, 112];
148 comet3d(t.*sin(t), t, [t.*sin(2*t) t.*sin(3*t)], "colors", ["orange" "red"])
150 <programlisting role="example"><![CDATA[
151 t = linspace(-%pi,%pi,500)';
152 function z = traj(x,y), z = 1.5*sin(x^2)*cos(y), endfunction
154 comet3d(cos(t),sin(t),traj)
157 <refsection role="see also">
159 <simplelist type="inline">
161 <link linkend="comet">comet</link>
164 <link linkend="paramfplot2d">paramfplot2d</link>
167 <link linkend="realtime">realtime</link>
170 <link linkend="color_list">colors names</link>
178 <revnumber>5.3.2</revnumber>
179 <revremark>関数 comet3d() が導入されました.</revremark>
182 <revnumber>6.1.0</revnumber>
184 色は、名前、"#RRGGBB"の16進コード、または赤緑青の強度で指定することもできるようになりました。