## How to export a curve network with normals in Blender

9 April 2018 in blender

Most curve network datasets found online contain only positions and not surface normals along the curves (Cycles, True2Form, ILoveSketch). When I needed to create a bunch of synthetic curve networks with normals to test our surfacing algorithm, I thought this could be easily done using Blender:

1. Select the network on a mesh
2. Separate the network from the mesh using the Separation tool (P)
3. Export the network as an OBJ file (including the normals)

It turned out to be much more tricky than that.

continue reading…

## Zippering two pdfs

1 September 2017 in cmd

If for some reason you have two pdfs with separated odd and even pages of a document, the following command zippers them into a single pdf. (Assuming odd.pdf and even.pdf have the same number of pages; in this case 8.)

qpdf --empty --pages $(for i in$(seq 1 1 8); do echo " odd.pdf $i even.pdf$i "; done) -- all.pdf


## Re-encoding subtitles in utf-8

29 August 2017 in cmd

Most Slovak/Czech subtitles are encoded in Plex-incompatible windows-1250 (wiki). The following changes the encoding to utf-8.

iconv -f windows-1250 -t utf-8 subs-win-1250.srt > subs-utf-8.srt


## A bunch of png to pdf

9 August 2017 in cmd
for file in *.png; do convert $file${file%.png}.pdf; done


## The Rainbow Fog

27 June 2017 in travel

## Push to all git remotes at once

11 May 2017 in cmd
git remote | xargs -L1 git push --all


[source]

## Compressing papers with ghostscript

5 May 2017 in research

When searching for ways to compress the size of a ~50MB paper pdf, I’ve discovered the following ghostscript command (askUbuntu, TeX StackExchange)

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf


Argument of -dPDFSETTINGS can be any of:

-dPDFSETTINGS=/screen   # lower quality, smaller size.
-dPDFSETTINGS=/ebook    # for better quality, but slightly larger pdfs.
-dPDFSETTINGS=/prepress # output similar to Acrobat Distiller "Prepress Optimized" setting
-dPDFSETTINGS=/printer  # selects output similar to the Acrobat Distiller "Print Optimized" setting
-dPDFSETTINGS=/default


(descriptions copy-pasted from askUbuntu)

I wrote a small script to test the different -dPDFSETTINGS modes.

continue reading…

## Gif screencast with byzanz

3 March 2017 in cmd

Here’s a simple example for gif screencasting with byzanz. See the thread How to create animated GIF images of a screencast? on askubuntu.com.

byzanz-record --duration=12 --x=725 --y=365 --width=487 --height=375 out.gif


Animation of Chaikin curve subdivision scheme captured with byzanz.

On Fedora, byzanz can be installed from the official repo.

sudo dnf install byzanz


## 3d fabricated lilium

15 February 2017 in research

We got this giant plastic lilium for the tests of our sensor surface reconstruction. Looking forward to the experiments!

(The small device in the middle is the Morphorider.)