summaryrefslogtreecommitdiff
path: root/modules/graphics/help/ja_JP/xsegs.xml
blob: cabf873c1cece2b755ea6dd838445e01db390b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<?xml version="1.0" encoding="UTF-8"?>

<!--

 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab

 * Copyright (C) ENPC - Jean-Philippe Chancelier

 * Copyright (C) 2009 - DIGITEO - Pierre Lando

 * 

 * This file must be used under the terms of the CeCILL.

 * This source file is licensed as described in the file COPYING, which

 * you should have received as part of this distribution.  The terms

 * are also available at    

 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt

 *

 -->

<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="ja" xml:id="xsegs">
    
    <refnamediv>
        
        <refname>xsegs</refname>
        
        <refpurpose>接続されていない線分を描画</refpurpose>
        
    </refnamediv>
    
    <refsynopsisdiv>
        
        <title>呼び出し手順</title>
        
        <synopsis>
            
            xsegs(xv, yv, [style])
            
            xsegs(xv, yv, zv,[style])
            
        </synopsis>
        
    </refsynopsisdiv>
    
    <refsection>
        
        <title>引数</title>
        
        <variablelist>
            
            <varlistentry>
                
                <term>xv, yv, zv</term>
                
                <listitem>
                    
                    <para>
                        
                        同じ大きさの行列. <varname>zv</varname>が指定されない場合, 
                        
                        ゼロベクトルを使用します.
                        
                    </para>
                    
                </listitem>
                
            </varlistentry>
            
            <varlistentry>
                
                <term>style</term>
                
                <listitem>
                    
                    <para>
                        
                        ベクトルまたはスカラー. <varname>style</varname>が正のスカラーの場合,
                        
                        全ての線分で使用される色を指定します. 
                        
                        <varname>style</varname>が負のスカラーの場合
                        
                        , カレントの色が使用されます. 
                        
                        <varname>style</varname>がベクトルの場合, 
                        
                        <literal>style(i)</literal> は線分<literal>i</literal>に関する
                        
                        色を指定します.
                        
                    </para>
                    
                </listitem>
                
            </varlistentry>
            
        </variablelist>
        
    </refsection>
    
    <refsection>
        
        <title>説明</title>
        
        <para>
            
            <function>xsegs</function> は,
            
            <varname>xv</varname>, <varname>yv</varname> および <varname>zv</varname>
            
            で指定した接続されていない一連の線分を描画します.
            
            <varname>xv</varname>, <varname>yv</varname> および <varname>zv</varname>
            
            が行列の場合,列を結合したベクトルとみなされます.
            
            ある線分を定義する2つ点の座標は,
            
            <varname>xv</varname>, <varname>yv</varname> および <varname>zv</varname>
            
            の連続する2つの値で指定されます:
            
        </para>
        
        <para>
            
            <literal>(xv(i),yv(i),zv(i))--&gt;(xv(i+1),yv(i+1),zv(i+1))</literal>.
            
        </para>
        
        <para>
            
            例えば, 大きさ (2,n)の行列の場合, 線分は以下のように定義されます:
            
        </para>
        
        <programlisting role="no-scilab-exec"><![CDATA[ 

xv=[xi_1 xi_2 ...; xf_1 xf_2...]

yv=[yi_1 yi_2 ...; yf_1 yf_2...]

zv=[zi_1 zi_2 ...; zf_1 zf_2...]

 ]]></programlisting>
        
        <para>
            
            そして,線分は <literal>(xi_k,yi_k,zi_k)--&gt;(xf_k,yf_k,zf_k)</literal>となります.
            
        </para>
        
    </refsection>
    
    <refsection>
        
        <title>例</title>
        
        <programlisting role="example"><![CDATA[

// 2次元の例

x=2*%pi*(0:9)/10;

xv=[sin(x);9*sin(x)];

yv=[cos(x);9*cos(x)];

plot2d([-10,10],[-10,10],[-1,-1],"022")

xsegs(xv,yv,1:10)

 ]]></programlisting>
        
        <scilab:image>
            
            x=2*%pi*(0:9)/10;
            
            xv=[sin(x);9*sin(x)];
            
            yv=[cos(x);9*cos(x)];
            
            plot2d([-10,10],[-10,10],[-1,-1],"022")
            
            xsegs(xv,yv,1:10)
            
        </scilab:image>
        
        <programlisting role="example"><![CDATA[

// 2次元の例

plot2d([-10,10],[-10,10],[-1,-1],"022")

xsegs([9, -9],[9 , -9]) //  X(9,9) から Y(-9, -9) に線を引く

xsegs([5, -2],[4 , -1]) //  X(5,4) から Y(-2, -1) に線を引く

 ]]></programlisting>
        
        <scilab:image>
            
            plot2d([-10,10],[-10,10],[-1,-1],"022")
            
            xsegs([9, -9],[9 , -9]) // Draw the line from X(9,9) to Y(-9, -9)
            
            xsegs([5, -2],[4 , -1]) // Draw the line from X(5,4) to Y(-2, -1)
            
        </scilab:image>
        
        <programlisting role="example"><![CDATA[

// 3次元の例

clf();

a=gca();

a.view="3d";

f=gcf();

f.color_map=rainbowcolormap(120);

alpha=2*%pi*(0:119)/40;

xv=[sin(alpha)/2;sin(alpha)/3];

yv=[cos(alpha)/2;cos(alpha)/3];

zv=[alpha/8;alpha/8];

xsegs(xv,yv,zv,1:120);

// Now adjust the data_bounds

a.data_bounds = [min(xv) min(yv) min(zv); ...

                 max(xv) max(yv) max(zv)];

// 矢印を各線分に追加できます

e = gce();

e.arrow_size = 0.4;





 ]]></programlisting>
        
        <scilab:image>
            
            a=gca();
            
            a.view="3d";
            
            f=gcf();
            
            f.color_map=rainbowcolormap(120);
            
            alpha=2*%pi*(0:119)/40;
            
            xv=[sin(alpha)/2;sin(alpha)/3];
            
            yv=[cos(alpha)/2;cos(alpha)/3];
            
            zv=[alpha/8;alpha/8];
            
            xsegs(xv,yv,zv,1:120);
            
            a.data_bounds = [min(xv) min(yv) min(zv); ...
            
            max(xv) max(yv) max(zv)];
            
            e = gce();
            
            e.arrow_size = 0.4;
            
        </scilab:image>
        
    </refsection>
    
</refentry>