visu_pyvista
visualize_with_pyvista(cochain, fig=None, scaling_factor=1, data_range=None, display=True, layout_parameters={})
Generates a pyvista Plotter to visualize a Cochain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cochain
|
Cochain
|
The cochain to visualize. |
required |
fig
|
Optional[Plotter]
|
Optional (default is None). An existing |
None
|
scaling_factor
|
float
|
Optional (default is 1). A multiplier to apply to all values of the
|
1
|
data_range
|
Optional[Tuple]
|
Optional, default is None. A Tuple (val_min, val_max) to clip the data we want to visualize. |
None
|
display
|
bool
|
Optional (default is False). If True, the |
True
|
layout_parameters
|
dict
|
Optional (default is {}). Contains values for rendering parameters, c.f. See Also section. * keys: parameter names, should be in: ['background_color','window_size', 'title'] * values: parameters values. |
{}
|
Returns:
| Type | Description |
|---|---|
`pv.Plotter` containing the desired `Cochain`.
|
|
Notes
- The argument
displayis used if one wants to add multiple objects to the same visualization. In this case thedisplayargument should be set toFalsefor all calls except the last one. - In the current version vector-valued dual cochains are represented on the primal complex with vectors at the circumcenters of top-simplices. Maybe it could be interesting to enable the visualization on the dual cell complex?
- When a vector-valued
Cochainis provided, the surface is colored as well, but apparently, this color corresponds to the first component of the vector field, v_x. TODO:This should be changed
See Also
_set_layout()function in the same module for details on the layout parameters.
Source code in src/dxtr/visu/visu_pyvista.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |