[vtkusers] vtkArrayCalculator function definition syntax????
W.T. Bridgman
William.T.Bridgman.1 at gsfc.nasa.gov
Mon Apr 17 09:40:09 EDT 2006
On Apr 14, 2006, at 2:08 PM, Randall Hand wrote:
> Unfortunately, VTK's array calculator does not support true cross
> product computation. I have a patch in bug 2903 ( http://
> www.vtk.org/Bug/bug.php?op=show&bugid=2903&pos=19 ) that adds a
> "cross(X,Y)" function, but it hasn't been integrated yet. You can
> probably grab it & replace your vtkFunctionParser with it and it'll
> work.
Is it v5.0+ only? Currently I must build VTK with another module
that will (currently) not run beyond v4.4.
> In the meantime, you've got 2 options:
> 1) Load your vectors in a 3-scalars, and then perform the cross
> product yourself as you've shown.
> 2) Use V.ihat, V.jhat, and V.khat to access the 3 components
> (read: Vector dot i-unit vector, etc)
>
> also, you can't directly write back the results into components..
> So you'll have to compute each component & multiply by ihat/jhat/
> khat and then add the 3 parts together... It's gonna be one massive
> & messy function line. And slow to run......
I may examine this as an interim solution. Hopefully the other code
will get updated to v5+ soon.
Thanks,
Tom
--
Dr. William T."Tom" Bridgman Scientific Visualization
Studio
Global Science & Technology, Inc. NASA/Goddard Space Flight
Center
Email: William.T.Bridgman.1 at gsfc.nasa.gov Code 610.3
Phone: 301-286-1346 Greenbelt, MD 20771
FAX: 301-286-1634 http://svs.gsfc.nasa.gov/
More information about the vtkusers
mailing list