Skip to content

Commit

Permalink
feature: attempt to autogenerate latex with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
potmo committed Feb 6, 2022
1 parent b516a36 commit 43a5dd6
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: readme2tex-action

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install pdflatex and rename
run: sudo apt install texlive-latex-base rename
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install readme2tex
- name: Build readmes
run: |
find . -type f -name '*.tex.md' -execdir python3 -m readme2tex --readme "{}" --nocdn --output "{}.temp" \;
- name: Copy built .md files
run: |
find . -type f -exec rename -f 's/.tex.md.temp/.md/' '{}' \;
- name: Commit the built files
run: |
git config --global user.name '${{github.repository_owner}}'
git config --global user.email '${{github.actor}}@users.noreply.github.com'
git add . && git commit -m "Built the .tex.md files"
git push
12 changes: 9 additions & 3 deletions readme.md → readme.tex.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ I have structured this paper to discuss all the elements of making an image with
- Using Software to simulate the mirror setups for rapid iterations.
- Fabricating the mirror array panel using a 6-axis Kuka robot arm, a 5-axis CNC milling machine, a 3-axis CNC milling machine or a 3d printer.

##A brief history and background
## A brief history and background



> `TODO: talk about mosaics of course`
Expand Down Expand Up @@ -122,7 +124,9 @@ If we want to create an animation with multiple images the size of the problem s

dithering and stippling, half toning or pointillism

##Considerations of how to arrange the mirrors
## Considerations of how to arrange the mirrors



We want the image in the mirrors to be vibrant so we need to reflect as much light as possible trying to cover as much of the substrate that the mirrors are attached to. All the area not covered by a mirror will has its own colour and that colour affects the overall picture, basically mixing with the picture, so we want to reduce that area as much as possible. To do that we need to find a shape of mirrors and a pattern of tiling that covers the most amount of area and exposes as little as possible of the background surface.

Expand Down Expand Up @@ -158,7 +162,9 @@ Of course, the objective might not be to optimise for area coverage but some sen
[^hex-grid-convertion]: a great source of information on hexagonal grids can be found here https://www.redblobgames.com/grids/hexagons/
[^han-2013]: see for example Dianyuan Han, 2013, Comparison of Commonly Used Image Interpolation Methods

##A very brief primer on light transport
## A very brief primer on light transport



Light rays travel in a straight line through a medium (like air). When striking a surface some of the light will be absorbed by the surface (converted to heat) and some will bounce back, reflected. The absorption is what makes object look colorised due to that the surface absorbing some frequencies of light more than others. On a perfectly flat, smooth surface, called a specular surface, the angle of incidence, the angle at witch the light ray hits the surface, is equal to the angle of reflection with regards to a projected line perpendicular to the surface, known as the normal.

Expand Down

0 comments on commit 43a5dd6

Please sign in to comment.