gen2D

command module
v0.0.0-...-f7ece21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 1 Imported by: 0

README

Go Report Card

Gen2D

Gen2D is a command-line interface (CLI) tool that simplifies the generation of 2D art in Go.

This tool is built on top of the generativeart library.

Quick Start

Build and run the application:

go build -o ./gen2D && ./gen2D circles

This command creates a directory called "output" containing your generated artwork.

On macOS, you can view the generated files using:

open output/*

Available Commands

To see all available options, run:

./gen2D

Some example commands to try:

./gen2D random-shapes
./gen2D perls

Using the Sample Makefile

The repository includes a sample Makefile to help you generate art. To create artwork using all the commands in the Makefile:

make -f sample-Makefile all

Configuration Files

You can customize your artwork using configuration files. Here's an example configuration file (in the input folder):

{
  "out": {
    "dir": "output"
  },
  "canvas": {
    "width": 300,
    "height": 300
  }
}

The configuration file allows you to set:

  • Output directory location
  • Canvas dimensions

To use a configuration file:

./gen2D circles grid -c 10 -f input/config.json

This command generates 10 images using the specified circle configuration.

Contributing

To contribute:

  1. Create an issue describing the proposed change
  2. Submit a pull request with your implementation

Planned Features

  • Generate a configuration file for each image, documenting the parameters used for future recreation
  • Add a flag to specify the output directory
  • Create subdirectories with timestamps for each generation run
  • Switch from JSON to TOML configuration files for improved readability and conciseness

License

This project is licensed under the MIT License. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL