stem3d
Mojo module 🡭
stem3d
Mark.STEM3D, Mark.QUIVER3D and Mark.FILL_BETWEEN3D: marks built from lines through the cube (#345).
Step 5 of #345, the second half. A stem points at the base plane, an arrow points wherever its components say, and a ribbon joins two curves – each is a line through the cube, with something on the end of it or another line beside it.
The lines are not depth sorted and cannot usefully be. A line has
no interior to hide anything behind, so two stems or two shafts that
cross in projection cross visibly whichever went second, which is the
honest picture of two that cross. The markers on a stem’s end are
sorted, because a marker is a disc at a single depth and ordering
those is exact – the same split scatter3d makes. The ribbon is a
mesh and sorts like the surfaces do.
An arrowhead is built in screen space, not in the cube. A cone in data space would need its own faces, its own depth sort against every other arrow, and a size in data units that means nothing – an arrow’s head is a reading aid whose size should not change when the data’s units do. So the shaft projects and the head is a triangle laid on the projected shaft, sized in pixels like every other marker here. The cost is that a head does not foreshorten: an arrow pointing at the reader keeps a full-size head on a shaft with no length, which is exactly when a reader should distrust the picture anyway.