Skip to content

"stochsysart" is the collection of TeX files, Python- and Bash scripts, used for generating the artwork 'The Brownian motion paper'.

License

Notifications You must be signed in to change notification settings

Samdney/stochsysart

Repository files navigation

stochsysart

stochsysart is the collection of TeX files, Python- and Bash scripts, used for generating the artwork 'The Brownian motion paper'. A paper like document (pdf), about Brownian motion (thanks Wikipedia), with it's own words themselves moving according to Brownian motion.

Requirements

  • For watching the art: The artfile is called 'brownianmotion.pdf'. Attention: It only runs with Adobe Acrobat Reader, since it uses .gif content for animations. When opening, animation should start automatically. If not, try to start it with clicking somewhere on the document. When scrolling through the document, please always stop for a moment, else the animation is unable to start.
  • For recreate the work: The pdfs are generated with LaTeX (pdflatex). The animation time step coordinates of the words with Python. The preparation of the animation data, for creating the final animations, with Linux Bash.

Directories, scripts, and art recreation

  • pdf_base
    Contains the static start state of the paper, we want to animate. We took the English Wikipedia article about Brownian motion for this.
    => Generate pdf with pdflatex: pdflatex pdf_base.tex.

  • pdf_getcoord
    Copy of our file from pdf_base. Mark all words in 'pdf_getcoord.tex', which will later move in the animation, to receive their initial positions.
    => Add \zsavepos{word}word, if you want 'word' later get animated.
    => Generate pdf with pdflatex: pdflatex getcoord.tex. Coordinates are written to the 'pdf_getcoord.aux' file.

  • brownsim
    Copy the 'pdf_getcoord.aux' from the 'pdf_getcoord' to the 'brownsim' directory. Create a copy 'getcoord.aux' of the 'pdf_getcoord.aux' file. Then remove every line in the 'getcoord.aux' file, which doesn't belong to any word marked for animation.
    => Create directory pdf_writecoord in project working directory.
    => Create directory pdf_writecoord/timeStepsTeX.
    => Run python brownsim.py. (Attention: If you apply this to your own work, you have to adapt the script to your own content!)

  • pdf_writecoord Copy the 'pdf_writecoord.tex' from the 'pdf_getcoord' to the 'pdf_writecoord' directory. In the 'pdf_writecoord.tex' file: Remove all position marks (\zsavepos{word}word), and replace the marked words with \phantom{word}.
    => Add \input{\jobname} to the file 'pdf_writecoord.tex' (somewhere early on the beginning of the file, but[!] after \begin{\document}) .
    => Add \input{textblocksPage*}, where * stands for each of the page numbers of your *.pdf file) to the file 'pdf_writecoord.tex' at positions where the related page starts[!] within the *.tex file.
    => Run ./genTimeStepsPDFs.sh, to generate for each time step of simulation one pdf file.
    => Enter the subdirectory 'pdfs' with cd pdfs.
    => Run ./splitPdfPages.sh, to split each pdf into its single pages.
    => Run ./genPNGs.sh, to generate for each pdf page one png file.

  • pdf_brownianmotion
    => Generate the final pdf (our artwork) with pdflatex: pdflatex brownianmotion.tex.
    => Our art work: 'brownianmotion.pdf'. :)

About

"stochsysart" is the collection of TeX files, Python- and Bash scripts, used for generating the artwork 'The Brownian motion paper'.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages