NicklasXYZ / generative-art

Documentation of all my generative art sketches...

Home Page:https://nicklasxyz.github.io/generative-art/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generative Art Sketches

This repo contains generative art sketches produced for the purpose of plotting them with the AxiDraw penplotter.

The repo essentially contains documentation and the code that was used to produce each of the different art sketches.

Technologies

The generative art sketches primarily utilize the tools:

  • Typescript using libraries two.js for rendering svg paths and dat.gui for controlling possible input parameter settings.
  • Inkscape for converting svg files into pdf files.
  • Python for automation, organization and templating purposes using libraries such as Jinja.
  • xelatex for final styling and for compiling converted pdf files into a single printable document.

Sketch Processing Pipeline/Workflow

Run a sketch:

cd sketches/sketch001 && npm install && npm run start

Play around with the settings and download the generated .svg files. Take note of the widthMargin, heightMargin, columns, rows settings as these will be necessary later.

Rename the desired (downloaded) files according to the naming convention PRFIX_NUMBER.svg, for example the files should be named according to the following pattern svg_1.svg, svg_2.svg, svg_3.svg, etc.

Move the renamed files to an input directory input1 for further processing. Process the files in the input directory input1 by running the python script in the render directory:

python main.py --output ../sketches/sketch001/output1 --input ../sketches/sketch001/input1 --widthMargin 20 --heightMargin 30 --columns 1 --rows 3

The commandline arguments widthMargin, heightMargin, columns, rows should align with whatever is given as input when playing around with the settings in the web interface.

Finally enter into the sketches/sketch001/output1 directory. Make any necessary adjustments to the main.tex and compile the sketch:

xelatex main.tex

Sketch Template

Some boilerplace code to get started with a sketch can be found in the directory: sketches/template/.

PDF to PNG

For inclusion in the documentation, pdf files should be converted to pngs using the ´convert´ commandline utility:

convert -verbose -density 300 output1.pdf -sharpen 0x0.1 -colorspace RGB output1.png

Installation of Python Libraries

To install the necesarry Python library dependencies for generating the documentation hosted on Generative Art Sketches, execute the following steps:

# Create a new conda environment if necessary:
conda create -n genart python=3.9

# Install mkdocs together with the material theme
pip install mkdocs-material

About

Documentation of all my generative art sketches...

https://nicklasxyz.github.io/generative-art/


Languages

Language:TypeScript 67.7%Language:TeX 14.2%Language:Python 10.5%Language:JavaScript 2.5%Language:CSS 2.3%Language:Jinja 1.6%Language:HTML 1.2%Language:Makefile 0.1%