Caps, presentation and state (device 9)

How the 3D vector display (device 9) clips what a list draws, how much one list may draw, how it is shown, what its calls cost and what it keeps in the machine's state. The device itself, its calls and its display list are in the article on the 3D vector display.

Clipping and caps

A line is cut where it crosses the plane z = -800: only its part with z > -800 is drawn, and a point at z <= -800 is not drawn. Only a face's part with z > -800 hides. What is left is projected and clipped to the screen grown by 32 units on every side; the host clips what it draws to the screen.

The amount one list draws is limited. In list order each command counts:

CommandLength (units)SegmentsFaces
Lineits counted length (below)10
Point010
Circleits 64 chords' lengths640
Face001
Screen in effect001
Surface in effect001

A line's counted length is its length on the glass, seen from the reference eye, of its part with z > -800 that lies on the screen (0 to 640 by 0 to 480). Each line, point and chord also counts its ink as a 2D line does: on the glass, in units, (|dx| + |dy| + w) x (w + 3) with w its width, or its box grown by (w + 3) / 2 and clipped to the screen if smaller; a Surface in effect counts its box on the glass. A command that would take the list's total length above 65,536, its segments above 16,384, its faces above 256, its faces times its segments above 131,072 (256 faces leave 512 segments), or its ink above 153,600 is not drawn, and neither is any command after it; a face not drawn hides nothing. A command that is not drawn does not count. The caps are counted from the reference eye whatever eye the host draws from, and as if faces hid nothing, so the same commands are drawn from every eye.

After the hidden parts are cut out, at most 16,384 pieces are drawn, in list order; pieces beyond that are not drawn. Only pieces within the 32-unit margin count. Which pieces those are depends on the eye.

The host evaluates the caps after a floating-point projection, so hosts may differ by rounding when a list comes right up to a cap: one may draw a command fewer than another. That affects only what is drawn, never the machine's state.

Presentation

Charges and state

Every call costs 4; an accepted submit also costs 1 per 4 bytes of the list, rounded up. Nothing else is charged: projection, hiding and the caps are the host's work. See charges.

The device sends no events and takes no input from the host: the eye is the host's, so what faces hide from it is not state. Which Screens are in effect depends on the shell's device 8 records, and only for what is shown; face reads the list as decoded. Its state is the copy of the list: its length m (4 bytes, 0 to 16,384) then the m bytes of the last accepted submit. This section of the state exists only for a machine that has device 9. The style and persistence are held once, in the 2D display's state section, which is present when the machine has device 3 or device 9.