[vtkusers] Intersection of two iso surfaces

Luke hazelnusse at gmail.com
Fri Dec 2 15:29:30 EST 2011


> Something like:
>
> for each point in the extracted isosurface, evaluate the second
> function and store the result in the pointdata of the extracted
> isosurface.

David Doria helped me figure out how to get the Points from the
contour filter in a separate thread, so now I'm clear on how I would
evaluate the second function at each point on the isosurface of the
first function.

Can you elaborate on what you mean about storing the result in the
pointdata of the extracted isosurface?  I'm not sure where this extra
scalar associated with each point of the isosurface would go.
Ideally, it would be nice to generate contours of the second function
on the isosurface of the first function, so storing it in some fashion
that would make it work with the vtkContourFilter would be ideal.

To reiterate my understanding of the process:

1) subclass vtkImplicitFunction to create an implicit function, call
it f1.  This is the numerically cheap function to evaluate.
2) use vtkSampleFunction to sample f1 over the desired volume of
interest, with the desired discretization.
3) use vtkContourFilter to generate the isosurface of interest (f1(x,y,z) = c).
4) use vtkContourFilter->GetOutput()->GetPoints() to obtain points
(approximately) on the isosurface.
5) for each point in vtkPoints
  a) Possibly enhance the accuracy by some method (perhaps
Newton-Raphson, or ray casting?)
  b) evaluate the second function, f2, at each point.  Where should I
store this?
6) generate contours of the second function.  Each contour curve would
represent points of constant f2 (and f1, since it is on the isosurface
of f1).
9) Profit.

It is becoming more clear what I need to do, just a few things are fuzzy still.

Thank you for your time.

~Luke



More information about the vtkusers mailing list