Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inconvergent/differential-line
a generative algorithm
https://github.com/inconvergent/differential-line
algorithm animation generative generative-art growth
Last synced: 3 months ago
JSON representation
a generative algorithm
- Host: GitHub
- URL: https://github.com/inconvergent/differential-line
- Owner: inconvergent
- License: mit
- Archived: true
- Created: 2015-07-23T23:44:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-23T10:55:28.000Z (over 6 years ago)
- Last Synced: 2024-07-19T03:07:54.213Z (4 months ago)
- Topics: algorithm, animation, generative, generative-art, growth
- Language: Python
- Homepage: https://inconvergent.net/generative/differential-line/
- Size: 7.17 MB
- Stars: 679
- Watchers: 22
- Forks: 96
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Differential Line
=============![ani](/img/ani2.gif?raw=true "animation")
This algorithm simulates the way a number of biological things in nature grows.
Among other things it is made to mimic the growth of the human brain, as well
as a great number of plants.Specifically this code is a line-based implementation of behaviour very similar
to Floraform by Nervous System:
https://n-e-r-v-o-u-s.com/projects/sets/floraform/
Another relevant paper (which I discovered later) is this:
http://www.dgp.toronto.edu/~karan/artexhibit/mazes.pdf![ani](/img/ani.gif?raw=true "animation")
![img](/img/img.jpg?raw=true "image")
In brief; we start of with a number of connected nodes in a circle. Gradually
we introduce new nodes on the line—prioritizing segments where the curve bends
more sharply. Over time the curve grows increasingly intricate, but it never
self-intersects.![img](/img/img1.jpg?raw=true "image")
![img](/img/img2.jpg?raw=true "image")
If we start with a different shape, and draw the outside position of the object
for each growth step, we can get an entirely different kind of system with an
interesting 3D illusion.![img](/img/img3.jpg?raw=true "image")
## Prerequisites
In order for this code to run you must first download and install these two
repositories:* `iutils`: http://github.com/inconvergent/iutils
* `zonemap`: https://github.com/inconvergent/zonemap
* `fn`: https://github.com/inconvergent/fn (used to generate
filenames, you can remove this dependency in the main files)## Other Dependencies
The code also depends on:
* `gi` (replaces pyGTK)
* `numpy`
* `cython`
* `python-cairo` (do not install with pip, this generally does not work)## Running it on Linux (Ubuntu)
To install the libraries locally, run `./install`. I have only tested this code
in Ubuntu 14.04 LTS, but my guess is that it should work on most other
platforms platforms as well. However i know that the scripted install in
`./install` will not work in Windows## Running it on Windows?
The code will probably work just fine under Windows, but I'm not sure how to
install it. (Let me know if you get it working!)## Why all the main files?
If you just want to try this out you should have a look at `main_ani.py`. It is
pretty safe to ignore all the others main files. (They implement different
behaviour, and some of them are very experimental.)## Similar code
If you find this alorithm insteresting you might also want to check out:
https://github.com/inconvergent/differential-mesh.Recently I also implemented a version of this algorithm using CUDA:
https://github.com/inconvergent/differential-line-cuda