Expand description
Lowering plot samples to scene geometry.
A plot’s data marks render by reusing the scene GPU
pipelines (the plan’s decision 1), so a mark’s f64 samples must become
the scene’s logical geometry: LineData (segments) and PointData
(markers / join discs), positioned in scale space at z = 0.
§Coordinates
Each sample (x, y) maps through the axis Scales, relative to a
per-axis origin subtracted before the cast to f32, so large absolute
coordinates — epoch timestamps especially — keep precision on the GPU
(the plan’s decision 7). The orthographic plot camera then maps the
visible scale-space window to the data rect.
§Line joins (the reuse-the-pipelines decision)
The scene line pipeline draws each segment as an anti-aliased quad with
butt caps, which leave wedge-gaps at angled joins. lower_line
fills those by also emitting a round disc (the scene point pipeline draws
anti-aliased circles) at every vertex, so joins and end-caps read as
clean rounds with no new GPU pipeline. The disc diameter equals the line
width and is applied as the PointStyle size
by the caller (see docs/PLOT2D_PLAN.md, the resolved polyline risk).
Structs§
- Lowered
Line - The lowered geometry of a line mark: the connecting segments plus the round join/cap discs that clean up the butt-cap joins.
Functions§
- lower_
line - Lower a line mark’s
samplesto connectingLineDataplus round join/cap discs (PointData), all in scale space relative toorigin.coloris applied to every segment and disc. - lower_
scatter - Lower a scatter mark’s
samplestoPointDatain scale space relative toorigin, each marker colouredcolor.