Procedurally generated jewel illustrations triggered by a single random seed, written in Processing.
Generative Jewels is a tiny Processing sketch that draws crystalline jewel shapes built from quadratic‑vertex polygons. Give it a seed and you'll always get the exact same gemstone; change the seed and you'll get a brand‑new cut.
Images can be exported up to poster resolution (tested at 4K) and are perfect for wallpapers, album art or print.
- The sketch picks an outer radius and inner radius for the shape.
- A random number of facets (between 5‑12 by default) is chosen.
- Each facet colour is picked from the HSB colour space.
- Quadratic Bézier vertices connect the points, creating smooth, gem‑like edges.
Because all randomness is driven through Processing’s random() function, calling randomSeed(seed) anywhere before draw() will make the output fully deterministic.
void setup() {
randomSeed(42); // 👈 same jewel every run
...
}- Install Processing 4 or higher from https://processing.org/download.
- Clone this repo or download the ZIP.
- Open
genjewles2.pdein the Processing IDE. - Press Run (⌘R / Ctrl‑R).
The sketch renders at 1200 × 1200 px by default and refreshes once per second (frameRate(1)).
Set the boolean at the top of the file:
boolean saveOne = true;The next frame will be written to Exports/YYYYMMDD‑HHMMSS.PNG and the flag resets, so you’ll never overwrite a file by accident.
| Constant | Description | Typical range |
|---|---|---|
outer |
Radius of the outermost points | 500–700 |
inner |
Radius of the inner control points | outer‑200 → outer‑300 |
facets |
Number of sides | 5–12 |
Feel free to add your own palettes, animation, or SVG export.
Processing sketches can be rendered headless:
processing-java --sketch=/path/to/GenerativeJewels \
--output=/path/to/output \
--run \
--present \
--args 12345 # seedSix freshly generated jewels—drop your own PNGs into docs/examples/ and they’ll show up here.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Make palette system pluggable
- Add SVG / PDF export
- CLI option for batch rendering
Issues and pull requests are welcome! See CONTRIBUTING.md for details.
MIT © 2025 YourName






