[vtkusers] Intersection of two iso surfaces

Luke hazelnusse at gmail.com
Sat Dec 3 17:50:50 EST 2011


> 5b) Store the valuve of the second function in the pointdata scalars
> of the isosurface. Then run vtkContourFilter

Ok, so you mean to do this:

vtkPoints *Points = contours->GetOutput()->GetPoints();
vtkPolyData* polydata = vtkPolyData::New();
polydata->SetPoints(Points);
polydata->GetPointData()->SetScalars(weights);

Where contours is the vtkContourFilter applied to the sampling of the
first function, and weights would be a vtkDataArray pointer (probably
vtkFloatArray or vtkDoubleArray) populated with the values of the
second function at every point on the isosurface of the first
function?

Also, can you recommend any techniques to help refine the accuracy of
the points of the first isosurface?  If, possible, I would like to
ensure that all of those points satisfy f1(x,y,z) = 0 to machine
precision.  My initial attempt would be to hold two of the three
constant and use a Newton-Raphson on the function with the third
coordinate being considered the independent variable used for the
Newton-Raphson.  It seems like it might work because the initial guess
provided would be very accurate, but sometimes root finders don't
converge, so I would need to be careful about protecting against that.

Thanks,
~Luke



More information about the vtkusers mailing list