04 / FROM COORDINATES TO A CHAMBER
The mathematics of the Weave
The game uses four-dimensional positions, orthonormal frames, geometric intersections and collision tests. Here is how those pieces meet.
The moving frame.
Let B contain the four basis vectors as columns. An orthonormal frame satisfies BᵀB = I. World and local coordinates are related by:
p_local = Bᵀ p_world
Cutting a solid.
For an origin o and slice normal n, the visible hyperplane is defined by n · (p − o) = 0. The runtime intersects the edges of its four-dimensional boxes with that hyperplane, builds the resulting faces, and renders them as a three-dimensional mesh.
If an edge goes from a to b and their signed distances are dₐ and dᵦ, an intersection occurs at a + t(b − a), where t = dₐ/(dₐ − dᵦ), provided the edge crosses the plane.
A sphere inside a hypersphere.
Beyond the hypersphere’s radius, the section disappears. This geometric relationship drives the changing visibility and size of spherical collectibles.
Collision still belongs to four dimensions.
Walking and jumping use the underlying box bounds in XYZW, so passing through an obstacle’s unseen extent still produces a collision. Rendering alone does not decide whether a path is open.
What is four-dimensional here?
The puzzle geometry, coordinates, rotations and collision model are four-dimensional. Detailed trees, character meshes and decorative architecture are conventional three-dimensional art, placed and revealed using the slice. The game is not a general-purpose simulation of every possible four-dimensional physical object.
Validation.
The project’s automated checks cover orthonormal rotations, inverse transforms, analytical slices and reachable quest locations throughout the campaign. They support the implementation; they do not replace player testing.