Commit 5417987
[fix] overhaul plotvolume slice viewer and speed up matplotlib rendering, bump 0.6.5
plotvolume (mcxplotvol-style viewer):
- robust slice picking via forward projection + exact per-pixel depth (replaces
fragile inverse-projection ray-casting that often selected the wrong slice).
- slice3i-style dragging (move along the slice normal projected to screen).
- rotation direction now matches MATLAB rotate3d (drag right -> azimuth down,
drag up -> elevation down).
- remove the bottom sliders; the 3D axes now fills/resizes with the window.
- up/down arrows switch frames for any 4-D array (like mcxplotvol changeframe),
with a frame indicator in the title.
- right-button drag changes the colormap level count, matching slice3i
(relative to the level at drag start, ~64 levels per full-window drag).
- vectorized slice polygon/color build + coarse level-of-detail while
interacting (~15x faster dragging on large volumes).
- auto-show on construction; fix cm.get_cmap removal (matplotlib 3.9);
fix shade=True crash with edgecolors='none'.
- match plotmesh colormap convention: cmap= keyword, default jet (colormap=
kept as a back-compat alias).
plotsurf/plotasurf/plottetra:
- vectorize per-face vertex and color construction (~84x faster on large
surfaces); remove redundant face-value recomputations and an ndarray
truthiness landmine.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7246ea2 commit 5417987
4 files changed
Lines changed: 270 additions & 410 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments