[scilab-Users] Plotting 3D data

Manuel JULIACHS manuel.juliachs at scilab.org
Mon Aug 17 11:22:20 CEST 2009


Kajetan Berlinger a écrit :
> Hi *,
>
> very simple questions from me as a newbie to Scilab ...
>
> (1) I just want to do a simple 3d plot of points randomly distributed in space.
> How can I do that?
>
> (2) How can I get a plot that tries to fit a surface to these points?
>
> Thanks!
> kaj
>
>   
Hello,

supposing your point coordinates are stored into 3 same-sized lists
x, y, and z, you have to execute the plot3d(x,y,z) command, retrieve
the drawed surface and modify its properties in order to display points
instead of facets:


plot3d(x,y,z);
s=gce();    // retrieves the surface object

s.surface_mode="off";
s.mark_mode="on";
s.mark_style=1;    // sets mark style to cross


Type:


help surface_properties;


for more information.


Concerning your second point, I'm not sure of how you can
fit a surface to a set of randomly distributed points.

The simplest thing to do would be to render facets using your points
as facet vertices, which is plot3d's default operation.

However, this requires you to know how points are connected to one
another, to be able to correctly specify facet vertices.

Best regards,


Manuel Juliachs



More information about the users mailing list