summaryrefslogtreecommitdiff
path: root/modules/interpolation/help/ja_JP/bsplin3val.xml
blob: 45bcbaa7f05956cd8a12bbe0e53c8810f0302ad0 (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
<?xml version="1.0" encoding="UTF-8"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bsplin3val" xml:lang="ja">
    <refnamediv>
        <refname>bsplin3val</refname>
        <refpurpose>3次元スプラインの任意微分評価関数</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>[dfp]=bsplin3val(xp,yp,zp,tl,der)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>xp, yp, zp</term>
                <listitem>
                    <para>同じ大きさの実数ベクトルまたは行列</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>tl</term>
                <listitem>
                    <para>"splin3d"型のtlistで, 
                        3次元テンソルスプライン(以下では<literal>s</literal>と
                        呼びます)を定義します.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>der</term>
                <listitem>
                    <para>
                        3つ要素 <literal>[ox,oy,oz]</literal>のベクトルで,
                        計算する<literal>s</literal>の微分を定義します.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>dfp</term>
                <listitem>
                    <para>
                        <literal>xp</literal>,<literal>yp</literal>および 
                        <literal>zp</literal>と同じ大きさのベクトルまたは行列で,
                        これらの点における<literal>s</literal>の要素毎に特定の微分の評価値.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            関数<link linkend="interp3d">interp3d</link>は
            スプライン<literal>s</literal>とその1階の微分のみを計算しますが,
            <literal>bsplin3val</literal>は<literal>s</literal>
            の任意の微分値を計算することができます.
            計算する微分値は引数<literal>der=[ox,oy,oz]</literal>で
            指定されます  :
        </para>
        <informalequation>
            <mediaobject>
                <imageobject>
                    <imagedata align="center" fileref="../mml/bsplin3val_equation1.mml"/>
                </imageobject>
            </mediaobject>
        </informalequation>
        <para>
            この場合,<literal>der=[0 0 0]</literal> は
            <emphasis>s</emphasis>, <literal>der=[1 0 0]</literal>は
            <emphasis>ds/dx</emphasis>, <literal>der=[0 1 0]</literal> は
            <emphasis>ds/dy</emphasis>, <literal>der=[1 1 0]</literal>は
            <emphasis>d2s/dxdy</emphasis>, など...に対応します
        </para>
        <para>座標がグリッドの外部の点
            <emphasis>(xp(i),yp(i),zp(i))</emphasis>の場合,関数は0を返します.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[ 
deff("v=f(x,y,z)","v=cos(x).*sin(y).*cos(z)");
deff("v=fx(x,y,z)","v=-sin(x).*sin(y).*cos(z)");
deff("v=fxy(x,y,z)","v=-sin(x).*cos(y).*cos(z)");
deff("v=fxyz(x,y,z)","v=sin(x).*cos(y).*sin(z)");
deff("v=fxxyz(x,y,z)","v=cos(x).*cos(y).*sin(z)");
n = 20;  // n x n x n  補間点
x = linspace(0,2*%pi,n); y=x; z=x; // 補間グリッド
[X,Y,Z] = ndgrid(x,y,z); V = f(X,Y,Z);
tl = splin3d(x,y,z,V,[5 5 5]);
// ある点で f および微係数を計算し,
// スプライン補間値と比較 
xp = grand(1,1,"unf",0,2*%pi); 
yp = grand(1,1,"unf",0,2*%pi); 
zp = grand(1,1,"unf",0,2*%pi); 
f_e = f(xp,yp,zp)
f_i = bsplin3val(xp,yp,zp,tl,[0 0 0])
fx_e = fx(xp,yp,zp)
fx_i = bsplin3val(xp,yp,zp,tl,[1 0 0])
fxy_e = fxy(xp,yp,zp)
fxy_i = bsplin3val(xp,yp,zp,tl,[1 1 0])
fxyz_e = fxyz(xp,yp,zp)
fxyz_i = bsplin3val(xp,yp,zp,tl,[1 1 1])
fxxyz_e = fxxyz(xp,yp,zp)
fxxyz_i = bsplin3val(xp,yp,zp,tl,[2 1 1])
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="splin3d">splin3d</link>
            </member>
            <member>
                <link linkend="interp3d">interp3d</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>履歴</title>
        <revhistory>
            <revision>
                <revnumber>5.4.0</revnumber>
                <revremark>
                    以前は,入力引数の虚部は暗黙的に無視されていました.
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>