Type to search.

    The subplot art environment

    Subplot is a Rust framework that implements An environment for computer art, targeting pen plotter artwork using SVGs. The subplot tool works on a directory with a TOML file that describes the parameters of the piece, like the paper size and orientation:

    name = "january-postcard"
    module = "voronoi-rays"
    paper = "A6"
    orientation = "landscape"
    

    The module names a Rust library (dylib on macOS) that's used to generate the image. Each module needs a plot function with the following signature:

    #[no_mangle]
    pub fn plot(sheet: &mut Sheet, params_map: &HashMap<String, ParamValue>)
    

    The artwork is regenerated by calling this function whenever the library is rebuilt or the TOML file changes. Below the common fields is a dictionary of module-specific parameters:

    [params]
    seed = 12345
    points = 5
    

    Each artwork file generated is saved and numbered with a preview file that's hard-linked to the latest iteration. An SVG viewer that redraws when the underlying file changes (like Gapplin) can open the stable preview file for feedback on changes to the program.

    Roadmap

    I want to extend subplot with a web interface, similar to saxi. Instead of viewing SVG in a native app, each iteration of the artwork would automatically be sent to a web page where it could be fine-tuned for plotting. It's a lot easier to lay out a plot using form controls with immediate feedback in the same screen, than juggling a text file and viewer app at the same time.

    This is a big project, and I don't want to cut any corners by using non-Rust code, so I'll have to build it up in smaller pieces:

    Once the basics are plumbed through, I can add more features, like: