* Bug #8213 fixed - geom3d had no examples. 35/9835/2
Sylvestre Ledru [Wed, 28 Nov 2012 14:35:24 +0000 (15:35 +0100)]
Change-Id: I50a7e3dea5a2b41681cf4a2250a8e4c47b369648

scilab/CHANGES_5.4.X
scilab/modules/graphics/help/en_US/3d_plot/geom3d.xml
scilab/modules/graphics/help/fr_FR/3d_plot/geom3d.xml

index 5b59ba1..705e6ec 100644 (file)
@@ -69,6 +69,8 @@ Bug fixes
 * Bug #3313 fixed - In the documentation, the title of a link was using the
                     id instead of the title of the page.
 
+* Bug #8213 fixed - geom3d had no examples.
+
 * Bug #8414 fixed - Some genetic algorithms functions had no examples.
 
 * Bug #8883 fixed - In some cases, Scilab build from sources was looking for
index 7516dcd..4c31848 100644 (file)
@@ -68,5 +68,80 @@ fplot3d(t,t,surface,35,45,"X@Y@Z")
             fplot3d(t,t,surface,35,45,"X@Y@Z")
             [x,y]=geom3d(%pi/2,0,surface(%pi/2,0))
         </scilab:image>
+        
+        
+        <programlisting role="example"><![CDATA[
+
+my_plot_desc          = "plot3d and use of geom3d";
+
+  r = (%pi):-0.01:0;
+x = r.*cos(10*r);
+y = r.*sin(10*r);
+
+deff("[z]=Surf(x,y)","z=sin(x)*cos(y)");
+t=%pi*(-10:10)/10;
+
+// Plot the surface'
+fplot3d(t,t,Surf,35,45,"X@Y@Z",[19,2,3]);
+
+// Add 2d graphics on 3d graphic'
+z=(sin(x).*cos(y));
+[x1,y1] = geom3d(x,y,z);
+xpoly(x1,y1,"lines");
+
+// Adjust some plotting parameters'
+BackgroundColorId           = color(70,174,255);
+current_axe                 = gca();
+plot_3d                     = current_axe.children(2);
+plot_3d.hiddencolor         = 32;
+polyline                    = current_axe.children(1)';;
+polyline.foreground         = 8;
+current_axe.rotation_angles = [70,47];
+current_axe.background      = BackgroundColorId;
+
+// A second 2d graphics'
+[x1,y1] = geom3d([0,0],[0,0],[5,0]);
+xsegs(x1,y1);
+xstring(x1(1),y1(1),"The point (0,0,0)");
+
+xtitle(my_plot_desc," "," "," ");
+
+ ]]></programlisting>
+        <scilab:image>
+            
+            my_plot_desc          = "plot3d and use of geom3d";
+            
+            r = (%pi):-0.01:0;
+            x = r.*cos(10*r);
+            y = r.*sin(10*r);
+            
+            deff("[z]=Surf(x,y)","z=sin(x)*cos(y)");
+            t=%pi*(-10:10)/10;
+            
+            // Plot the surface'
+            fplot3d(t,t,Surf,35,45,"X@Y@Z",[19,2,3]);
+            
+            // Add 2d graphics on 3d graphic'
+            z=(sin(x).*cos(y));
+            [x1,y1] = geom3d(x,y,z);
+            xpoly(x1,y1,"lines");
+            
+            // Adjust some plotting parameters'
+            BackgroundColorId           = color(70,174,255);
+            current_axe                 = gca();
+            plot_3d                     = current_axe.children(2);
+            plot_3d.hiddencolor         = 32;
+            polyline                    = current_axe.children(1)';;
+            polyline.foreground         = 8;
+            current_axe.rotation_angles = [70,47];
+            current_axe.background      = BackgroundColorId;
+            
+            // A second 2d graphics'
+            [x1,y1] = geom3d([0,0],[0,0],[5,0]);
+            xsegs(x1,y1);
+            xstring(x1(1),y1(1),"The point (0,0,0)");
+            
+            xtitle(my_plot_desc," "," "," ");
+        </scilab:image>
     </refsection>
 </refentry>
index ffdfdff..6664c5c 100644 (file)
@@ -58,5 +58,80 @@ fplot3d(t,t,surface,35,45,"X@Y@Z")
             [x,y]=geom3d(%pi/2,0,surface(%pi/2,0))
         </scilab:image>
         
+        
+        <programlisting role="example"><![CDATA[
+
+my_plot_desc          = "plot3d and use of geom3d";
+
+  r = (%pi):-0.01:0;
+x = r.*cos(10*r);
+y = r.*sin(10*r);
+
+deff("[z]=Surf(x,y)","z=sin(x)*cos(y)");
+t=%pi*(-10:10)/10;
+
+// Plot the surface'
+fplot3d(t,t,Surf,35,45,"X@Y@Z",[19,2,3]);
+
+// Add 2d graphics on 3d graphic'
+z=(sin(x).*cos(y));
+[x1,y1] = geom3d(x,y,z);
+xpoly(x1,y1,"lines");
+
+// Adjust some plotting parameters'
+BackgroundColorId           = color(70,174,255);
+current_axe                 = gca();
+plot_3d                     = current_axe.children(2);
+plot_3d.hiddencolor         = 32;
+polyline                    = current_axe.children(1)';;
+polyline.foreground         = 8;
+current_axe.rotation_angles = [70,47];
+current_axe.background      = BackgroundColorId;
+
+// A second 2d graphics'
+[x1,y1] = geom3d([0,0],[0,0],[5,0]);
+xsegs(x1,y1);
+xstring(x1(1),y1(1),"The point (0,0,0)");
+
+xtitle(my_plot_desc," "," "," ");
+
+ ]]></programlisting>
+        <scilab:image>
+            
+            my_plot_desc          = "plot3d and use of geom3d";
+            
+            r = (%pi):-0.01:0;
+            x = r.*cos(10*r);
+            y = r.*sin(10*r);
+            
+            deff("[z]=Surf(x,y)","z=sin(x)*cos(y)");
+            t=%pi*(-10:10)/10;
+            
+            // Plot the surface'
+            fplot3d(t,t,Surf,35,45,"X@Y@Z",[19,2,3]);
+            
+            // Add 2d graphics on 3d graphic'
+            z=(sin(x).*cos(y));
+            [x1,y1] = geom3d(x,y,z);
+            xpoly(x1,y1,"lines");
+            
+            // Adjust some plotting parameters'
+            BackgroundColorId           = color(70,174,255);
+            current_axe                 = gca();
+            plot_3d                     = current_axe.children(2);
+            plot_3d.hiddencolor         = 32;
+            polyline                    = current_axe.children(1)';;
+            polyline.foreground         = 8;
+            current_axe.rotation_angles = [70,47];
+            current_axe.background      = BackgroundColorId;
+            
+            // A second 2d graphics'
+            [x1,y1] = geom3d([0,0],[0,0],[5,0]);
+            xsegs(x1,y1);
+            xstring(x1(1),y1(1),"The point (0,0,0)");
+            
+            xtitle(my_plot_desc," "," "," ");
+        </scilab:image>
+        
     </refsection>
 </refentry>