diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f641f6 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# voxelmap + +A program that takes in mathematical descriptions and makes layer-by-layer guides for minecraft and other voxel-based games. + +It also generates a `.litematic` file for the [Litematica minecraft mod](https://github.com/maruohon/litematica). + +## Build + +> `cargo build --release` + +## Options + +``` +voxelmap 0.1.0 +raffitz +Converts mathematical descriptions of objects to voxel maps + +USAGE: + voxelmap [FLAGS] [OPTIONS] + +FLAGS: + -d, --debug Show parsing steps + -h, --help Prints help information + -o, --offset Offset the computation by half a block + -t, --test Parses the input file, does not output + -V, --version Prints version information + +OPTIONS: + -b, --block The minecraft block to be used in the Litematica output, defaults to minecraft:stone + -s, --scale The scale parameter for the object + +ARGS: + The file describing the shape to map + The folder where the output images will be stored +``` + +## Output + +The output consists of a series of images, each depicting a layer of the solid, as well as a `.litematic` file. + +## Current Solid Examples + +| File | Name | Description | +| --- | --- | --- | +| `sphere.solid` | Sphere | A sphere of radius s | +| `torus1.solid` | Torus | A torus with a tube radius of s, and a hole radius of 2 * s | +| `ramp.solid` | Ramp | A spiraling ramp | +| `helix1.solid` | Helix | A helix | +| `rotating_triangle_torus.solid` | RTT | A triangle rotating 2π around the z axis | +| `hollow_rtt.solid` | RTT | A hollow triangle rotating 2π around the z axis | +| `rotating_triangle_torus2.solid` | RTT | A triangle rotating 4π around the z axis | +| `hollow_rtt_t6.solid` | RTT | A hollow triangle rotating 4π around the z axis | +| `rotating_triangle_torus3.solid` | RTT | A triangle rotating 2π/3 around the z axis | +| `hollow_rtt_t1.solid` | RTT | A hollow triangle rotating 2π/3 around the z axis | +| `rotating_triangle_torus4.solid` | RTT | A triangle rotating 4π/3 around the z axis | +| `hollow_rtt_t2.solid` | RTT | A hollow triangle rotating 4π/3 around the z axis | + +## Example execution + +```sh + +cargo run --release -- -s 10 --block 'minecraft:red_nether_brick' hollow_rtt.solid hrtt3 + +```