No description
Find a file
2023-07-07 23:41:35 +02:00
examples feat: add merge_ext.rs and scale_ext.rs 2021-04-13 20:30:51 +02:00
images feat: add rings.rs 2021-04-16 11:02:11 +02:00
pool feat: add asteroids.rs 2021-04-08 22:06:39 +02:00
src bug: fixed a3,a4,a5 format 2021-05-24 12:00:37 +02:00
tests initial commit 2021-04-07 08:04:29 +02:00
.envrc direnv makes everything go woooooooooo 2023-07-07 23:41:35 +02:00
.gitignore doc: release 1.0.0 2021-04-14 21:00:48 +02:00
Cargo.lock vers: 1.0.2 bump 2021-09-28 23:31:12 +02:00
Cargo.toml vers: 1.0.2 bump 2021-09-28 23:31:12 +02:00
default.nix vers: 1.0.2 bump 2021-09-28 23:31:12 +02:00
flake.lock feat: add flake 2021-09-28 22:09:10 +02:00
flake.nix vers: 1.0.1 bump 2021-09-28 22:50:51 +02:00
LICENSE initial commit 2021-04-07 08:04:29 +02:00
README.md vers: 1.0.2 bump 2021-09-28 23:31:12 +02:00
shell.nix feat: introduce simple font from asteroid game 2021-04-12 07:23:52 +02:00

Convenience library to create art using geo.

  • Creates CLI interface (including random seed management)
  • renders SVGs and PNG
  • comes with helper functions and extensions, to make live more convenient.
    • load SVGs
    • scaling

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

asteroids is an example binary which renders an image inspired by the asteroids game from the 1979.

image

Rings

image

How to run /examples

cargo run --example clipping -- --help # run the examples/clipping

How to Build (with flakes)

nix build

How to us it (with flakes)

{
  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 ];
        })
      ];
    };
  };
}

How to update

cargo update # to update Cargo.lock
# or
cargo update --offline # to update Cargo.lock

and

nix flake update # to update flake.lock
nix build        # to verify if everything is ok