How to plot 3d implicit surface

classic Classic list List threaded Threaded
9 messages Options
Orbeman Orbeman
Reply | Threaded
Open this post in threaded view
|

How to plot 3d implicit surface

Hello,

I would like to plot a 3d implicit surface defines with an equation like f(x, y, z)=0. There's no parametric transformation and is not possible to express for example z=g(x, y).

Does anyone have an idea ?

Thank a lot.
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

Le 23/11/12 09:14, Orbeman a écrit :

> Hello,
>
> I would like to plot a 3d implicit surface defines with an equation like
> f(x, y, z)=0. There's no parametric transformation and is not possible to
> express for example z=g(x, y).
>
> Does anyone have an idea ?
>
> Thank a lot.
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/How-to-plot-3d-implicit-surface-tp4025307.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
What is your equation ?

S.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Orbeman Orbeman
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

In fact, I have several equations like this :

x^2+y^2+x+y+x*y+z^2-1=0

I can express z=sqrt(1-...) but in a general case...
Martin Helm Martin Helm
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

Orbeman wrote
In fact, I have several equations like this :

x^2+y^2+x+y+x*y+z^2-1=0

I can express z=sqrt(1-...) but in a general case...
In the general case I usually use isosurfaces to plot implicit functions. Since I am completely new to scilab I do not know if it is just a lack of my ability to find a corresponding method in scilab of if there is none to plot isosurfaces.
If there is none and there is interest in having one I could adapt the Octave function I wrote a few years ago and which is since then part of their software to work in scilab and also the implicit function for plotting the zero level surfaces of 3d functions.
Martin Helm Martin Helm
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

Am 25.11.2012 00:40, schrieb Martin Helm:
> Orbeman wrote
>> In fact, I have several equations like this :
>>
>> x^2+y^2+x+y+x*y+z^2-1=0
>>
>> I can express z=sqrt(1-...) but in a general case...
I found this one
http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236
have not tested it yet but looks promising.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Martin Helm Martin Helm
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

Am 25.11.2012 01:32, schrieb Martin Helm:
> I found this one
> http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236
> have not tested it yet but looks promising.

I tested it now: Take the function contour3d.sci from the link above. It
seems to be an old function which uses a few deprecated function calls.
You need to change line 36 and replace xbas() with gcf() in addition you
need to replace in line 82 sort with gsort.
Now you can run the following simple test

function val = isotest(x, y,z)
    val = x.^2+y.^2+x+y+x.*y+z.^2-1;
endfunction

clf();
x = linspace(-2, 2, 31);
y = x;
z = x;
[X Y Z] = meshgrid(x,y,z);
val = isotest(X, Y, Z);
contour3d(X, Y, Z, val, 0)
f = gcf();
f.color_map = [1 0 0]; // make the black surface red

which will draw your implicit function in red. This will work for all
kind of implicit functions as long as your discretisation is fine enough.
Hope that helps.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

In reply to this post by Martin Helm
Le 25/11/2012 01:32, Martin Helm a écrit :

> Am 25.11.2012 00:40, schrieb Martin Helm:
>> Orbeman wrote
>>> In fact, I have several equations like this :
>>>
>>> x^2+y^2+x+y+x*y+z^2-1=0
>>>
>>> I can express z=sqrt(1-...) but in a general case...
> I found this one
> http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236
> have not tested it yet but looks promising.
Yes, a more recent version has been released on fileexchange instead of
the old contributions repository:
http://fileexchange.scilab.org/toolboxes/contour3d
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
moueza moueza
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

In reply to this post by Orbeman
moueza moueza
Reply | Threaded
Open this post in threaded view
|

Re: How to plot 3d implicit surface

In reply to this post by Orbeman