Block 4900 ( fabric.4th -- Console drawing-fabric coordinate machinery ) ( FABRIC.md item 4.3.3. 45-degree cavalier orthographic ) ( projection. Z is depth-into-screen, not height. Q48.16 ) ( throughout. Raw pixel write (PLOT/FB-WIDTH/FB-HEIGHT) is ) ( C; this capsule is the FORTH-side policy on top of it. ) 46341 CONSTANT COS45 ( Q48.16 cos(45)=sin(45) ~= 0.70710678 ) VARIABLE ZD : Z->DELTA ( z -- delta ) Q.FROM-INT COS45 Q.* Q.TO-INT ; Block 4901 ( PROJECT: 3D Cartesian (x y z) -> 2D Cartesian (sx sy). ) ( Cavalier projection: depth pushes diagonally up-right. ) : PROJECT ( x y z -- sx sy ) Z->DELTA ZD ! ZD @ + SWAP ZD @ + SWAP ; ( CART-Y: Cartesian Y (origin bottom, up positive) -> ) ( raster Y (origin top, down positive). The Y-flip. ) : CART-Y ( cart-y -- raster-y ) FB-HEIGHT 1- SWAP - ; Block 4902 ( CART-PLOT: full pipeline -- 3D Cartesian point to screen. ) : CART-PLOT ( x y z color -- ) >R PROJECT CART-Y R> PLOT ;