Add an image for the help of splin3d 52/10852/2
Sylvestre Ledru [Fri, 15 Mar 2013 13:46:24 +0000 (14:46 +0100)]
Change-Id: Ie0fac9a77da40c464a62db19ee03f910c0fea437

scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/splin3d_en_US_1.png [new file with mode: 0644]
scilab/modules/helptools/images/splin3d_fr_FR_1.png [new file with mode: 0644]
scilab/modules/helptools/images/splin3d_ru_RU_1.png [new file with mode: 0644]
scilab/modules/interpolation/help/en_US/splin3d.xml

index efe78f8..e428766 100644 (file)
@@ -889,6 +889,9 @@ sinh_1.png=a6d9cd67d383e2b737257c4a18317abe
 smooth_1.png=ebef37585006626b34e13b95a3667e9d
 splin2d_1.png=8f8623cc1be22615118b09880bf9f858
 splin2d_2.png=d83250260f32a8809dd873e42bc7911b
+splin3d_en_US_1.png=ae40e15cef55c07766d9b00a62f78666
+splin3d_fr_FR_1.png=ae40e15cef55c07766d9b00a62f78666
+splin3d_ru_RU_1.png=ae40e15cef55c07766d9b00a62f78666
 splin_1.png=4982eeb64b3dc94cc23e16b4e5af0b15
 splin_2.png=aec6a88ecc79dced27f55492471aa55f
 springcolormap_1.png=b6f8f97a269786a9d53e4fe31b097861
diff --git a/scilab/modules/helptools/images/splin3d_en_US_1.png b/scilab/modules/helptools/images/splin3d_en_US_1.png
new file mode 100644 (file)
index 0000000..77d9108
Binary files /dev/null and b/scilab/modules/helptools/images/splin3d_en_US_1.png differ
diff --git a/scilab/modules/helptools/images/splin3d_fr_FR_1.png b/scilab/modules/helptools/images/splin3d_fr_FR_1.png
new file mode 100644 (file)
index 0000000..77d9108
Binary files /dev/null and b/scilab/modules/helptools/images/splin3d_fr_FR_1.png differ
diff --git a/scilab/modules/helptools/images/splin3d_ru_RU_1.png b/scilab/modules/helptools/images/splin3d_ru_RU_1.png
new file mode 100644 (file)
index 0000000..77d9108
Binary files /dev/null and b/scilab/modules/helptools/images/splin3d_ru_RU_1.png differ
index 1b13e34..7a9d644 100644 (file)
@@ -106,19 +106,19 @@ er = max(abs(vp_exact - vp_interp))
 exec("SCI/modules/interpolation/demos/interp_demo.sci")
 func =  "v=(x-0.5).^2 + (y-0.5).^3 + (z-0.5).^2";
 deff("v=f(x,y,z)",func);
-n = 5; 
+n = 5;
 x = linspace(0,1,n); y=x; z=x;
 [X,Y,Z] = ndgrid(x,y,z);
 V = f(X,Y,Z);
 tl = splin3d(x,y,z,V);
 // compute (and display) the 3d spline interpolant on some slices
 m = 41;
-dir = ["z="  "z="  "z="  "x="  "y="];
+direction = ["z="  "z="  "z="  "x="  "y="];
 val = [ 0.1   0.5   0.9   0.5   0.5];
 ebox = [0 1 0 1 0 1];
 XF=[]; YF=[]; ZF=[]; VF=[];
 for i = 1:length(val)
-  [Xm,Xp,Ym,Yp,Zm,Zp] = slice_parallelepiped(dir(i), val(i), ebox, m, m, m);
+  [Xm,Xp,Ym,Yp,Zm,Zp] = slice_parallelepiped(direction(i), val(i), ebox, m, m, m);
   Vm = interp3d(Xm,Ym,Zm, tl);
   [xf,yf,zf,vf] = nf3dq(Xm,Ym,Zm,Vm,1);
   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf]; VF = [VF vf]; 
@@ -128,14 +128,46 @@ for i = 1:length(val)
 end
 nb_col = 128;
 vmin = min(VF); vmax = max(VF);
-color = dsearch(VF,linspace(vmin,vmax,nb_col+1));
+color_example = dsearch(VF,linspace(vmin,vmax,nb_col+1));
 xset("colormap",jetcolormap(nb_col));
 clf(); xset("hidden3d",xget("background"));
 colorbar(vmin,vmax)
-plot3d(XF, YF, list(ZF,color), flag=[-1 6 4])
+plot3d(XF, YF, list(ZF,color_example), flag=[-1 6 4])
 xtitle("3d spline interpolation of "+func)
 show_window()
  ]]></programlisting>
+        <scilab:image localized="true">
+            exec("SCI/modules/interpolation/demos/interp_demo.sci")
+            func =  "v=(x-0.5).^2 + (y-0.5).^3 + (z-0.5).^2";
+            deff("v=f(x,y,z)",func);
+            n = 5;
+            x = linspace(0,1,n); y=x; z=x;
+            [X,Y,Z] = ndgrid(x,y,z);
+            V = f(X,Y,Z);
+            tl = splin3d(x,y,z,V);
+            m = 41;
+            direction = ["z="  "z="  "z="  "x="  "y="];
+            val = [ 0.1   0.5   0.9   0.5   0.5];
+            ebox = [0 1 0 1 0 1];
+            XF=[]; YF=[]; ZF=[]; VF=[];
+            for i = 1:length(val)
+            [Xm,Xp,Ym,Yp,Zm,Zp] = slice_parallelepiped(direction(i), val(i), ebox, m, m, m);
+            Vm = interp3d(Xm,Ym,Zm, tl);
+            [xf,yf,zf,vf] = nf3dq(Xm,Ym,Zm,Vm,1);
+            XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf]; VF = [VF vf]; 
+            Vp = interp3d(Xp,Yp,Zp, tl);
+            [xf,yf,zf,vf] = nf3dq(Xp,Yp,Zp,Vp,1);
+            XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf]; VF = [VF vf]; 
+            end
+            nb_col = 128;
+            vmin = min(VF); vmax = max(VF);
+            color_example = dsearch(VF,linspace(vmin,vmax,nb_col+1));
+            xset("colormap",jetcolormap(nb_col));
+            clf(); xset("hidden3d",xget("background"));
+            colorbar(vmin,vmax)
+            plot3d(XF, YF, list(ZF,color_example), flag=[-1 6 4])
+            xtitle("3d spline interpolation of "+func)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>