glue-viz / glue-ar

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Initial support for vectors #15

Closed Carifio24 closed 9 months ago

Carifio24 commented 9 months ago

As the title suggests, this PR adds initial support for vector export from glue using pyvista.Arrow. This implementation isn't perfect - at the very least, there are some issues with the scaling/length that need to be worked out, but I think this is a good start. Note that this implementation supports both fixed color and colormapped layers. For colormaps, the approach is similar to spheres - we determine how many points each arrow contains (it's a simple function of a couple of resolutions) and use that to construct the appropriate color value array.

This also makes some tweaks to the sizing, and adds a utility function that calculates a mask for point in view for use with the vectors (and likely error bars in the future as well).