[vtkusers] Strange Color Interpolation
James Perry
perryj at simmetrix.com
Thu Oct 18 18:22:16 EDT 2001
Hello fellow VTK users,
Attached is a very small image (disp.jpg) of a simple finite element
analysis done on a single-hexagonal cell. The VTK script is attached
(really_simple.tcl, for the data in disp_hex.vtk). We can't understand why the
colors are being interpolated the way they are, the scalar bar in the figure
uses the same lookup table as the mapper used for the hex actor. In fact,
towards the middle of the color gradient is a purple-ish color that isn't even
represented in the color range on the scalar bar. For the solution, we'd expect
to see a linear interpolation from the value 0 to 1 in the y-direction (in the
direction of the color gradient), similar to that shown on the scalar bar.
We have tried this problem using tetrahedral elements, and output a vtk file
for cell type 10, and obtain the same colors shown in the attached figure. In
fact, we have even used cell type 9 (VTK_QUAD) on the 6 surfaces with the same
vector data in disp_hex.vtk, yet we obtain the same results as shown in the
attached figure. We are running vtk 3.2.
If someone could explain why the colors are interpolated this way, and
possibly how we can get the correct color-mapping (the linear interpolation as
shown in the scalar bar), we would certainly appreciate any suggestions.
Thank you,
Jim Perry
==========================================================================
_____ __ _
/ __(_)_ _ __ _ ___ / /_____(_)_ __
_\ \/ / ' \/ ' \/ -_) __/ __/ /\ \ /
/___/_/_/_/_/_/_/_/\__/\__/_/ /_//_\_\
..........................................................................
Simmetrix Inc. (518) 348-1639
10 Halfmoon Executive Park Drive
Clifton Park, New York 12065 support at simmetrix.com
==========================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disp.jpeg
Type: application/applefile
Size: 6972 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011018/ddd5e7b6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: really_simple.tcl
Type: application/applefile
Size: 1244 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011018/ddd5e7b6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disp_hex.vtk
Type: application/applefile
Size: 607 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011018/ddd5e7b6/attachment-0002.bin>
More information about the vtkusers
mailing list