create_streamtube_3d
Generates an interactive 3D streamtube plot of vector field trajectories, encoding flow magnitude via tube diameter. Visualize wind corridors, ocean currents, or magnetic field lines from grid data.
Instructions
Interactive 3D streamtube plot of a vector field's flow (WebGL, orbit-able).
Integrates the (u, v, w) vector field into streamlines rendered as tubes
whose diameter encodes local flow magnitude. Distinct from
create_cone_3d (one discrete arrow per sample): a streamtube shows the
integrated trajectories — wind corridors, ocean currents, magnetic field
lines — rather than the instantaneous direction at each point. The
streamline integration runs client-side at render, so a sampled grid needs
no SciPy or iterative solver.
Ideal for: wind / ocean circulation, ventilation or HVAC airflow, magnetic / electric field lines, any continuous flow domain where the path of the flow matters more than the per-point arrow.
Returns: {filepath, title, rows}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Row dicts (one per field-sample point, ideally on a (x, y, z) grid) | |
| theme | No | 'dark', 'light', or 'professional' | dark |
| title | No | Chart title | |
| sizeref | No | Tube radius scale factor (larger = thicker tubes) | |
| filename | No | Output filename (without .html) | streamtube_3d |
| u_column | Yes | Column for the vector X component | |
| v_column | Yes | Column for the vector Y component | |
| w_column | Yes | Column for the vector Z component | |
| x_column | Yes | Column for the field-sample X position | |
| y_column | Yes | Column for the field-sample Y position | |
| z_column | Yes | Column for the field-sample Z position (depth) | |
| colorscale | No | Plotly colorscale name for flow-magnitude mapping | Viridis |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||