# Introduction

[Valora ](https://github.com/turnage/valora)is a brush for generative fine art. With valora you can write visual compositions that

* are repeatable with rng seeds managed for you
* can be reproduced at arbitrary resolutions without changing the scale of the composition
* have strict type-safe color semantics that won't surprise you in print (thanks to [palette](https://docs.rs/palette)!)
* leverage all of your hardware (You can shade each path with a different fragment shader!)
* you will rarely have to debug, thanks to Rust!

This guide covers valora in depth, but to start let's see some pixels! Keep[ the docs](https://docs.rs/valora) open to follow along.

```bash
cargo new art --bin && cd art
cargo install cargo-edit && cargo add valora
```

Put the following in your `main.rs`:

```rust
use valora::prelude::*;

fn main() -> Result<()> {
    run_fn(Options::from_args(), |_gpu, world, _rng| {
        Ok(move |ctx: Context, canvas: &mut Canvas| {
            canvas.set_color(LinSrgb::new(1., 1., 1.));
            canvas.paint(Filled(ctx.world));

            let max_radius = world.width / 3.;
            let radius = ctx.time.as_secs_f32().cos().abs() * max_radius;

            canvas.set_color(LinSrgb::new(1., 0., 0.));
            canvas.paint(Filled(Ellipse::circle(world.center(), radius)));
        })
    })
}
```

Now execute:

```bash
cargo run --release
```

The first time, compilation will take a while. When valora starts, you should see a window with a red circle oscillating in size.

![Your first valora result!](https://1276503419-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lw1VWDRh9_wPSAWr8kv%2F-LwF4fhZ6L2tnTrHXzOy%2F-LwFAnsGQHonl2ULMLOB%2Fanim.gif?alt=media\&token=f0b9c5e2-d38a-4d53-9499-f0678e0569ed)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://paytonturnage.gitbook.io/valora/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
