05-03-2018
This is the visualisation code for the “raising preserving arc length” part of “Quantifying the Effects of Raising”. Having used pbmGetProfile (or some other method) to get a table of values of (radius, height), rpal will produce a visualisation of the theoretical wall thickness.
windows : download the zip file, extract to location of your choice.
The file system is like this:
├───doc
├───example
└────source
└───dependencies
├───csv
├───parseCmdline
│ └───source
├───split_string
└───yacc
example should have everything you need, on windows at least.
source has rpal source plus source of dependencies plus supporting dlls for the compiler. That should get you going on windows at least.
linux : In addition I’m afraid you’ll have port source\compile.bat to linux and compile the source. You’ll have the compiler already.
rpal [-d | -h | -i | -t | -v | -w] profile_csv_file
options are:
-d : dump profile data
-h : this help
-i : write summary info
-t : thickness of initial disc (default 1)
-v : version
-w : interval over which to compute tangent (default 1)
first use
pbmgetProfile profile_file.pbm > profile_csv_file
then
rpal profile_csv_file > profile_csv_file.svg
gets the profile as svg.
If the csv input file has been generated by some other means, be aware that the first line has to be "radius","height" followed by an arbitrary number of comma separated integer pairs, one pair per line.
We read the csv file and order it by height, then compute arc length and normal to the tangent for each height. Thickness at each height is computed using the formula
ρ(s) is the radius at arc length s.
The normal is computed by calculating the gradient between points either side of the current point. You can smooth this by using the -w parameter, so that the tangent is computed using points ± -w from the current point.
We then use this data to write a svg file, which can be exported to a .png file using inkscape with something along the lines of
"C:\Program Files\Inkscape\inkscape.exe" -y 255 --export-png=filename.png -d 300 filename.svg
If we start with ../example/can.csv as the profile of a raising we get this image of the raising:
yes, but don’t know where.
use rpal\source\compile.bat
Produced with:
pp rpal.txt | pandoc --self-contained --toc -N -c devDoc.css -s -t html5 -o rpal.html
2018-03-05 16:18:30