How to I find the values associated with a vertex position on an isosurface?
5 views (last 30 days)
Show older comments
Hello,
I am interested in assessing the vector field values at the vertices of an isosurface as using 'find' does not seem to work the way I would expect.
I used 'isosurface(xx,yy,zz,omega,ISOVALUE)' to generate the coherent vortex structure from measured velocity data that was extracted from 4D MRI. In order to make the field amenable to vector operations, I interpolated the array data onto a regular, 3D grid. When I perform this step, I am able to successfully visualise the structures I expect to appear in the flow.
However, I have not been able to find a good way to find the point in the 3D grid of vorticity magnitude values 'omega' that correspond with the vertex positions on the isosurface. I tried to use 'find()' in a for loop like so:
S = isosurface(xx,yy,zz,omega,ISOVALUE);
v = S.vertices;
for i = 1:length(v)
idx(i) = find(xx == v(i,1) & yy == v(i,2) & zz == v(i,3);
end
but when I try this, the method is unable to identify any values for yy that equal any values in the corresponding column of the three column vertex array.
I am puzzled by this chiefly because my assumption was that the vertices used to create the isosurface had to come directly from the values of the position matricies input into the original isosurface function, but that doesn't seem to have been the case here.
Any help with this, or alternative methods to obtaining the values/indices of omega that correspond with the vertex values of the isosurface are greatly appreciated. Thank you in advance.
Cheers,
John
3 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!