# bluegen

> blue noise mask generator

Latest version **0.0.8** (published 2020-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install bluegen
pnpm add bluegen
yarn add bluegen
bun add bluegen
```

Provides the command `bluegen`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2020-03-22 |
| First published | 2019-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joseph Eagar |
| Maintainers | joeedh |
| Keywords | bluenoise[D[C, bluenoise, sampling, 2d, mask, stippling |

## Links

- npm: https://www.npmjs.com/package/bluegen
- Repository: https://github.com/joeedh/StochasticScreenGenerator
- Homepage: https://github.com/joeedh/StochasticScreenGenerator#readme
- Issues: https://github.com/joeedh/StochasticScreenGenerator/issues
- npm.io page: https://npm.io/package/bluegen

## Dependencies (2)

- [pngjs](https://npm.io/package/pngjs.md) ^3.4.0
- [requirejs](https://npm.io/package/requirejs.md) ^2.3.6

## Recent versions

- 0.0.8 (latest) — 2020-03-22
- 0.0.7 — 2020-03-22
- 0.0.6 — 2019-06-04
- 0.0.5 — 2019-06-04
- 0.0.4 — 2019-06-02
- 0.0.3 — 2019-06-02
- 0.0.2 — 2019-06-02
- 0.0.1 — 2019-06-01

## README

# Stochastic Screen Generator (for printing, stippling, etc)

[Click here to try it out](http://joeedh.github.io/StochasticScreenGenerator)

This little web app generates stochastic (blue noise) screens
for digital halftoning/stippling. It has four methods:

- Smoothmask: Makes a standard hiearchial blue noise mask, then computes offsets to nudge each mask level to be more smooth.
  These go into a table.
- Void-and-cluster: A classic, this one works best for generating
  stochastic screens for printers.
- Dart: Classic, progressive dart throwing. Generates
  the highest quality masks.
- SPH: SPH fluid method. Not quite as good as dart, and
  a bit harder to control. Is much slower at higher resolutions.
- Jitter: A very simple randomlized hexagonal grid method. Randomizes the
  hiearhcial levels, not the point positions. Mostly for reference purposes.
  Produces the worst results.

# Usage

Load index.html in a web browser. Press "Start Generating".

![example image](http://joeedh.github.io/StochasticScreenGenerator/examples/Startup.png "Example")

# Using with Blue Noise Stippler

To test the generated masks, you can use [this stippling app of mine](https://github.com/joeedh/BlueNoiseStippling).
[Here's a direct link](http://joeedh.github.io/BlueNoiseStippling/index.html) to the app itself.

Click on the "Save To Cache" button on the lower-right side of the screen. You should see a
message like "saving blue noise mask to local storage." You should be able to use the new mask
in the stippling app.

# FFT

The FFT power spectrum feature is ported [from PSA](https://github.com/nodag/psa).
I recommend using it with "dimensions" set to 50 or less (I usually use 32).

---
_Source: https://npm.io/package/bluegen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
