Skip to content

3D views: spectral test, extra turtle degrees of freedom, and index-lift for retraced paths #1

Description

@bshepp

Three related 3D ideas. They share a projection routine and almost nothing else, so they should probably ship separately.

Deferred until after the first release.

1. Spectral test (triples scatter)

Plot consecutive triples of a sequence as points in a cube. This is the one case where 3D shows something 2D structurally cannot: the classic example is RANDU, whose triples fall onto 15 planes while looking fine in one and two dimensions (Marsaglia, "Random numbers fall mainly in the planes", 1968).

Good fit here because:

  • the structure is invisible until the third dimension, so 3D does real work rather than decorating
  • shuffling destroys it, so the permutation null bites hard
  • it connects to the Dekking / Mendes France and Deshouillers citations already on the About page: equidistribution mod one is the same subject
  • it is a point cloud, so points do not occlude each other the way surfaces do, and hit-testing stays tractable

2. Turtle walk with extra angular degrees of freedom

A 3D turtle: azimuth and elevation driven by separate residues, rather than a single planar turn.

Recorded concern, not a blocker: a camera adds azimuth, elevation and projection, none of which change a single term of the sequence. This site argues that some of what you see was put there by the technique, so new rendering knobs deserve more suspicion here than they would elsewhere. Occlusion is the sharper problem - if near geometry hides far geometry, a visible difference between the real panel and the null panel could be a depth artifact rather than structure.

Mitigations worth trying: identical camera locked across both panels, and an explicit note that the camera is not evidence.

Note that idea 3 does NOT share this concern, and is the safer one to build first.

3. Constant z-step lift, to make retreading countable

Every step advances a fixed amount along z as well as turning in the plane. The turning rule is unchanged - z is driven by the index, not by extra residues, so no new arbitrary mapping from the sequence is introduced.

The payoff is that a retraced edge becomes a stack of parallel strands:

  • the number of strands is the retread count, readable at a glance, and unlike encoding it as stroke width it does not saturate - twenty revisits give twenty strands
  • the vertical gaps carry what width cannot: how far apart in time the revisits were. Adjacent strands mean the walk came straight back, widely separated ones mean it returned much later.

This is also the idea that rescues the camera objection above. There is a canonical zero: viewed straight down the z axis it reproduces exactly the current 2D render. Tilt becomes a continuous dial between today's picture and the time-resolved one, rather than an arbitrary vantage point. The same is true of the step size - at zero it collapses to the existing view. A knob with a meaningful zero is far safer here than a camera without one.

It also means the "folds back on itself versus sprawls" reading is not lost, which was the objection to lifting: the top-down shadow still shows it.

Design notes:

  • keep z monotonic. If z steps up or down depending on the sequence, two visits can collide in z and the strand count stops being reliable.
  • the step size needs normalising against the xy extent, or a 2001-term b-file digit walk (418,487 points) becomes an unviewably tall thread
  • monotonic z means depth sorting is just painter's order, so no z-buffer is needed
  • see also the 2D overlap encoding, which addresses the same problem without a camera and exports to a flat PNG

Rigor requirement for any of these

"Rotate until the planes line up" is p-hacking with a mouse; given enough viewpoints you will find an alignment in anything. Any 3D view that makes a claim needs a statistic measured against the null ensemble that does not depend on where the camera is sitting. The viewpoint should be a way to see a result, never the evidence for it.

For idea 3 the natural statistic already exists as a by-product of the 2D overlap work: edge reuse rate, real versus null.

Blocked on

Continuous parameters. Every numeric ParamSpec declares step: 1, so fractional angles are unreachable rather than merely un-animated. The same blocker sits in front of the parameter-animation idea.

Implementation notes

  • projection is a few lines of matrix arithmetic into the existing Canvas 2D; no three.js, so the no-runtime-dependency rule holds
  • camera belongs in the URL state, alongside the existing zoom/pan viewport keys
  • the screen-reader data table stays as the accessible fallback; the rotation control is the harder accessibility problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions