starkernel: item 4.3.4 -- checkpoint, draw a cube (no new bugs)
Adds VERT/EDGE/CUBE to capsules/fabric.4th (blocks 4913-4915). VERT ( n -- x y z ) reads bits 0/1/2 of a corner index as the X/Y/Z sign (+-CS from center), so all 8 cube corners come from one word. EDGE resolves both corners via VERT and calls LINE; CUBE is 12 EDGE calls (4 bottom, 4 top, 4 vertical). First item in the 4.3.3.x sequence with no new bug found -- a small signal that Q.TO-INT, the VARIABLE alignment fix, and the LINE-STUCK? cap were the real gaps rather than something still lurking in LINE/PROJECT/CART-Y. Verified live on amd64: a centered, half-size-100 cube renders correctly -- front/back face squares, back face offset diagonally up-right by exactly the 45-degree cavalier projection's depth term, all 12 edges connecting at the right corners. All three architectures boot clean to ok> with the DoE completing; dict_hash identical across all three and unchanged from 4.3.3a/4.3.3b. FABRIC.md item 4.3.4 marked done. This is the checkpoint -- 4.3.x groundwork stops here for review per this item's own acceptance criterion.
This commit is contained in:
@@ -3797,10 +3797,30 @@ document and committing that amendment as its own item.*
|
||||
> than tall, matching unequal radii), and the earlier diagonal `LINE` test.
|
||||
> `fb/amd64/geom-test-circle-fixed.png`, `fb/amd64/geom-test-full-wordset.png`.
|
||||
|
||||
- [ ] **4.3.4 — Checkpoint: draw a cube.** First real exercise of the 4.3.3/4.3.3a/4.3.3b
|
||||
- [x] **4.3.4 — Checkpoint: draw a cube.** First real exercise of the 4.3.3/4.3.3a/4.3.3b
|
||||
coordinate/projection/geometry machinery — cube edges use `LINE`. Stop and review here
|
||||
before scoping the next 4.3.x item — not expected to be fast. *Refs:* §27.4.
|
||||
|
||||
> **Done, 2026-08-07.** Block 4913–4915. Vertices are bit-coded: `VERT ( n -- x y z )`
|
||||
> reads bits 0/1/2 of `n` as the sign of the X/Y/Z offset from center (`±CS`), so all 8
|
||||
> corners come from one word instead of 8 hand-written coordinate triples. `EDGE
|
||||
> ( n1 n2 color -- )` resolves both corners via `VERT` and calls `LINE`. `CUBE
|
||||
> ( cx cy cz s color -- )` is 12 `EDGE` calls — 4 bottom, 4 top, 4 vertical — grouped by
|
||||
> face for readability, not because the grouping means anything to the machinery.
|
||||
>
|
||||
> No new bugs this item — first time in the 4.3.3.x sequence that's been true, which is
|
||||
> itself a small signal that `Q.TO-INT`/the `VARIABLE` alignment fix/the `LINE-STUCK?`
|
||||
> cap were the real gaps, not something still lurking in `LINE`/`PROJECT`/`CART-Y`.
|
||||
>
|
||||
> **Verified live on amd64**: `640 400 0 100 16777215 CUBE` (white, half-size 100,
|
||||
> centered mid-screen) completed cleanly, no errors, no `LINE-STUCK?` trips. Screendump
|
||||
> (`fb/amd64/cube-4.3.4.png`) shows a correct wireframe cube — front face square, back
|
||||
> face square offset diagonally up-right by exactly the 45° cavalier projection's
|
||||
> depth term, all 12 edges connecting at the right corners, no crossed or broken lines.
|
||||
>
|
||||
> **This is the checkpoint** — 4.3.x groundwork stops here for review per this item's own
|
||||
> acceptance criterion, before scoping whatever comes next.
|
||||
|
||||
⋯ *(4.3.x is open-ended — more items get appended here as Console work is scoped item by*
|
||||
*item, developed on the fly per §25.0. 4.4 below is unaffected by anything added above*
|
||||
*this marker.)*
|
||||
|
||||
+18
-15
@@ -1,5 +1,5 @@
|
||||
# Capsule Block Manifest — Auto-generated
|
||||
<!-- Generated by mkcapsule --manifest 2026-08-07T19:19:40Z -->
|
||||
<!-- Generated by mkcapsule --manifest 2026-08-07T19:27:53Z -->
|
||||
<!-- DO NOT EDIT — re-run mkcapsule --manifest to refresh. -->
|
||||
<!-- Hand-written justifications and immutability notes live -->
|
||||
<!-- in MANIFEST.md alongside this auto-generated index. -->
|
||||
@@ -13,7 +13,7 @@
|
||||
| `common:msg.4th` | 4055 | `0xa99c5bcd3877f80e` |
|
||||
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x3d4549142d91ec20` |
|
||||
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xb6ecf5374e8ee77c` |
|
||||
| `fabric.4th` | 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, 4912 | `0x355ccc154aac15b3` |
|
||||
| `fabric.4th` | 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, 4912, 4913, 4914, 4915 | `0x339aa4c724b95879` |
|
||||
| `hermes:init.4th` | 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4114, 4115, 4116, 4117, 4118, 4119, 4120, 4121, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4175, 4176 | `0x85c7b311d1e5bf97` |
|
||||
| `init-0.4th` | 2200, 2201 | `0xd0a9550baf786bb3` |
|
||||
| `init-1.4th` | 4406, 4415, 4425, 4435 | `0x63e251adb0a03613` |
|
||||
@@ -225,19 +225,22 @@
|
||||
| 4842 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
||||
| 4851 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
|
||||
| 4852 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
|
||||
| 4900 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4901 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4902 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4903 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4904 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4905 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4906 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4907 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4908 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4909 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4910 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4911 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4912 | `fabric.4th` | `0x355ccc154aac15b3` | ok |
|
||||
| 4900 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4901 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4902 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4903 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4904 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4905 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4906 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4907 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4908 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4909 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4910 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4911 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4912 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4913 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4914 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
| 4915 | `fabric.4th` | `0x339aa4c724b95879` | ok |
|
||||
|
||||
## Conflicts
|
||||
|
||||
|
||||
@@ -150,3 +150,30 @@ Block 4912
|
||||
CZ @ CCOLOR @
|
||||
LINE
|
||||
LOOP ;
|
||||
|
||||
Block 4913
|
||||
( CUBE: wireframe, 8 vertices via bit-coded corner index n )
|
||||
( (bit0=x, bit1=y, bit2=z; set=+CS, clear=-CS from center). )
|
||||
VARIABLE CS
|
||||
: VERT ( n -- x y z )
|
||||
DUP 1 AND IF CS @ ELSE CS @ NEGATE THEN CX @ +
|
||||
SWAP DUP 2 AND IF CS @ ELSE CS @ NEGATE THEN CY @ +
|
||||
SWAP DUP 4 AND IF CS @ ELSE CS @ NEGATE THEN CZ @ +
|
||||
SWAP DROP ;
|
||||
|
||||
Block 4914
|
||||
( EDGE: draws one cube edge between vertex indices n1,n2. )
|
||||
VARIABLE EN2
|
||||
: EDGE ( n1 n2 color -- )
|
||||
>R EN2 ! VERT EN2 @ VERT R> LINE ;
|
||||
|
||||
Block 4915
|
||||
( CUBE: 12 edges -- 4 bottom, 4 top, 4 vertical. )
|
||||
: CUBE ( cx cy cz s color -- )
|
||||
CCOLOR ! CS ! CZ ! CY ! CX !
|
||||
0 1 CCOLOR @ EDGE 1 3 CCOLOR @ EDGE
|
||||
3 2 CCOLOR @ EDGE 2 0 CCOLOR @ EDGE
|
||||
4 5 CCOLOR @ EDGE 5 7 CCOLOR @ EDGE
|
||||
7 6 CCOLOR @ EDGE 6 4 CCOLOR @ EDGE
|
||||
0 4 CCOLOR @ EDGE 1 5 CCOLOR @ EDGE
|
||||
2 6 CCOLOR @ EDGE 3 7 CCOLOR @ EDGE ;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user