Skip to content

Vector Field Point Cloud Export#35

Open
bzrudski wants to merge 5 commits into
mainfrom
vf-pointcloud-export-20260505
Open

Vector Field Point Cloud Export#35
bzrudski wants to merge 5 commits into
mainfrom
vf-pointcloud-export-20260505

Conversation

@bzrudski
Copy link
Copy Markdown
Owner

@bzrudski bzrudski commented May 5, 2026

Description

In VectoRose, vector fields can currently be exported as NumPy arrays containing spatial coordinates and vector components using functions included in NumPy (e.g., numpy.save). While these files are useful, they cannot be directly imported into third-party software to be visualised. This PR introduces a new function vectorose.plotting.create_pointcloud that produces a point cloud representation of a vector field. Points are placed at each vector location. Each point has three values associated with it:

  1. the vector magnitude at that point
  2. the vector direction at that point as a unit vector
  3. the RGB colour representing that orientation

These use of RGB colour mapping is inspired by the following work by Reznikov et al. (2022).

The point clouds, represented as pyvista.PolyData objects can then be exported in a variety of formats, such as VTK mesh (*.vtk).

Major steps

  • Implementation: Done - see vectorose.plotting
  • Documentation: Done - see vectorose.plotting docstrings
  • Testing: Done - see tests/test_plotting

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.00%. Comparing base (e947485) to head (52f424e).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   92.94%   93.00%   +0.05%     
==========================================
  Files          11       11              
  Lines        1843     1858      +15     
==========================================
+ Hits         1713     1728      +15     
  Misses        130      130              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant