Intersection points of three surfaces simultaneously

Hi,
I am looking for a little advice.
I have x3 variables ( f1, f2 and f3) each containing three-dimensional scalar volume data. These data come as the output from a seperate (arbitrary) function, which calculates it numerically as a function of the three-dimensional input variables x, y, z (generated with meshgrid). I then use the following lines to display three isosurfaces at an isovalue of 0 of the three variables f1, f2 and f3:
isoSurfValue = 0;
figure;
hold all;
p1 = patch(isosurface(x,y,z,f1,isoSurfValue));
p2 = patch(isosurface(x,y,z,f2,isoSurfValue));
p3 = patch(isosurface(x,y,z,f3,isoSurfValue));
which gives the following plot:
I would like to find where the value of f1, f2, and f3 are simultaneously zero - which should amount to finding the points at which these three isosurfaces intersect each other. Since the three variables have been calculated numerically, there are no entries in any of the matrices which are exactly zero (I assume the isosurface function is able to display the plot above because of some interpolation...), and so I cannot simply search the matrices f1, f2, and f3 for zero values. The isosurfaces are typically non-trivial shapes, and so there will usually be a set of multiple discreet coordinates ( xi, yi, zi ) at which all three surfaces intersect - all of which I would like to recover.
I have found a couple of references which could be relevant, for example:
or
but perhaps this is overkill and there is a simpler solution.
Any suggestions would be appreciated.
Thanks.

답변 (1개)

KSSV
KSSV 2018년 1월 3일

0 개 추천

댓글 수: 3

Hi KSVV,
The function described in your link is indeed helpful - it allows to find the points where any given two surfaces intersect. Since I am trying to find the mutual intersection of three different surfaces, I have ran this function three times for each pair. This then gives the (x,y,z) coordinates of the lines of intersections of surface 1 with 2 (blue points in figure below), 1 with 3 (red), and 2 with 3 (green).
However, I would then like to find the locations where these lines all cross each other at the same time - see where I have indicated with the arrow. There are three such mutual crossing locations in this example.
As you can see in the rightmost zoomed figure, at the crossing locations the points in each set do not directly overlap, and so I cannot simply search to find which coordinates appear in both. I need to find the three locations where the points in each set are I guess all sufficiently close as to qualify as a crossing. I would like to return all three such locations.
Do you have any advice how to do this?
Hi, could you solve this issue That solution is not working for me in matlab 2018

댓글을 달려면 로그인하십시오.

카테고리

제품

질문:

2018년 1월 2일

댓글:

2020년 12월 30일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by