2021-04-14 21:00:48 +02:00
|
|
|
Convenience library to create art using [geo](https://georust.org/).
|
2021-03-30 22:27:12 +02:00
|
|
|
|
|
|
|
* Creates CLI interface (including random seed management)
|
|
|
|
* renders SVGs and PNG
|
2021-04-14 21:00:48 +02:00
|
|
|
* comes with helper functions and extensions, to make live more convenient.
|
2021-03-30 22:27:12 +02:00
|
|
|
* load SVGs
|
|
|
|
* scaling
|
|
|
|
|
2021-04-16 11:02:11 +02:00
|
|
|
# Binaries
|
|
|
|
|
|
|
|
I deliver some binaries to give you an impression and ideas
|
|
|
|
for your own images.
|
|
|
|
|
|
|
|
All binaries created by polygon art have the same
|
|
|
|
command line interface.
|
|
|
|
|
|
|
|
## Asteroids
|
2021-04-14 21:00:48 +02:00
|
|
|
|
|
|
|
asteroids is an example binary which renders an
|
|
|
|
image inspired by the
|
|
|
|
[asteroids game from the 1979](https://de.wikipedia.org/wiki/Asteroids).
|
|
|
|
|
|
|
|
![image](./images/asteroids.png)
|
|
|
|
|
2021-04-16 11:02:11 +02:00
|
|
|
## Rings
|
|
|
|
|
|
|
|
![image](./images/rings.png)
|
2021-03-30 22:27:12 +02:00
|
|
|
|
2021-04-16 11:02:11 +02:00
|
|
|
# How to run /examples
|
2021-03-30 22:27:12 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
cargo run --example clipping -- --help # run the examples/clipping
|
2021-09-28 20:14:17 +02:00
|
|
|
```
|
|
|
|
# How to Build (with flakes)
|
|
|
|
|
|
|
|
```shell
|
|
|
|
nix build
|
|
|
|
```
|
|
|
|
|
|
|
|
# How to us it (with flakes)
|
|
|
|
|
|
|
|
``` nix
|
|
|
|
{
|
|
|
|
description = "example usage";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
|
|
|
|
inputs.polygon-art.url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
|
|
|
|
inputs.polygon-art.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
outputs = { self, nixpkgs, polygon-art, ... }: {
|
|
|
|
nixosConfigurations.example = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
({ pkgs, ... }: {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(_self: _super: {
|
|
|
|
polygon-art = polygon-art.packages.${pkgs.system};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
environment.systemPackages = [ pkgs.polygon-art.polygon-art ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2021-09-28 22:17:59 +02:00
|
|
|
# How to update
|
|
|
|
|
|
|
|
``` shell
|
|
|
|
cargo update # to update Cargo.lock
|
2021-09-28 23:31:12 +02:00
|
|
|
# or
|
|
|
|
cargo update --offline # to update Cargo.lock
|
2021-09-28 22:17:59 +02:00
|
|
|
```
|
|
|
|
and
|
|
|
|
|
|
|
|
``` shell
|
|
|
|
nix flake update # to update flake.lock
|
|
|
|
nix build # to verify if everything is ok
|
|
|
|
```
|