All Projects → thobbs → Genartlib

thobbs / Genartlib

Licence: mit
Utilities for creating generative artwork with Clojure

Programming Languages

clojure
4091 projects
processing
702 projects

Projects that are alternatives of or similar to Genartlib

ZzSprite
Pixel Art Sprite Generator
Stars: ✭ 85 (-6.59%)
Mutual labels:  generative-art, generative
Sand Spline
generative algorithm
Stars: ✭ 261 (+186.81%)
Mutual labels:  generative, generative-art
samila
Generative Art Generator
Stars: ✭ 750 (+724.18%)
Mutual labels:  generative-art, generative
book-mdpc
Il cinema tra le righe... di codice!
Stars: ✭ 59 (-35.16%)
Mutual labels:  generative-art, generative
Differential Line
a generative algorithm
Stars: ✭ 606 (+565.93%)
Mutual labels:  generative, generative-art
GenerativeArtists
No description or website provided.
Stars: ✭ 22 (-75.82%)
Mutual labels:  generative-art, generative
desert
A fast (?) random sampling drawing library
Stars: ✭ 61 (-32.97%)
Mutual labels:  generative-art, generative
Triangle
Convert images to computer generated art using delaunay triangulation.
Stars: ✭ 1,838 (+1919.78%)
Mutual labels:  generative, generative-art
Weir
A system for making generative systems
Stars: ✭ 451 (+395.6%)
Mutual labels:  generative, generative-art
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+4985.71%)
Mutual labels:  generative, generative-art
GAS
Generative Art Synthesizer - a python program that generates python programs that generates generative art
Stars: ✭ 42 (-53.85%)
Mutual labels:  generative-art, generative
Sofloo Spot
Click Randomize
Stars: ✭ 37 (-59.34%)
Mutual labels:  generative, generative-art
Generative-Art
A selection of generative art scripts written in Python
Stars: ✭ 284 (+212.09%)
Mutual labels:  generative-art, generative
corruption-loops
Digitally disintegrating music
Stars: ✭ 37 (-59.34%)
Mutual labels:  generative-art, generative
generative-art
Generative art experiments
Stars: ✭ 113 (+24.18%)
Mutual labels:  generative-art, generative
glitch-image
🖼 Generate and save unique glitchy images
Stars: ✭ 46 (-49.45%)
Mutual labels:  generative-art, generative
Fracture
generative algorithm
Stars: ✭ 99 (+8.79%)
Mutual labels:  generative, generative-art
Generative art
A collection of my generative artwork, mostly with Processing in Python mode
Stars: ✭ 1,477 (+1523.08%)
Mutual labels:  generative, generative-art
Generativeart
Generative Art in Go
Stars: ✭ 313 (+243.96%)
Mutual labels:  generative, generative-art
Snek
See https://github.com/inconvergent/weir instead
Stars: ✭ 696 (+664.84%)
Mutual labels:  generative, generative-art

genartlib

Clojars Project cljdoc badge

Ectogenesis

A Clojure library with simple utilities for creating generative artwork.

This library is built around Quil, a Clojure wrapper around the Processing framework. However, most of the functions are just mathematical utilies that could be used idependently.

To see and read about my artwork, visit tylerxhobbs.com or follow me on Instagram or Twitter.

Usage

To install, add this to your dependencies in project.clj:

[genartlib "0.1.22"]

Contents

View the API Docs.

The genartlib library has the following tools:

Project Template

Under project-template/, you'll find the basic setup that I use for every new generative art project. This is geared towards creating static images.

I also wrote a bit about my development setup and how I use it.

Algebra

The following algebra-ish functions are defined:

  • avg - average
  • interpolate / interpolate-multi - linear interpolation
  • rescale - map from one range to another
  • line-intersection - find the intersection of two lines
  • lines-intersection-point - another way to find line intersections
  • slope / point-slope - get the slope of a line
  • y-intercept - get the y intercept point of a line
  • angle / point-angle - get the angle between two points in radians
  • angular-coords - calculate the offset location from a base point with angle and magnitude
  • point-dist - distance between two points

Geometry

  • polygon-contains-point? - a fast test for checking if a point falls inside a polygon
  • rotate-polygon - rotates around the average center of the poly
  • shrink-polygon - shrink by a ratio

Curves

  • chaikin-curve - a curve-smoothing algorithm
  • chaikin-curve-retain-ends - a variation that preserves the original end points
  • split-curve-by-step - break up a curve into chunks with the given length
  • split-curve-into-parts - break up a curve into chunks with equal length, given a number of parts to have
  • interpolate-curve - find a point that is a given percentage along the length of a curve
  • line-simplification - an implementation of the Ramer-Douglas-Peucker line simplification algorithm

Random

  • gauss - sample a gaussian probability distribution
  • abs-gauss - basically gauss + abs
  • triangular - sample a triangular probability distribution
  • pareto-sampler / pareto-sample - sample a pareto probability distribution
  • random-point-in-circle - uniform sampling of points within a circle
  • odds - returns true or false with the given probability
  • choice - pick from a list of items with uniform probability
  • weighted-choice - pick from a list of items, each with an assigned probability
  • repeatable-shuffle - a version of shuffle that uses Processing's Random, in order to ensure repeatability with the same seed

Plotter

  • sort-curves-for-plotting - sorts a seq of curves in order to minimize plotter travel distance

Utils

  • w and h - shorthand for expressing a length or position in terms of percentage of the image width or height - good for using a pseudo-vector approach to creating images
  • set-color-mode - set the color mode to HSV with ranges H [0, 360], S [0.0, 100.0], V [0.0, 100.0], alpha [0.0, 1.0]
  • in? / not-in? - test if a seq contains an item
  • between? - is a value inside an inclusive range?
  • enumerate - turns a seq of items into a seq like ([0 item-0] [1 item-1] [2 item-2] ...)
  • zip - combine two or more seqs into tuples
  • snap-to - snap a value to a given window size, kind of like configurable rounding
  • vec-remove - remove an item from a vector

License

Copyright © Tyler Hobbs

Distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].