[vtkusers] Intersection of two iso surfaces

Luke hazelnusse at gmail.com
Sun May 1 14:56:41 EDT 2011


I have the following two real valued functions:
f1(x,y,z) = 0
f2(w,x,y,z) = 0

And I would like to compute their intersection surface in the x,y,z
space.  In the x, y, z space, the intersection surface will be some
sort of 2d surface parameterized by w.

The first function is a fairly simple one and I have already used
vtkImplicitFunction to plot the iso-surface of that function alone.
The second function is computationally more expensive to evaluate.

The next step I would like to do is to treat w as a parameter, and
compute the intersection of f2_w with the surface defined by f1=0.
This should result in a curve in the x,y,z space.  I can imagine doing
this for a large number of values of w, so that I get a bunch of
curves in the x,y,z space, each defining the intersection of the two
surfaces.

It seems like the efficient way to do this is to compute the polydata
for the first function's iso-surface (using vtkMarchingCubes), and
then for every cell in that surface, compute the intersection with the
function f2, for all the values of w that I decide upon.  This would
allow for the polydata of the first surface to only be traversed only
once.   What I'm not clear on is how to implement this second
intersection testing for each cell of the first surface and for each
different value of w.

Finally, once I have all the the intersection curves for each value of
w, is there a way to plot these as a surface, rather than a bunch of
lines?  This would give me what I am ultimately after, namely the 2d
intersection surface in the x, y, z, space.

Thanks,
~Luke

-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759



More information about the vtkusers mailing list