Question about how the isosurface function works
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kaustubh Panse
am 20 Sep. 2022
Kommentiert: Kaustubh Panse
am 20 Sep. 2022
Hi All,
I'm currently working on trying to write some code to plot an isosurface, and I had a basic question about how the isosurface works.
Let say I want to plot an isosurface with isovalue = 1. However, my data doesn't have any value which is exactly = 1.00000. The data is something like 0.9899, 1.0129, etc. So theoretically my isosurface should be blank right, because I don't have any value which is exactly = 1.0000. Yet I do get an output, which is also reasonable according to my data.
I was wondering what's the in built tolerance the code has? Does it perhaps plot an isosurface for points 1.000 +- 0.001? Furthermore, can I know and control the tolerance value to which the isosurface is plotted at?
Any help would really be appreciated!
Thanks!
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 20 Sep. 2022
Bearbeitet: John D'Errico
am 20 Sep. 2022
isosurface cannot use interpolation? Why not? All that is necessary is the ability to perform LINEAR interpolation, between pairs of points, nothing more.
For example, how does a contour plot work? Again, even though you do not have specific data points at a SPECIFIC level, you can still generate a contour plot. For example:
[X,Y] = meshgrid(0:.25:2);
Z = X.^2+Y.^2;
contour(X,Y,Z,[1 1])
grid on
hold on
plot(X,Y,'.')
Do you see that the contours are actually straight line segments between a set of points? As well, do you see those segments need not fall on the grid itself? The line segments cross between pairs of points. We can get the contour itself, as the points:
CXY = contourc(0:.25:2,0:.25:2,Z,[1 1])
Read the help for contourc to see what was produced.
A simple linear interpolation is all that is necessary. And what is an isosurface, but a contour plot, in THREE dimensions?
2 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!