Skip to content

Instantly share code, notes, and snippets.

@derekmc
Last active March 12, 2025 15:29
Show Gist options
  • Save derekmc/b1d942a1e53685e8ee88c1f2b6b82b9c to your computer and use it in GitHub Desktop.
Save derekmc/b1d942a1e53685e8ee88c1f2b6b82b9c to your computer and use it in GitHub Desktop.
to draw voxels, iterate over dimensions
in the order of the most perpedicular to the
camera view vector, ie, the smallest magnitude
dot product.
Recursive voxel space
voxel subdivisions: 4x4x4 = 64 subcubes
grid layer size 128x128x128 (64 cubes from viewer in any direction)
layers are centered on current location, each layer has bigger voxels on the outside,
and
voxel fractal drawing algorithms
cube 1-27
iterate o
............x..
.........x.....
......x........
...x...........
x..............
1x + 7y + 8z = m
ax + by + cz = m
Level
[1, 0, -a/c]
[0, 1, -b/c]
Planar Vectors
[c, 0, -a]
[0, c, -b]
x = 1
y = 0
z = -1/8
x = 0
y = 1
z = -7/8
Level Paths
x = -8
y = 0
z = 1
x = -7
y = 1
z = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment