Cross Product in vtkArrayCalculator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Cross Product in vtkArrayCalculator

Randall Hand
I just now noticed that there is no Cross Product operation in the vtkArrayCalculator.  It seems like a fairly important operation, so I dove in a tried it out.  After the Plot3d thing, I figured I was on a roll.

So attached to this email find an updated vtkFunctionParser.cxx/h that sports a shiny new "cross()" function.  I compared the results of :
a function like this: mag(Velocity)*mag(Vorticity)
*sqrt(1.0 - ((Velocity*(1.0/mag(Velocity))).(Vorticity*( 1.0/mag(Vorticity))))^2)  (Computes Cross Product Magnitude)
against a function like: cross(Vorticity, Velocity)

And the magnitude of the resulting vector matches the first function.  Hopefully this can get into the source tree.

Also, is there any chance of the Plot3D change & this Cross-product function getting into the VTK 5.0 branch? (I see that it just was released on the website today, woohoo!)

(second send, first was rejected because it exceeded filesize limitations... Tried this time zipping them)

Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
vtk-developers mailing list
[hidden email] (14K) Download Attachment