https://github.com/micycle1/srpg
Super Random Polygon Generator
https://github.com/micycle1/srpg
polygon-construction polygon-generator polygons shape-generation
Last synced: 11 months ago
JSON representation
Super Random Polygon Generator
- Host: GitHub
- URL: https://github.com/micycle1/srpg
- Owner: micycle1
- Created: 2023-03-15T13:00:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T10:32:28.000Z (almost 2 years ago)
- Last Synced: 2025-03-11T14:22:17.575Z (about 1 year ago)
- Topics: polygon-construction, polygon-generator, polygons, shape-generation
- Language: Java
- Homepage: https://sbgdb.cs.sbg.ac.at/generators/genpoly-srpg/
- Size: 1.74 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://jitpack.io/#micycle1/SRPG)
# SRPG – Super Random Polygon Generator
SRPG is a library that generates well-formed random polygons using a regular grid consisting of square cells.
It starts with axis & grid-aligned basic rectangular shapes, but can systematically manipulate them through repeated corner-cutting and perturbations to create a variety of polygonal and curve-like shapes, both on the grid and with offset/rotated orientations.
This library is based on *Martin Held*'s C [implementation](https://github.com/cgalab/genpoly-srpg).
## Usage
SRPG is available as Maven/Gradle artifact via [Jitpack](https://jitpack.io/#micycle1/SRPG).
## Argument Illustrations
SRPG accepts a variety of input arguments that affect shape geometry, providing a good level of customisation over the output. The following illustrations provide an idea of how each argument visually affects the random polygon:
Hierarchy
Diagonal
Perturb+align
Smooth
### Grid size (nX, nY)
5x5
10x10
100x100
500x500