Draft. My experimental branch.
Blender conversion
Examples live in examples/vectorised
. Run them with
blender --python examples/vectorised/new_blender_api.py
Interesting examples are
-
examples/vectorised/new_blender_api.py
- for a prototype API -
examples/vectorised/scatter.py
- for tubes and spheres -
examples/vectorised/scatter_bicolour.py
- for bicolouring tubes and spheres, but scattering and displaying is decoupled -
examples/vectorised/scatter_link_bicolour.py
- for bicolouring tubes and spheres and scattering and displaying is coupled, just like indevelop
-
examples/vectorised/discrete_curve.py
,examples/vectorised/discrete_net.py
,examples/vectorised/half_edge.py
- for converting library objects
This branch is also a testbed for decoupling visualisation from Blender. For example, first run
poetry install --sync --with dev --with docs --with tests --with coverage --with plot
Notice the --with plot
. This installs plotly. Most examples can also be visualised in plotly
python3 examples/vectorised/sphere.py
Of course, everything is vectorised. Points are stored in columns rather than rows. Both have advantages and disadvantages, e.g.
- with column-data,
A @ points
, whereA
is a matrix works as expected, row-data would requirepoints @ A.T
- with row-data,
points + translation
, wheretranslation.shape == (3,)
works as expected, but column-data requirespoints + translation.reshape((3, 1))
or similar - seems like
scipy
,scikit
etc. usually store data in the rows, haven't checked thoroughly yet