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.
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.
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
Some boilerplace code to get started with a sketch can be found in the directory: sketches/template/
.
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
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