3d Numpy array in -> Voxel world out

pip3 install voxel_world
git clone https://github.com/jackparmer/VoxelWorld.git
cd VoxelWorld
python3 -m pip install .
from voxel_world import VoxelWorld
For physics simulation, computer vision, games, art, whatever
Features!
- Automatic GIF generation
- Simple! Numpy 3d ones array in -> Voxel world out
- Portable! Outputs images or standalone HTML files with Vixel
- Notebooks! Works well in the Jupyter notebook ecosystem
- Eye candy! Ambient occlusion, ray tracing from Vixel, etc
from voxel_world import Volume, Surface;
volume = Volume(Volume.purlin_matrix(32)); surf = Surface(volume)
surf.color = (255,0,0)
volume.add(surf).show()

import random
from voxel_world import Volume
Volume(
Volume.purlin_matrix(16),
theme=random.choice(list(Volume.themes.keys())),
viewing_angle=(random.randint(0, 90), random.randint(0, 90)),
).render().show()

from voxel_world import Volume, Vixel; vw = Volume(); vix = Vixel(vw); vix.html()

from voxel_world import Volume, Surface, Agent, Sequence
volume = Volume(Volume.purlin_matrix(64));
surf = Surface(volume);
agents = [Agent(surf, mask) for mask in Sequence.snake(grid_size=64, num_steps=1000)];
seq = Sequence(agents);
seq2 = seq.apply_bg(volume)
seq2.save('voxel_animation64_v2.gif')



python3 -m build
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*