[vtkusers] Scalar interpolation

Brian Curtis bcurtis3 at masonlive.gmu.edu
Tue May 8 11:10:01 EDT 2012


Hi,

I am interested in creating the following simple example in order to 
expand off of at a later time:
- Create a cube (8 points) with scalar values all set to 1
- Create a line (5 points) that intersects with cube
- Get scalar interpolations for the line from the cube

Cube pts:
float pts[8][3] = { {-1.0, -1.0, -1.0}, {-1.0, 1.0, -1.0},
                         {-1.0, 1.0, 1.0}, {-1.0, -1.0, 1.0},
                         {1.0, -1.0, -1.0}, {1.0, 1.0, -1.0},
                         {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0} };
Line pts:
float line[5][3] = { {-2.0, 2.0, -2.0}, {-1.0, 1.0, -1.0},
                          {0.0, 0.0, 0.0}, {1.0, -1.0, 1.0}, {2.0, -2.0, 
2.0} };

I could not find a simple example to do this, and I'm not exactly sure 
if probefilter is the right way to go about this. What the best (and 
easiest) way to approach this problem?

Thanks,
~Brian




More information about the vtkusers mailing list