fart
is my personal tooling and framework for SVG-based generative
art. Originally inspired by Benjamin Kovach's excellent write up on
infrastructure and tooling for generative
art, but has
been evolving in its own direction since then.
I maintain fart
just for myself. If it happens to work out for you, okay!
But this is not intended to be the framework for creating art with Rust that
everyone, everywhere should use. If you file an issue, I might or might not
respond, let alone fix it. If you submit a pull request, I might or might not
respond, and I might or might not merge it.
If you want to make generative art with Rust, probably check out
nannou
rather than fart
!
cargo install fart-cli
Generate a new fart
project:
$ fart new my-cool-project
Run fart watch
to automatically build your project and generate an SVG on each
change.
$ cd my-cool-project/
$ fart watch
Hack on your project! Keep refreshing my-cool-project/images/latest.svg
in
your browser or preferred SVG viewer to see what your results look like.
For a full listing of CLI commands and flags, run fart help [subcommand]
.
Create a new fart
project named <name>
.
Compile and run a a fart
project, producing a new, time-stamped SVG render
that is automatically committed for you.
Watch a fart
project, automatically build and run it on each change. Saves and
commits time-stamped SVGs for you, so you can see the evolution of your project.
Serve a project and its rendered SVGs on a local HTTP server. Automatically
watches the project for changes and re-builds and re-runs it on each change,
similar to fart watch
. It provides a Web UI with a live-reloading preview,
displays build and program logs, and has form widgets for interactively tweaking
fart::user_const!
s.
Contains utilities for generating SVGs, building scenes, and working with numbers and RNGs.
Common traits and functions that are used most of the time.
Intended for most projects to glob import the whole thing:
use fart::prelude::*;
A canvas is a collection of drawn paths, which can be rendered into an SVG.
Paths that get drawn in the SVG. Paths are made up of a series of line commands, and have a an associated color.
Helpers for making images from processing-style, update->draw->update->draw->... loops.
2D axis-aligned bounding boxes (AABBs) and AABB trees. Useful for fast-but-imprecise detection of collision/intersection/containment between things.
A hodge-podge assortment of 2D computational geometry algorithms built on top of
euclid
.
fart
has many re-exports of other crates, to let you hit the ground running!
-
fart::euclid
: Re-export of theeuclid
crate. -
fart::failure
: Re-export of thefailure
crate. -
fart::noise
: Re-export of thenoise
crate. -
fart::num_traits
: Re-export of thenum-traits
crate. -
fart::rand
: Re-export of therand
crate.