live ram_knee: no point inside the jointlib plates reads outside (0 of 38,477); the ray count held beside the bars
inside-reads-inside replaces rays-inside: a 0.003 grid inside the four bars (truth by each bar's face planes) and the fixture's 29 points, all read inside. Parity over the whole mesh read 1,906 outside. Read bar by bar, the 24 points between the plates fall outside every bar's box and one ray no longer miscounts them; ram_rays.json's `points` are now 14 beside the bars that one ray reads inside and three read outside. Two rays, or a second and third along x and y, read them as three do. ram_knee.result.json regenerated: 21 checks. docs: the piece-by-piece read. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
a099924d4b
commit
244fd2ab20
4 changed files with 54 additions and 39 deletions
|
|
@ -916,14 +916,14 @@ collars at the eye and a base clevis whose foot runs 0.01 into the thigh; 12 par
|
|||
oracle, `ram.Signed(shells, cap)`: the nearest face for the depth, the crossing parity of three rays, by majority,
|
||||
for the side. One ray that runs through an edge or a vertex miscounts and signs a sample inside a plate it stands
|
||||
clear of. `tests/fixtures/ram_rays.json` holds the ray count: the rocker plates as the joint library builds them
|
||||
and 24 points between the plates, each on the first ray short of an edge or a vertex. One ray signs all 24
|
||||
and 14 points beside their bars, each on the first ray short of an edge or a vertex. One ray signs all 14
|
||||
inside; three sign none. Three rays are not a proof: of 146 such points one ray missigned, two rays missigned 16.
|
||||
The same file holds 29 points inside the plates, where the gate's proof between samples needs the sign: the oracle
|
||||
as it is made reads each inside; two rays read 16 outside, one ray 10, the second ray set to the first 10, the
|
||||
second and third along x and y 6. Most stand where a side's two bars overlap, and the fixture gives the four bars
|
||||
as one shell: there the parity of a ray counts two skins, and three rays read 1,906 of 38,448 inside grid points
|
||||
outside. With each bar its own shell, as `Signed` takes a part's shells and as the live knee builds them, they
|
||||
read none outside: a part whose closed pieces overlap is given piece by piece.
|
||||
Two rays, or a second and third along x and y, read those 14 as three do: the fixture holds the count above one.
|
||||
A mesh is read piece by piece: `Signed` splits it into the pieces its faces join, each closed, and a point is
|
||||
inside the part where it is inside any piece. The joint library's plates are one mesh of four bars, a side's two
|
||||
overlapping about the pivot; parity over the whole mesh reads the overlap as outside (1,906 of 38,448 grid
|
||||
points inside the bars, the direction the proof between samples cannot bear), and piece by piece none of them
|
||||
reads outside, which the live check holds.
|
||||
|
||||
| drive | reading |
|
||||
| --- | --- |
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -10,10 +10,10 @@ without them). <out> is an absolute path; writes <out>.result.json and <out>.r3_
|
|||
-62.5 and -125) and exits 1 when a check failed.
|
||||
|
||||
The oracle is ram.Signed, three rays by majority. Its ray count is held by tests/fixtures/ram_rays.json: the rocker
|
||||
plates as Imagination's jointlib builds them and points between the plates that stand on the first ray short of an
|
||||
plates as Imagination's jointlib builds them and points beside their bars that stand on the first ray short of an
|
||||
edge or a vertex. One ray reads them inside a plate they stand clear of; the oracle as it is made reads none inside.
|
||||
Its rays are held by the fixture's points inside the plates, where the plates' two bars overlap: the oracle as it is
|
||||
made reads each inside, and two rays, one, a repeated ray or rays along x and y read some outside.
|
||||
The same mesh is four closed bars joined into one, a side's two overlapping: the oracle reads it bar by bar, and no
|
||||
point of a grid inside the bars, nor of the fixture's 29 inside points, reads outside.
|
||||
|
||||
A clearance verdict is a sign, the gate's own. FLAT follows lodur:ruling:deterministic-bound-margin. The checks run
|
||||
inside one try: an uncaught error is a failed check that names its section, and the result file is always written.
|
||||
|
|
@ -323,32 +323,40 @@ try:
|
|||
exact = np.maximum.reduce([np.abs(cloud[:, 0]) - 0.13, np.abs(cloud[:, 1]) - 0.14, np.abs(cloud[:, 2] - 0.725) - 0.425])
|
||||
check("three-rays: 4000 random points about a box are signed as the box signs them", ((core < 0) == (exact < 0)).all(), int(((core < 0) != (exact < 0)).sum()))
|
||||
|
||||
# the ray count: the jointlib rocker plates, and points between them aimed along the first ray at an edge or a vertex
|
||||
# the ray count: the jointlib rocker plates, and points beside a bar, in its bounding box, aimed along the first ray at an edge or a vertex
|
||||
fixture = json.loads((SURFACE / "tests" / "fixtures" / "ram_rays.json").read_text(encoding="utf-8"))
|
||||
plates, aimed = {"plates": [(np.array(fixture["verts"]), fixture["faces"])]}, np.array(fixture["points"])
|
||||
made, single = Signed(plates)("plates", aimed), Signed(plates, rays=1)("plates", aimed)
|
||||
RES["readings"]["jointlib plates: points one ray signs inside, of %d" % len(aimed)] = int((single < 0).sum())
|
||||
RES["readings"]["jointlib plates: points the oracle signs inside"] = int((made < 0).sum())
|
||||
# one ray reads all 24 inside; the oracle as made reads none. The bound on one ray's count is the geometric mean of 1 and 24
|
||||
check("ray-count: between the jointlib rocker plates, points on the first ray short of an edge or a vertex read outside by the oracle as it is made, inside by one ray",
|
||||
(np.abs(aimed[:, 0]) < 0.349).all() and (made > 0).all() and (single < 0).sum() >= 5, [int((made < 0).sum()), int((single < 0).sum())])
|
||||
# one ray reads all 14 inside; the oracle as made reads none. The bound on one ray's count is the geometric mean of 1 and 14
|
||||
check("ray-count: beside the jointlib rocker plates' bars, points on the first ray short of an edge or a vertex read outside by the oracle as it is made, inside by one ray",
|
||||
(made > 0).all() and (single < 0).sum() >= 4, [int((made < 0).sum()), int((single < 0).sum())])
|
||||
|
||||
# the other way, which the gate's proof between samples leans on: points inside the same plates. The oracle as it is
|
||||
# made reads every one inside; each change of its rays reads some outside. Counts of points: shipped 0 (half a
|
||||
# point, lodur:ruling:deterministic-bound-zero-reading), the least mutant 6 (the second and third rays along x
|
||||
# and y), geometric mean 1.7: the check asks 2
|
||||
within = np.array(fixture["inside"])
|
||||
|
||||
def outside(count=None, rays=None):
|
||||
oracle = Signed(plates) if count is None else Signed(plates, rays=count) # as made: the count is Signed's own
|
||||
if rays is not None:
|
||||
oracle.rays = [Vector(ray).normalized() for ray in rays]
|
||||
return int((oracle("plates", within) >= 0).sum())
|
||||
read = {"as made": outside(), "two rays": outside(2), "one ray": outside(1), "the second ray the first": outside(rays=(R.RAYS[0], R.RAYS[0], R.RAYS[2])),
|
||||
"the second and third along x and y": outside(rays=(R.RAYS[0], (1, 0, 0), (0, 1, 0)))}
|
||||
RES["readings"]["jointlib plates: inside points read outside, of %d" % len(within)] = read
|
||||
check("rays-inside: points inside the jointlib rocker plates all read inside by the oracle as it is made, and some read outside with two rays, with one, with the second ray the first, "
|
||||
"and with the second and third along x and y", read["as made"] == 0 and min(count for name, count in read.items() if name != "as made") >= 2, read)
|
||||
# the other way, which the gate's proof between samples leans on: no point inside the plates reads outside. The
|
||||
# fixture's mesh is four closed bars, a side's two overlapping about the pivot; a point is truly inside where it is
|
||||
# 0.001 or more inside one bar (each a convex prism: inside every face's plane). A grid 0.003 apart at three depths
|
||||
# of each plate, and the fixture's 29 points. A count of points: shipped 0 (half a point,
|
||||
# lodur:ruling:deterministic-bound-zero-reading), parity over the whole mesh (M-whole) 1,906; the check asks 0
|
||||
hulls = []
|
||||
for verts, faces in R._pieces(*plates["plates"][0]):
|
||||
tri = np.array([[verts[i] for i in face[:3]] for face in faces])
|
||||
normal = np.cross(tri[:, 1] - tri[:, 0], tri[:, 2] - tri[:, 0])
|
||||
normal /= np.linalg.norm(normal, axis=1)[:, None]
|
||||
level = (normal * tri[:, 0]).sum(axis=1)
|
||||
out = (normal @ verts.mean(axis=0) - level) > 0
|
||||
normal[out], level[out] = -normal[out], -level[out]
|
||||
hulls.append((normal, level))
|
||||
lo, hi = (np.array(fixture["verts"]).min(axis=0), np.array(fixture["verts"]).max(axis=0))
|
||||
cloud = np.array([(s * (SLAB_R[0] + 2 * HALF * f), y, z) for s in (-1.0, 1.0) for f in (0.2, 0.5, 0.8)
|
||||
for y in np.arange(lo[1] + 0.0015, hi[1], 0.003) for z in np.arange(lo[2] + 0.0015, hi[2], 0.003)])
|
||||
deep = np.max([-(cloud @ normal.T - level).max(axis=1) for normal, level in hulls], axis=0) >= 0.001
|
||||
within = np.concatenate([cloud[deep], np.array(fixture["inside"])])
|
||||
missed = int((Signed(plates)("plates", within) >= 0).sum())
|
||||
RES["readings"]["jointlib plates: bars the mesh is read as"] = len(hulls)
|
||||
RES["readings"]["jointlib plates: inside points read outside, of %d" % len(within)] = missed
|
||||
check("inside-reads-inside: no point inside the jointlib rocker plates, where its bars overlap or not, reads outside by the oracle as it is made",
|
||||
len(hulls) == 4 and int(deep.sum()) > 30000 and missed == 0, [len(hulls), int(deep.sum()), missed])
|
||||
|
||||
SECTION[0] = "seat"
|
||||
seat = np.concatenate([v for v, _ in shells["parent.seat"]])
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@
|
|||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "ray-count: between the jointlib rocker plates, points on the first ray short of an edge or a vertex read outside by the oracle as it is made, inside by one ray",
|
||||
"name": "ray-count: beside the jointlib rocker plates' bars, points on the first ray short of an edge or a vertex read outside by the oracle as it is made, inside by one ray",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "inside-reads-inside: no point inside the jointlib rocker plates, where its bars overlap or not, reads outside by the oracle as it is made",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
|
|
@ -108,10 +113,12 @@
|
|||
"bell crank: least margin of a zoned pair, 251 steps uncapped": 0.000118,
|
||||
"bell crank: pairs": 60,
|
||||
"bell crank: pairs refused with nothing let": 19,
|
||||
"bell crank: seconds, 49 steps capped": 2.12,
|
||||
"bell crank: seconds, 49 steps capped": 0.946,
|
||||
"bell crank: zoned pairs": 20,
|
||||
"four bar: barrel inside the shin's clearance": -0.122,
|
||||
"jointlib plates: points one ray signs inside, of 24": 24,
|
||||
"jointlib plates: bars the mesh is read as": 4,
|
||||
"jointlib plates: inside points read outside, of 38477": 0,
|
||||
"jointlib plates: points one ray signs inside, of 14": 14,
|
||||
"jointlib plates: points the oracle signs inside": 0,
|
||||
"moved x: both": -0.0543,
|
||||
"moved x: the coupler at x 0.25, inside the horn's 0.23..0.31": -0.02,
|
||||
|
|
@ -120,7 +127,7 @@
|
|||
"search: candidates": 13824,
|
||||
"search: pass the gates before clearance": 78,
|
||||
"search: refused on their own parts": 21,
|
||||
"search: seconds": 43.3,
|
||||
"search: seconds": 32.7,
|
||||
"search: worlds built": 22,
|
||||
"the base clevis's foot inside the thigh": -0.01
|
||||
},
|
||||
|
|
@ -496,9 +503,9 @@
|
|||
}
|
||||
},
|
||||
"renders": [
|
||||
"F:/aeth-wt/fable-ramcore/scratch/h4/out/live_h4.r3_0.png",
|
||||
"F:/aeth-wt/fable-ramcore/scratch/h4/out/live_h4.r3_62p5.png",
|
||||
"F:/aeth-wt/fable-ramcore/scratch/h4/out/live_h4.r3_125.png"
|
||||
"F:/aeth-wt/fable-ramlows/scratch/out/live5.r3_0.png",
|
||||
"F:/aeth-wt/fable-ramlows/scratch/out/live5.r3_62p5.png",
|
||||
"F:/aeth-wt/fable-ramlows/scratch/out/live5.r3_125.png"
|
||||
],
|
||||
"ok": true
|
||||
}
|
||||
Loading…
Reference in a new issue