Wassily is both an API and set of tools for creating generative 2D art. It allows you to create images that can easily be scaled to any size without loss of quality. It is useful for images that are meant to be printed at large sizes or displayed on screen. Included are many generative art algorithms and utilities for dealing with colors and noise.
Wassily is built as a modular system comprising several focused crates:
wassily-core
: Core rendering infrastructure including canvas, shapes, and drawing primitiveswassily-color
: Color utilities, palettes, and color space operationswassily-noise
: Noise generation functions and utilities optimized for generative artwassily-geometry
: Geometric operations, curves, spatial data structures, and subdivision algorithmswassily-effects
: Visual effects, textures, and procedural generation toolswassily-algorithms
: Specialized rendering algorithms and advanced techniques
You can use individual crates for specific functionality, or import everything through the unified prelude for maximum convenience.
Add wassily to your Cargo.toml
:
[dependencies]
wassily = "0.2.0"
Then import the prelude to get started:
use wassily::prelude::*;
fn main() {
// Create a canvas
let mut canvas = Canvas::new(800, 600);
// Set background color
canvas.fill(*WHITE);
// Draw a simple shape
Shape::new()
.circle(center(800, 600), 100.0)
.fill_color(*BLUE)
.stroke_color(*BLACK)
.stroke_weight(2.0)
.draw(&mut canvas);
// Save the result
canvas.save_png("output.png");
}
- Vector Graphics: High-quality scalable graphics using tiny-skia
- Rich Color System: Advanced color spaces, palettes, and color manipulation
- Noise Generation: Comprehensive noise functions optimized for generative art
- Geometric Tools: Curves, subdivision, spatial data structures, and geometric algorithms
- Visual Effects: Textures, grain, distortion, and procedural effects
- Specialized Algorithms: Advanced rendering techniques and artistic algorithms
use wassily::prelude::*;
// Everything you need is now available
use wassily::core::{Canvas, Shape};
use wassily::color::*;
use wassily::noise::*;
// For more focused dependencies
use wassily_core::Canvas;
use wassily_color::rand_okhsl;
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/new-noise-algorithm
) - Commit your Changes (
git commit -m 'Add Worley noise implementation'
) - Push to the Branch (
git push origin feature/new-noise-algorithm
) - Open a Pull Request
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed under MIT or Apache-2.0 at the recipient's choice, without any additional terms or conditions.
Released under MIT or Apache-2.0 by @jeffreyrosenbluth.