help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Isosurface plot


From: Nicholas Jankowski
Subject: Re: Isosurface plot
Date: Fri, 5 May 2017 06:41:04 -0400



On May 4, 2017 2:35 PM, Niedermayr, Arthur <address@hidden> wrote:
Hello Mr. Janowski,

to be honest, I think I know what you mean, but I don't understand you thoroughly.

What I mean:
In your example v is a scalar of one combinations of x, y and z.
And v will be recalculated for all possible configurations of x,y and z.
clf;
[x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2);
v = x.^2 + y.^2 + z.^2;

v is a 3D scalar field. The dimensions are 9x9x9.  It has the value of v for every point (x, y, z) defined inside the meshgrid command. x y and z produced by the meshgrid function are also 9x9x9 3D arrays with the x, y, or z value distributed over the full array. Take a look at their contents at if you're not sure what i mean. The v= line creates a full scalar field map, isosurface processes that field and identifies the surface for a certain value of v.  In my modified example I showed that isosurface can accept the vectors for x y and z uses to make the meshgrid, but still needs the full 3d field for v.

And in my example I assign a value to each combination.

If for you v is a vector the same size as x, y, and z, then it cannot be a full field map of v.


My question is the following:
How can I transform my data, which is a 1D-array, such that I can use the isosurface function?

My guess is that the day that you have in v are just the points that defined the isosurface? And x y and z are the corresponding coordinates of those points? In that case you already have found the isosurface and you don't need a function to find it for you. If you just want to plan it, maybe there's a way to just do a three-dimensional surface plot of the data you have. It's not something I do often, but you can see a number of the built-in options here
https://www.gnu.org/software/octave/doc/interpreter/Three_002dDimensional-Plots.html

I'm not sure which of those couple be adapted to give you what you want for the type of data you have

(I am sure it's possible with the data I have)
Could you maybe post yourself an example how the isosurface function can be used with data from an imported file?

I don't think the issue is anything to do with imported data, but has to do with the type of data you're importing. If my guess above is correct, and you still want to use isosurface then you need to remap your data onto a three-dimensional field and fill in all the empty points. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]