[vtkusers] How to combine multiple arrays ?
Cory Quammen
cory.quammen at kitware.com
Thu Jul 2 10:31:53 EDT 2015
You should be able to multiply your components by the iHat, jHat, and kHat
unit vectors to get a 3-tuple output array, e.g.,
(X11*cos(a)+X21*sin(a)*iHat) + (Y11*cos(a)+Y21*sin(a)*jHat) + (
Z11*cos(a)+Z21*sin(a))*kHat
iHat represents the vector (1, 0 0), jHat represents (0, 1, 0), and kHat
represents (0, 0, 1).
HTH,
Cory
On Thu, Jul 2, 2015 at 10:27 AM, mightos <mightos at gmail.com> wrote:
> Thanks.
>
> The *vtkArrayCalculator* seems like a good solution indeed (I've never used
> vtkProgrammableFilter but I'll take a look at it also).
>
> One last question though, even if I use *multicomponent *arrays in the
> vtkArrayCalculator Function, I always get a array with* one *component
> only.
>
> Is there a way to get a multicomponent array as an output ?
> Or should I use 3 vtkArrayCalculator (one for X, one for Y and the last one
> for Z) and then recombine the 3 outputs into a multicomponent array ?
> If I have to recombine I'll still be stuck on that operation (which is just
> basically appending 3 columns)
>
> Thank you for your help.
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/How-to-combine-multiple-arrays-tp5732676p5732679.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150702/ecdc21b1/attachment.html>
More information about the vtkusers
mailing list